Huawei Switch Check Nagios Plugin


At Nagios Exchange I ran over a plugin for “3com” switches.
It’s for the ones that are Huawei at their core, then got sold as H3C or 3Com or now HP.

Here are the dependencies to run it on debian…

Nagios Plugin
wget ‘http://search.cpan.org/CPAN/authors/id/T/TO/TONVOON/Nagios-Plugin-0.34.tar.gz’
tar -xzf Nagios-Plugin-0.34.tar.gz
cd Nagios-Plugin-0.34
# I got many errors here, but in the end it worked.
perl Makefile.PL && make ; make test ; make install
cd ../..
aptitude install libparams-validate-perl libmath-calc-units libconfig-tiny-perl libnet-snmp-perl

Then it should be possible to run it:

waxu0024:/tmp# perl check_3com_health.pl
Usage: check_3com_health.pl -H [ -u|unit ] [ -C ]
[ –only ] [ -w ] [ -c ]
[ –fw ] [ –fc ] [ –pw ] [ –pc ]
[ –mw ] [ –mc ] [ –cw ] [ –cc ]
[ -T |–tcptimeout ]

Missing argument: host

Now one tricky thing.
3com devices will have the enterprise number 43 (3com) wheres H3C/Huawei devices will use (2011)

This will result in the following error:
waxu0024:/tmp# perl check_3com_health.pl -H 192.168.17.57 –fw 4
3COM_HEALTH CRITICAL – SNMP ERROR

I tried to replace the OID in the script, no better. we’ll see.

Advertisements

2 thoughts on “Huawei Switch Check Nagios Plugin

    • Hi,

      yes and no 🙂
      there’s no solution if you have a plain Huawei device – they only report the CPU load, and miss the extended stuff like IRF fabric status. I have tried the latest H3C firmware on them to no avail.

      When the same device has 3Com firmware then things look a lot better and these states become available.
      People who know have told me that it is indeed possible to switch firmwares. If the bootloader code says “3com” then the rest will be also working on it. But they also warned me that switching back may *not* work.

      I haven’t worked on this for some time.
      As far as FAN / CPU monitoring, this is already exposed in the H3C (not Huawei…) MIB and we’ve added a check_mk check for the basics in February. There was also extended Ram statistics available and stuff like that, but nobody wanted them.

      As for IRF I’ll not be using that, my old S5600 disables all kinds of things once you use IRF.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s