check_snmp problem...
Jorge Frater
jfrater at fratec.com
Wed Jan 5 20:11:25 CET 2005
That is correct.
What I did is change the delimiter value from "=" to ".0" in the
check_snmp.c and recompiled it. (line 190 or so)
Just added
char *newdeli = ".0";
delimiter = newdeli;
right before
ptr = strstr (prt, delimiter);
This works fine for me because the answer string has no other instances
of ".0"
I'm sure there are many smart ways to this, but since I'm not a C
programmer that's all I could do.;-)
Jorge Frater B.
-----Mensaje original-----
De: nagios-users-admin at lists.sourceforge.net
[mailto:nagios-users-admin at lists.sourceforge.net] En nombre de
scott_yem at agilent.com
Enviado el: Martes, 04 de Enero de 2005 06:49 p.m.
Para: jfrater at fratec.com; nagios-users at lists.sourceforge.net
Asunto: RE: [Nagios-users] check_snmp problem...
I found the same problem. I found the answer by running check_snmp and
snmpget from the command line. It appears the response has changed some
and you will want to add something like "INTEGER: " in front of your
expected response.
Scott Yem
Research Computing Services
Agilent Laboratories
_____
From: nagios-users-admin at lists.sourceforge.net
[mailto:nagios-users-admin at lists.sourceforge.net] On Behalf Of Jorge
Frater
Sent: Monday, January 03, 2005 5:02 PM
To: nagios-users at lists.sourceforge.net
Subject: [Nagios-users] check_snmp problem...
Dear list:
I've been using Nagios for over 2 years now on a server running Mandrake
9.0, last week I upgraded it to mandrake 10.1
Since then the check_snmp won't work
Now snmpget does work and gives the correct reading: "37" which is the
temperature of this APC UPS but the response is always "SNMP problem -
No data received from host"
# /usr/local/nagios/libexec/check_snmp -H 192.168.1.10 -o
1.3.6.1.4.1.318.1.1.1.2.2.2.0 -v
/usr/bin/snmpget -t 1 -r 9 -m ALL -v 1 -c public 192.168.1.10:161
1.3.6.1.4.1.318.1.1.1.2.2.2.0
SNMPv2-SMI::enterprises.318.1.1.1.2.2.2.0 37
SNMP problem - No data received from host
CMD: /usr/bin/snmpget -t 1 -r 9 -m ALL -v 1 -c public 192.168.1.10:161
1.3.6.1.4.1.318.1.1.1.2.2.2.0
Thanks.
Jorge Frater B.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20050105/6a36c1d2/attachment.html>
More information about the Users
mailing list