PDA

View Full Version : After Update Nagios don't get information from network card



mpdl
27-Feb-2012, 17:02
Hi all,
On the system everything works. But after the update to the newest kernel with all secure relevant patches the system is working fine, but Nagios don't get speed or traffic information from the network card 'eth0'. Why?

I installed all patches on 2012.02.11 on this VM. Since this update i checked for new updates, but for i haven't a solution.

I test it last Friday again to update a second test VM. After the update i got the same error on this vm.

I tested a other Plugin to check the traffic with same result. I can't get the information about traffic and speed from network over snmp.

Best regards

Benjamin

jmozdzen
27-Feb-2012, 17:13
Benjamin,

unfortunately no server OS information is given in your query... is this SLES11SP1?

Generally speaking, the following steps might help to corner the source of the problem:
- Is snmpd still running on the server to be queried?
- Can you see indicators of the Nagios SNMP query in snmpd's log file?
- Can you retrieve the SNMP variables in question manually (i.e. via snmpwalk) from the machine your Nagios server (or NRPE plug-in) is running on?
- If access from the Nagios/NRPE machine doesn't work (and that isn't the machine in question itself :) ), does a local query work?
- If it's only speed & traffic, but other queries work: How does your Nagios server identify the SNMP instance of the network adapter, maybe its instance index has changed?

Regards,
Jens

mpdl
27-Feb-2012, 17:43
Right.

cat /etc/SuSE-release
SUSE Linux Enterprise Server 11 (x86_64)
VERSION = 11
PATCHLEVEL = 1

cat /proc/version
Linux version 2.6.32.46-0.3-xen (geeko@buildhost) (gcc version 4.3.4 [gcc-4_3-branch revision 152973] (SUSE Linux) ) #1 SMP 2011-09-29 17:49:31 +0200

SNMP works, all other checks runs fine.

I get an error remote and local.

This script can use SNMP v1 and v2c but on both i get the following message "Error : Card speed is null, check command options".

You can find the Traffic Check Plugin for Nagios here.

http://svn.centreon.com/trunk/plugins/src/check_centreon_snmp_traffic

The log files from snmp aren't different to logs before the update.

The nagios plugin is working in nagios and manually.

If run the check on a non updated VM i get a result like this

Traffic In : 0.00 b/s (0.0 %), Out : 0.00 b/s (0.0 %) - Total RX Bits In : 16.42 GB, Out : 14.22 Gb|traffic_in=0,0Bits/s;8000000;9500000;0;10000000 traffic_out=0,0Bits/s;8000000;9500000;0;10000000

On the updated VM

Error : Card speed is null, check command options

I don't think that it's a problem in Nagios/NRPE.

Best regards

Benjamin

jmozdzen
27-Feb-2012, 17:58
Benjamin,

how do you reference the network card within your Nagios configuration? I see that the script can both use the interface name or the interface index. Maybe the used value has changed after the update?

> I don't think that it's a problem in Nagios/NRPE.

I think so, too - but it might require a Nagios config change to adopt to the new situation after the update.

The code in question is


if (defined($opt_T)){ $speed_card = $opt_T * 1000000; } else { $speed_card = $result->{$OID_SPEED}; if (!$speed_card && !defined($opt_T)) { print "Error : Card speed is null, check command options\n"; exit $ERRORS{'UNKNOWN'}; } }

Maybe you should insert a printf statement to check the value of OID_SPEED so you can check manually why the script receives a speed of "0" for the queried interface...
Regards,
Jens

jmozdzen
27-Feb-2012, 18:00
Sorry for the mis-formatting... but as you have the source code, you can easily identify the lines by searching for the error message.

Regards,
Jens

mpdl
28-Feb-2012, 09:32
Ok i tested both.

If i start a check with the interface name i get the same result as the interface index (default).

With option -s i got this result.

Interface 1 :: lo
:: up
Interface 2 :: eth0
:: up

If i test this command on a non updated SLES VM i get the same result successfully on both method.

Regards
Benjamin

mpdl
28-Feb-2012, 10:23
Ok new status.

I checked the SLES Patches.
And i focus me on net-snmp update from 5.4.2.1-8.5.1 to 5.4.2.1-8.12.6.1 on following packages libsnmp15, net-snmp, perl-SNMP and snmp-mibs.
If i downgrade this packages on the updated VM the nagios script run successful.

The result something was changed on net-snmp which block request to the value or change the OID of the value net speed.

Regards

Benjamin

mpdl
01-Mar-2012, 14:16
Should i wait for a new patch the snmp packages (like net-snmp) or should i downgrade this packages? The last option is to deactivate network load.

jmozdzen
02-Mar-2012, 11:27
Should i wait for a new patch the snmp packages (like net-snmp) or should i downgrade this packages? The last option is to deactivate network load.

If none of the update reasons are critical to your installation, I'd opt for a downgrade to get things operative again... and then either contact support or dig out the root cause yourself in ie a test installation :/.

Regards,
Jens

mstatman
06-Mar-2012, 17:25
FWIW, the snmp 5.4.2.1-8.12.5.1 update on SLES11SP1 x64 also breaks hp-snmp-agents (from hp/Compaq psp 8.70); this on a physical machine not a VM. Successfully back-rev'd the 4 snmp packages to 5.4.2.1-8.5.1 and now all is happy. Reproduced this on 3 servers.

mpdl
08-Mar-2012, 14:39
I tested version 5.4.2.1-8.12.6.1.
And if you Upgrade to SP2 you get also this version and than you can't reinstall 5.4.2.1-8.5.1 from Yast.
One point to what to plan the upgrade.