Page 1 of 1

Switch CPU Load and Memory

Posted: Mon Mar 26, 2018 12:22 am
by inas.labib
Hi Team,

Im trying to use Nagios to monitor switch Memory and CPU load.

I found the plugin check_snmp_load.pl


Since we are using snmp v3 i could find the optimum results. I tried with multiple entries but couldn't suceed.

Here i entered as below. please suggest the correct way. also provide me a plugin for memory of switch

root@server:/usr/local/nagios/libexec# ./check_snmp_load1.pl -H 10.1x.xx.xxx -C -v3 -l xxxx ; -x yyyyyy -X yyyyyy -L md5,des -w 50,50,50 -c 7-,70,70 -T cisco

Unknown option: 3
Can't mix snmp v1,2c,3 protocols!
Usage: ./check_snmp_load1.pl [-v] -H <host> -C <snmp_community> [-2] | (-l login -x passwd [-X pass -L <authp>,<privp>]) [-p <port>] -w <warn level> -c <crit level> -T=[stand|netsl|netsc|as400|cisco|cata|c5500|nsc|fg|bc|nokia|hp|lp|hpux] [-f] [-t <timeout>] [-V]
-bash: -x: command not found
root@wp1rngs02t:/usr/local/nagios/libexec#

Re: Switch CPU Load and Memory

Posted: Mon Mar 26, 2018 10:13 am
by lmiltchev
You are using "-C", which implies the use of v1 or v2c... Also, looking at the plugin's help options, I don't believe you need to pass the protocol if using v3. Try running:

Code: Select all

./check_snmp_load1.pl -H 10.1x.xx.xxx -C -v3 -l xxxx -x yyyyyy -X yyyyyy -L md5,des -T cisco -w 50,50,50 -c 70,70,70
Note: If this doesn't work, increase verbosity by adding the "-v" flag to your command, and post it on the forum, along with the output of it. Remove sensitive info.

As far as the memory goes, you could try using the "check_snmp_mem.pl" plugin. See an example below:

Code: Select all

/usr/local/nagios/libexec/check_snmp_mem.pl -H x.x.x.x -l xxxx -x yyyy -X yyyy -L sha,aes -I -w 80 -c 90
MEMPOOL_DMA:74%,System memory:50%,MEMPOOL_GLOBAL_SHARED:22% : 40% :  ; OK