check_snmp_load and check_snmp_mem output (null) issue.
Ronald Prague
rprague at gmail.com
Sun Feb 10 21:48:41 CET 2013
So I have an odd issue. Running check_snmp_mem.pl and
check_snmp_load.plfrom Manbulon's check_snmp plugins is returning
(null) and I can't figure
out why.
(The firewall is an Astaro/Sophos UTM 320)
I tried turning on debugging, this is the output:
[1360352407.069695] [016.1] [pid=23937] HOST: clk_astaro, SERVICE: Firewall
Load , CHECK TYPE: Active, OPTIONS: 0, SCHEDULED: Yes, RESCHEDULE: Yes,
EXITED OK: Yes, RETURN CODE: 2, OUTPUT: (null)
If I run the command by hand, it works fine, as the nagios user, I've also
verified the nagios user has write access to /tmp just in case:
nagios at monitor:/usr/local/nagios# /usr/local/nagios/libexec/
check_snmp_load.pl -H 192.168.0.2 -C public -T stand -w 25 -c 90
2 CPU, average load 5.0% < 25% : OK
Here's the command:
define command{
command_name check_snmp_load_v1
command_line $USER1$/check_snmp_load.pl -H $HOSTADDRESS$ $USER7$ -T
$ARG1$ -w $ARG2$ -c $ARG3$ $ARG4$
}
And the service definition:
define service{
use generic-service ; Inherit values from a
template
host_name clk_astaro
service_description Firewall Load
check_command check_snmp_load_v1!stand!25!90
}
$USER1$ and $USER7$ are defined in resource.cfg:
$USER1$=/usr/local/nagios/libexec
$USER7$=-C public
The only changes to the plugin are for fixing the error for a version
string, from this page: https://wiki.icinga.org/display/howtos/check_snmp
Argument "v6.0.1" isn't numeric in numeric lt (<)
This sources from old plugins getting a changed version string in
libnet-snmp-perl. This can be fixed by replacing all occurences of the
integer less than equal by the string compare 'lt'.
# sed -i 's/Net::SNMP->VERSION < 4/Net::SNMP->VERSION lt 4/g' check_snmp_mem.pl
Any ideas? All of the other services/checks work fine.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20130210/4e0b87c4/attachment.html>
-------------- next part --------------
------------------------------------------------------------------------------
Free Next-Gen Firewall Hardware Offer
Buy your Sophos next-gen firewall before the end March 2013
and get the hardware for free! Learn more.
http://p.sf.net/sfu/sophos-d2d-feb
-------------- next part --------------
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue.
::: Messages without supporting info will risk being sent to /dev/null
More information about the Users
mailing list