Nagios switch-check_mrtgtraf: Unable to open MRTG log file
Nagios switch-check_mrtgtraf: Unable to open MRTG log file
I juts have added one switch with my Nagios. Ping service is ok. But having error on different service. I have installed MRTG. But i think MRTG isn't working properly. Have the bellow snap.
Regards
Sazzad
Sazzad
- Box293
- Too Basu
- Posts: 5126
- Joined: Sun Feb 07, 2010 10:55 pm
- Location: Deniliquin, Australia
- Contact:
Re: Nagios switch-check_mrtgtraf: Unable to open MRTG log fi
Can you please post your mrtg config file along with your Nagios service definition and the command definition that the service uses.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Re: Nagios switch-check_mrtgtraf: Unable to open MRTG log fi
Extremely sorry for the late reply. I have tried two sites to get help & i think i have mixed up all. Do, you have recommended site? So that i can get help step by step? It would be great help for me.
*Please note that i am using Ubuntu 15.04 (GNU/Linux 3.16.0-36-generic x86_64)
*Please note that i am using Ubuntu 15.04 (GNU/Linux 3.16.0-36-generic x86_64)
Regards
Sazzad
Sazzad
Re: Nagios switch-check_mrtgtraf: Unable to open MRTG log fi
It looks like you don't have the check_snmp plugin installed, see if /usr/local/nagios/libexec/check_snmp exists.
If you don't, you need to install the net-snmp packages and recompile your plugins:
For MRTG graphs reference: http://nagios.sourceforge.net/docs/nagi ... raphs.html
A simple guide: http://bigunix.blogspot.com/2009/07/how ... g-and.html
If you don't, you need to install the net-snmp packages and recompile your plugins:
Code: Select all
yum install net-snmp net-snmp-utils
cd /tmp
wget http://nagios-plugins.org/download/nagios-plugins-2.0.3.tar.gz
tar zxf nagios-plugins-2.0.3.tar.gz
cd nagios-plugins-2.0.3
./configure --with-nagios-user=nagios --with-nagios-group=nagios
make
make installA simple guide: http://bigunix.blogspot.com/2009/07/how ... g-and.html
Re: Nagios switch-check_mrtgtraf: Unable to open MRTG log fi
1. Downloaded required plugin. But there bellow plugins are not present. I have checked it. But i have downloaded all required plugins using following command:
https://exchange.icinga.org/exchange/Ad ... face+Check
There i don't find any check_snmp.tar file available?

Code: Select all
wget http://nagios-plugins.org/download/nagios-plugins-2.0.3.tar.gz2. For Downloading "check_snmp"net-snmp, net-snmp-devel, net-snmp-libs, net-snmp-utils, beecrypt-devel,
elfutils-devel, elfutils-devel-static, lm_sensors
I have gone through following link:- To install check_snmp I download the plugin from this location. check_snmp
https://exchange.icinga.org/exchange/Ad ... face+Check
There i don't find any check_snmp.tar file available?
Regards
Sazzad
Sazzad
- Box293
- Too Basu
- Posts: 5126
- Joined: Sun Feb 07, 2010 10:55 pm
- Location: Deniliquin, Australia
- Contact:
Re: Nagios switch-check_mrtgtraf: Unable to open MRTG log fi
check_snmp comes with Nagios Plugins however it requires net-snmp modules to be installed before compiling.
Here's a guide:
http://sites.box293.com/nagios/guides/i ... centos-6-5
After this install Nagios Plugins:
http://sites.box293.com/nagios/guides/i ... centos-6-5
Here's a guide:
http://sites.box293.com/nagios/guides/i ... centos-6-5
After this install Nagios Plugins:
http://sites.box293.com/nagios/guides/i ... centos-6-5
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Re: Nagios switch-check_mrtgtraf: Unable to open MRTG log fi
Dear Box293,
Thanks for your document. Its pretty good organized. check_snmp is working now.
Do, you have similiar document for MRTG installation on Ubuntu OS?
Thanks for your document. Its pretty good organized. check_snmp is working now.
Do, you have similiar document for MRTG installation on Ubuntu OS?
Regards
Sazzad
Sazzad
Re: Nagios switch-check_mrtgtraf: Unable to open MRTG log fi
I found this link for installing Nagios Core and graphing on Ubuntu. You could take a look at that.
https://raymii.org/s/tutorials/Nagios_C ... 12.04.html
Could you run the check_mrtgtraf command from the command line on the Nagios server and post how the command was run and the error message it generates?
We will also need to see how the mrtg.cfg file is setup on the server.
https://raymii.org/s/tutorials/Nagios_C ... 12.04.html
Could you run the check_mrtgtraf command from the command line on the Nagios server and post how the command was run and the error message it generates?
We will also need to see how the mrtg.cfg file is setup on the server.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: Nagios switch-check_mrtgtraf: Unable to open MRTG log fi
1. Thanks for tutorial. That issue solved & now facing another

SNMP is UP but its showing critical in status.
2. I have config cfgmaker under : /var/www/html/mrtg path:
Now i just have added one(172.19.254.61) Switch using following command:
I can see the graph also in GUI. Its ok.
Problem is that, how can i add multiple NE? Like i have tried to add another switch using following command:
Unfortunately the mrtg.cfg file is being replaced with new switch IP(172.19.254.62)
I dont understand why its happening?
SNMP is UP but its showing critical in status.
2. I have config cfgmaker under : /var/www/html/mrtg path:
Now i just have added one(172.19.254.61) Switch using following command:
Code: Select all
cfgmaker --global 'WorkDir:/var/www/html/mrtg' --global 'Options[_]: bits,growright' --output /etc/mrtg/mrtg.cfg [email protected]Problem is that, how can i add multiple NE? Like i have tried to add another switch using following command:
Code: Select all
cfgmaker --global 'WorkDir:/var/www/html/mrtg' --global 'Options[_]: bits,growright' --output /etc/mrtg/mrtg.cfg [email protected]I dont understand why its happening?
Regards
Sazzad
Sazzad
Re: Nagios switch-check_mrtgtraf: Unable to open MRTG log fi
Please post your service configuration under Configure > Core Config Manager > Services and find the port 24 service and screenshot it.
For the MRTG issue, you need to place the output files in /etc/mrtg/conf.d, that is where you put multiple files so that MRTG will process them.
Change it from:
To:
And then on your next one you add:
For the MRTG issue, you need to place the output files in /etc/mrtg/conf.d, that is where you put multiple files so that MRTG will process them.
Change it from:
Code: Select all
cfgmaker --global 'WorkDir:/var/www/html/mrtg' --global 'Options[_]: bits,growright' --output /etc/mrtg/mrtg.cfg [email protected]Code: Select all
cfgmaker --global 'WorkDir:/var/www/html/mrtg' --global 'Options[_]: bits,growright' --output /etc/mrtg/conf.d/172.19.254.61.cfg [email protected]Code: Select all
cfgmaker --global 'WorkDir:/var/www/html/mrtg' --global 'Options[_]: bits,growright' --output /etc/mrtg/conf.d/172.19.254.62.cfg [email protected]