Page 1 of 2

check_snmp on Ubuntu Server 12.04 - Bug?

Posted: Wed May 30, 2012 12:37 pm
by LHammonds
None of my 12.04 Ubuntu servers can run the check_snmp command without hanging when trying to access a router/switch. It does not matter what what OID I try to access (as long as it is valid)

I issue the same command on a 10.04 server and it works.

Here are the versions for each program per platform:

EDIT: check_snmp v1.4.14 was also tested on 12.04 but had identical failure as v1.4.15

Ubuntu Server 12.04 LTS (64-bit)

Code: Select all

uname -a
Linux srv-wiki 3.2.0-24-generic #39-Ubuntu SMP Mon May 21 16:52:17 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux

/usr/lib/nagios/plugins/check_snmp -V
check_snmp v1.4.15 (nagios-plugins 1.4.15)

/usr/bin/snmpget -V
NET-SNMP version: 5.4.3
Ubuntu Server 10.04.4 LTS (64-bit)

Code: Select all

uname -a
Linux srv-mail 2.6.32-41-server #89-Ubuntu SMP Fri Apr 27 22:33:31 UTC 2012 x86_64 GNU/Linux

/usr/lib/nagios/plugins/check_snmp -V
check_snmp v1.4.14 (nagios-plugins 1.4.14)

/usr/bin/snmpget -V
NET-SNMP version: 5.4.2.1
Here is the check_snmp command issued the 12.04 server:
/usr/lib/nagios/plugins/check_snmp -H 192.168.1.1 -o .iso.3.6.1.2.1.1.3.0 -C public
or
/usr/lib/nagios/plugins/check_snmp -H 192.168.1.1 -o sysUpTime.0 -C public
No result (fails)...just sits there and does not even timeout (even if you add -t 10)

Here is the check_snmp command issued the 10.04 server:
/usr/lib/nagios/plugins/check_snmp -H 192.168.1.1 -o .iso.3.6.1.2.1.1.3.0 -C public
or
/usr/lib/nagios/plugins/check_snmp -H 192.168.1.1 -o sysUpTime.0 -C public
Here is the result (works):
SNMP OK - Timeticks: (83867600) 9 days, 16:57:56.00 |

Here is the snmpget command issued on the 12.04 server:
snmpget -v1 -c public -Ovq 192.168.1.1 .iso.3.6.1.2.1.1.3.0
or
snmpget -v1 -c public -Ovq 192.168.1.1 sysUpTime.0
Here is the result (works):
9:16:59:28.00

Here is the snmpget command issued on the 10.04 server:
snmpget -v1 -c public -Ovq 192.168.1.1 .iso.3.6.1.2.1.1.3.0
or
snmpget -v1 -c public -Ovq 192.168.1.1 sysUpTime.0
Here is the result (works):
9:17:01:12.00

Installation Notes:
- All servers had the plugins installed using aptitude install nagios-plugins (except the Nagios server)
- The Nagios server had the plugins compiled from source, however, it is still the same version as 12.04 servers (1.4.15)

I'm stumped at this point. The snmp commands worked for all my switches when the Nagios server was running on 10.04. This is the only thing not working like it did on the old operating system and I have about 1,000 services defined.

If I cannot get the Nagios server to poll snmp correctly, my backup plan is to use a 10.04 server (which cannot be upgraded yet because of the mail application) and have it issue all the snmp queries (via NRPE). Yuck.

EDIT: I added the verbose option to see if anything extra shows up that might indicate a difference but it did not help. On both servers, it showed the following:

Code: Select all

/usr/bin/snmpget -t 1 -r 5 -m ALL -v 1 [authpriv] 192.168.1.1:161 sysUpTime.0
LHammonds

Re: check_snmp on Ubuntu Server 12.04 - Bug?

Posted: Wed May 30, 2012 1:27 pm
by agriffin
You said the versions of the nagios plugins were identical on both systems, but in your output at the top of your post it says there's a difference in the minor version number (1.4.15 vs 1.4.14). Maybe you should try downgrading your 12.04 to that version?

Re: check_snmp on Ubuntu Server 12.04 - Bug?

Posted: Wed May 30, 2012 7:40 pm
by LHammonds
I did not say they were identical and I showed the version info to make that perfectly clear. How I installed them were identical with exception of the Nagios server which was compiled. They were all installed from the Ubuntu repositories.

I will uninstall the plugins from one of the 12.04 servers and custom-build/install the same version that is deployed from the 10.04 repository. Thanks for the suggestion.

With some more experimentation, I have found something else out that is interesting.

I have about 30 switches configured to be monitored. All of them are failing the basic sysUpTime, sysName, sysContact and sysLocation checks...however, I am getting results back on the non-standard codes. The following are actually working:

Temperature Over Alarm ( .1.3.6.1.4.1.1916.1.1.1.7.0 )
Temperature Current ( .1.3.6.1.4.1.1916.1.1.1.8.0 )
Software Rev 1st ( .1.3.6.1.4.1.1916.1.1.1.13.0 )
Software Rev 2nd ( .1.3.6.1.4.1.1916.1.1.1.14.0 )

Re: check_snmp on Ubuntu Server 12.04 - Bug?

Posted: Wed May 30, 2012 8:52 pm
by LHammonds
Compiled 1.4.14 plugins on a 12.04 server.

There is absolutely no change in behavior using the older plugin.

Here is the version output:

Code: Select all

