Modifying Plugin check_snmp_load.pl
Posted: Fri Aug 14, 2015 2:36 am
Hello,
I am getting "UNKNOWN" error while trying to monitor CPU usage for a solaris server.
We have checked in the script "check_snmp_load.pl" and found that"stand" is for windows and we tried with "netsl" and "netsc"
It complained about usage of the command when used netsl
It worked with netscm, even though it is giving cpu used output.
When using "stand" for another server.
I have few queries here.
1. How can I update the command with "netsl" so that "check_snmp_load.pl" uses this parameter when doing the service check.
2. Can I edit the command only for this particular host ?
3. What is the difference between "CPU load" and "CPU used" outputs in terms of nagios checks?
Regards
Tino
I am getting "UNKNOWN" error while trying to monitor CPU usage for a solaris server.
Code: Select all
COMMAND: /usr/local/nagios/libexec/check_snmp_load.pl -H HOSTNAME -C STRING -w 90 -c 95 -T stand -f
OUTPUT: Can't find CPU usage information : UNKNOWNstand : standard MIBII (works with Windows),
can handle multiple CPU.
netsl : linux load provided by Net SNMP (1,5 & 15 minutes values)
netsc : cpu usage given by net-snmp (100-idle)
It complained about usage of the command when used netsl
Code: Select all
root@ ~]# /usr/local/nagios/libexec/check_snmp_load.pl -H HOSTNAME -C STRING -w 99 -c 100 -T netsl -f
3 warnings and critical !It worked with netscm, even though it is giving cpu used output.
Code: Select all
[root@ ~]# /usr/local/nagios/libexec/check_snmp_load.pl -H HOSTNAME -C STRING -w 99 -c 100 -T netsc -f
CPU used 11.0% (<99) : OK | cpu_prct_used=11%;99;100Code: Select all
[root@ ~]# /usr/local/nagios/libexec/check_snmp_load.pl -H HOSTNAME -C STRING -2 -w 99 -c 100 -T stand -f
1 CPU, load 1.0% < 99% : OK | cpu_prct_used=1%;99;1001. How can I update the command with "netsl" so that "check_snmp_load.pl" uses this parameter when doing the service check.
2. Can I edit the command only for this particular host ?
3. What is the difference between "CPU load" and "CPU used" outputs in terms of nagios checks?
Regards
Tino