Page 2 of 5
Re: My check_snmp command doesn´t work for switch monitoring
Posted: Thu Jun 04, 2015 3:12 pm
by tgriep
I found the name of the OID that our Cisco Switch is using, try running this command to get the uptime from your switch.
Code: Select all
snmpget -v 2c <CiscoIP> -c public sysUpTimeInstance
If that fails, run this command and post back the output.
Code: Select all
snmpwalk -v 2c <CiscoIP> -c public |grep -i time
Re: My check_snmp command doesn´t work for switch monitoring
Posted: Thu Jun 04, 2015 3:15 pm
by Jessuzz94
Well, it doesnt work

, i dont understand do i need to put some parameters in the definition of the check_command?,
Re: My check_snmp command doesn´t work for switch monitoring
Posted: Thu Jun 04, 2015 3:36 pm
by Jessuzz94
aaah!! now it change, in the nagios web interface the CRITICAL error - plugin timed out while executing system call o changed to UNKNOWN and it says: No OIDs specified
Re: My check_snmp command doesn´t work for switch monitoring
Posted: Thu Jun 04, 2015 3:43 pm
by Jessuzz94
tgriep sorry, but, i need to put the sysUpTimeInstance in the check_command too?
Re: My check_snmp command doesn´t work for switch monitoring
Posted: Thu Jun 04, 2015 4:01 pm
by Jessuzz94
the command: snmpwalk -v 2c <CiscoIP> -c public |grep -i time
shoes me timeticks
iso3.6.1.2.1.1.3.0 timeticks: (2596) 0:00:25:96
iso3.6.1.2.1.1.3.0 timeticks: (2595) 0:00:29:55
and more like that
Re: My check_snmp command doesn´t work for switch monitoring
Posted: Thu Jun 04, 2015 4:43 pm
by jdalrymple
Did you ever get SNMP to properly load your MIBS? They aren't explicitly necessary, but now would be a good time to get all that working:
Jessuzz94 wrote:the seccond command "snmpget -v 2c -c public <ciscoIP> .1.3.6.1.2.1.1.3.0" throws me:
Code: Select all
iso.3.6.1.2.1.1.3.0 = Timeticks: (530168) 1:28:21.68
This means SNMP is working, but since it didn't work when you specified the object name - there is a problem loading the MIBs.
Did you ever:
Code: Select all
snmptranslate -Dinit_mib .1.3 2>&1 | grep MIBDIR
Re: My check_snmp command doesn´t work for switch monitoring
Posted: Thu Jun 04, 2015 5:00 pm
by tgriep
It look like you are missing the MIB files for checking uptimeof the switch.
You could either re-install the net-snmp software or you could download this file
http://www.net-snmp.org/docs/mibs/DISMAN-EVENT-MIB.txt
and save it in this folder
After you get the MIB installed, you would use this command to check for uptime of your switch.
Code: Select all
snmpget -v 2c <CiscoIP> -c public sysUpTimeInstance
Re: My check_snmp command doesn´t work for switch monitoring
Posted: Thu Jun 04, 2015 10:28 pm
by Jessuzz94
Okay I will do, but tomorrow because i am not in the server because im in practice of university on a business and i cant connect to the nagios server remotely from my home. but yes i will do it tomorrow, very thanks really!, will give you the results of the commands.
PD: sorry for my bad english.
Re: My check_snmp command doesn´t work for switch monitoring
Posted: Fri Jun 05, 2015 11:32 am
by Jessuzz94
Hi tgriep, i did it, i download the mib and move it to the mibs directory, but i have something bad, i put the command you gave me to test the uptime of the switch and i have this error:
sysUpTimeInstance: Unknown Object Identifier (Sub-id not found): (top) -> sysUpTimeInstance
this error appears every time i put a command like this. whats wrong?
Re: My check_snmp command doesn´t work for switch monitoring
Posted: Fri Jun 05, 2015 11:49 am
by tgriep
For some reason your switch isn't reporting the OID correctly. You use the following to get the UPTime in place of the other command.
Code: Select all
snmpget -v 2c -c public <ciscoIP> .1.3.6.1.2.1.1.3.0
Could you run the following and post the output back here?