uname -a
Linux srv-wiki 3.2.0-24-generic #39-Ubuntu SMP Mon May 21 16:52:17 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux

/usr/local/nagios/libexec/check_snmp -V
check_snmp v1.4.14 (nagios-plugins 1.4.14)
It still fails to do anything other than sit there as if it were hung indefinitely (until I press CTRL+C)

Again, it only hangs when checking sysName, sysContact, sysLocation or sysUpTime as noted above.

If anyone is curious as to the hardware (however, I am not sure that matters since this seems to be related to the combination of the OS level, check_snmp and specific OIDs) they are ExtremeNetworks switches.

I also have detailed notes on how I setup this server on this thread @ Ubuntu forums

LHammonds

Re: check_snmp on Ubuntu Server 12.04 - Bug?

Posted: Fri Jun 01, 2012 9:59 am
by LHammonds
Is anyone successfully using check_snmp with sysUpTime, sysName, sysContact or sysLocation on an Ubuntu 12.04 server?

Re: check_snmp on Ubuntu Server 12.04 - Bug?

Posted: Fri Jun 01, 2012 10:46 am
by agriffin
Try installing nagios-plugins-standard with apt. See if the version of check_snmp from that package works correctly. If it does, you could just copy the binary or check the source package for any patches they made or configuration changes they made to compile it. (Although it's also possible that their package was built on an older version of Debian and no longer compiles correctly on the new Ubuntu release).

Re: check_snmp on Ubuntu Server 12.04 - Bug?

Posted: Fri Jun 01, 2012 4:11 pm
by LHammonds
With nagios-plugins-standard, the version of check_snmp is 1.4.15 and has the same problem as the other repo package and older compiled-from-source version.

I did not know about the nagios-plugins-standard package so just for clarification and documentation purposes, I'll list which files come with each package.

nagios-plugins-standard

Code: Select all

check_bgpstate
check_breeze
check_dig
check_disk_smb
check_dns
check_flexlm
check_hpjd
check_ifoperstatus
check_ifstatus
check_ldap
check_ldaps
check_linux_raid
check_mailq
check_mysql
check_mysql_query
check_oracle
check_pgsql
check_radius
check_rpc
check_snmp
check_wave
nagios-plugins

Code: Select all

check_apt
check_bgpstate
check_breeze
check_by_ssh
check_clamd
check_cluster
check_dhcp
check_dig
check_disk
check_disk_smb
check_dns
check_dummy
check_file_age
check_flexlm
check_ftp
check_host
check_hpjd
check_http
check_icmp
check_ide_smart
check_ifoperstatus
check_ifstatus
check_imap
check_ircd
check_jabber
check_ldap
check_ldaps
check_linux_raid
check_load
check_log
check_mailq
check_mrtg
check_mrtgtraf
check_mysql
check_mysql_query
check_nagios
check_nntp
check_nntps
check_nt
check_ntp
check_ntp_peer
check_ntp_time
check_nwstat
check_oracle
check_overcr
check_pgsql
check_ping
check_pop
check_procs
check_radius
check_real
check_rpc
check_rta_multi
check_sensors
check_simap
check_smtp
check_snmp
check_spop
check_ssh
check_ssmtp
check_swap
check_tcp
check_time
check_udp
check_ups
check_users
check_wave
negate
urlize
utils.pm
utils.sh
Now it seems I cannot re-install the original nagios-plugins. It will only install the reduced list of plugins that comes with nagios-plugins-standard which does not include check_apt and many others as noted above. I've tried aptitude remove and aptitude purge but it will only install the reduced set of plugins now. (I'm now forced to copy the plugins from another server). grrr.

Re: check_snmp on Ubuntu Server 12.04 - Bug?

Posted: Mon Jun 04, 2012 9:42 am
by agriffin
The meta-package nagios-plugins does not actually contain any plugins. It just depends on nagios-plugins-basic and nagios-plugins-standard which provide the plugins. I would recommend opening a bug report with Ubuntu, since it's apparently a problem whether compiling from source or from their package.

Re: check_snmp on Ubuntu Server 12.04 - Bug?

Posted: Fri Jun 08, 2012 1:36 pm
by LHammonds
The bug regarding the install / uninstall / re-install is too minor for me to worry about since I can work around that.

However, the check_snmp issue is not an easy issue to resolve.

Does anyone have a 12.04 server running with a functional check_snmp using sysUpTime, sysName, sysContact or sysLocation?

Re: check_snmp on Ubuntu Server 12.04 - Bug?

Posted: Thu Jul 05, 2012 5:10 pm
by LHammonds
Luc Comtois on the UbuntuForums posted the following which solved this problem:

Reference Link

Code: Select all

cd /usr/share/mibs/netsnmp
wget ftp://ftp.cisco.com/pub/mibs/v2/SNMPv2-MIB.my
wget ftp://ftp.cisco.com/pub/mibs/v1/RFC1213-MIB.my
wget ftp://ftp.cisco.com/pub/mibs/v2/IANAifType-MIB.my
wget ftp://ftp.cisco.com/pub/mibs/v2/SNMPv2-TC.my
wget ftp://ftp.cisco.com/pub/mibs/v2/SNMPv2-SMI.my
echo "mibs +sysUpTime" >> /etc/snmp/snmp.conf
Simply downloading the files was enough for sysUpTime, sysContact, sysLocation and sysName to start working for me. I did not have to modify snmp.conf.

LHammonds