Nagios switch-check_mrtgtraf: Unable to open MRTG log file

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
lsazzad
Posts: 72
Joined: Tue Apr 07, 2015 6:52 am
Location: ​Osnabrück, Deutschland
Contact:

Re: Nagios switch-check_mrtgtraf: Unable to open MRTG log fi

Post by lsazzad »

Thanks a lot! You are life saver. Its working!
Capture.JPG
1. I am no clear about you following solution:
Please post your service configuration under Configure > Core Config Manager > Services and find the port 24 service and screenshot it.
Please note, i am using Nagios Core 4.0.8 Version. I cant find the Configure > Core Config Manager > Services path in GUI! I think its for Nagios XI.

2. Still having problem with MRTG graph GUI. Whenever i run cfgmaker for new switch it published the latest switch graph under my MRTG path:

Code: Select all

http://nagiosserver/mrtg
But in Nagios portal usage is being shown. I think its working from Background end.
Regards
Sazzad
lsazzad
Posts: 72
Joined: Tue Apr 07, 2015 6:52 am
Location: ​Osnabrück, Deutschland
Contact:

Re: Nagios switch-check_mrtgtraf: Unable to open MRTG log fi

Post by lsazzad »

A small update!

When i am trying to write
Its showing the graph. I think i can see all most all the switches graph. For me, its ok. Thanks in advance!

Would you help me to solve SNMP CRITICAL issue?
Regards
Sazzad
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Nagios switch-check_mrtgtraf: Unable to open MRTG log fi

Post by tgriep »

Could you post how you have configured your Port 24 Uplink settings?
What we need it to see how the check command is setup for this port.
Be sure to check out our Knowledgebase for helpful articles and solutions!
lsazzad
Posts: 72
Joined: Tue Apr 07, 2015 6:52 am
Location: ​Osnabrück, Deutschland
Contact:

Re: Nagios switch-check_mrtgtraf: Unable to open MRTG log fi

Post by lsazzad »

In switch.cfg the config for SNMP is:

Code: Select all

define service{
	use					generic-service	; Inherit values from a template
	host_name			RR-DE-IP-Phone-SW-2		; The name we're giving to this switch
	service_description	        Port 24 Uplink-SFP Link Status
	check_command		check_snmp!-C public -o ifOperStatus.1 -r 24 -m RFC1213-MIB
	}
Execpt this i didn't modify anywhere.. Requested to let me know, if you need any information.
Regards
Sazzad
User avatar
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

Post by Box293 »

Can you please execute this command:

Code: Select all

/usr/local/nagios/libexec/check_snmp -H xxx -C public -o ifOperStatus.1 -r 24 -m RFC1213-MIB
Where xxx is the IP address of the switch.

Please show us the output.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
lsazzad
Posts: 72
Joined: Tue Apr 07, 2015 6:52 am
Location: ​Osnabrück, Deutschland
Contact:

Re: Nagios switch-check_mrtgtraf: Unable to open MRTG log fi

Post by lsazzad »

Thanks for your query!

Code: Select all

root@RR-DE-NMS-2:~# /usr/local/nagios/libexec/check_snmp -H 172.19.254.61 -C public -o ifOperStatus.1 -r 24 -m RFC1213-MIB
SNMP CRITICAL - *up(1)* | 
Regards
Sazzad
lsazzad
Posts: 72
Joined: Tue Apr 07, 2015 6:52 am
Location: ​Osnabrück, Deutschland
Contact:

Re: Nagios switch-check_mrtgtraf: Unable to open MRTG log fi

Post by lsazzad »

ssax wrote: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:

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 install
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

I just installed net-snmp to my redundant nagios server. But facing same problem like previous. I have tried to re-install & recompiling net-snmp & all plugins. But no change :(
1.JPG
2.JPG
Please have kind look over above image!
Regards
Sazzad
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Nagios switch-check_mrtgtraf: Unable to open MRTG log fi

Post by tgriep »

To fix the critical message for your link status command, you need to change the command.
Change this from

Code: Select all

check_command      check_snmp!-C public -o ifOperStatus.1 -r 24 -m RFC1213-MIB
to

Code: Select all

check_command      check_snmp!-C public -o ifOperStatus.1 -m RFC1213-MIB
Save it out and restart Nagios and the Critical message will be fixed.

The MIB search path error, the default location "/usr/share/snmp/mibs/" could be missing the MIB files that are needed to run the check.
Can you verify that the RFC1213-MIB file is in that folder?
Be sure to check out our Knowledgebase for helpful articles and solutions!
lsazzad
Posts: 72
Joined: Tue Apr 07, 2015 6:52 am
Location: ​Osnabrück, Deutschland
Contact:

Re: Nagios switch-check_mrtgtraf: Unable to open MRTG log fi

Post by lsazzad »

1. Thanks! Its working :D :D CRITICAL issue is fixed.

2. For MIB search path error i have recompile all the plugin again & its seems ok now.

Admin is requested to close the thread!
Regards
Sazzad
Locked