View Full Version : probleme avec le check_uptime
romain
03-23-2006, 03:07 PM
Bonjours tous
j'ai un probleme avec le check_graph_uptime, il fonctionne tres bien, SAUF sur une machine
si je tappe: ./check_graph_uptime.pl -H 10.20.0.21 -v1
OK - Uptime (in hundredths of a second): 5253574
si je rajoute -d :
./check_graph_uptime.pl -H 10.20.0.21 -v1 -d
OK - Uptime (in day): 0
et si je tappe la commande uptime sous linux :
14:01:08 up 9 days, 21:36, 1 user, load average: 1.71, 1.55, 1.38
ca doit venir d'un bug du SNMP ... si qq1 a une . :idea:
merci[/code]
surcouf
03-23-2006, 03:20 PM
Bonjours tous
j'ai un probleme avec le check_graph_uptime, il fonctionne tres bien, SAUF sur une machine
Vérifie ce que donne la commande suivante:
$ snmpwalk -v 1 -c public 10.20.0.21 hrSystemUptime
Cela devrait donner quelque chose du genre:
$ snmpwalk -v 1 -c public localhost hrSystemUptime
HOST-RESOURCES-MIB::hrSystemUptime.0 = Timeticks: (27710292) 3 days, 4:58:22.92
romain
03-23-2006, 03:26 PM
merci de ta répoinse aussi rapide
ca me donne ca
snmpwalk -v 1 -c public 10.20.0.21 hrSystemUptime
HOST-RESOURCES-MIB::hrSystemUptime.0 = Timeticks: (5288104) 14:41:21.04
surcouf
03-23-2006, 03:48 PM
merci de ta répoinse aussi rapide
ca me donne ca
snmpwalk -v 1 -c public 10.20.0.21 hrSystemUptime
HOST-RESOURCES-MIB::hrSystemUptime.0 = Timeticks: (5288104) 14:41:21.04
Effectivement, il ne retourne pas le nombre de jours, ce qui pose problème.
romain
03-23-2006, 03:49 PM
c'est bizzard mon histoire ...
je vais essayer de désinstaller l'agent et de le réinstaller
romain
03-23-2006, 06:53 PM
nop,
rien trouvé ...
wistof
03-23-2006, 10:42 PM
hello,
est ce que tu pourrais aller rajouter (pour test/debug) la ligne suivante dans le plugin
$return_result = $result->{$OID};
print "Debug :: " . $return_result ."\n";
et nous donner la sortie du plugin lorsque tu le lances à la main
romain
03-24-2006, 09:52 AM
Bonjour wistof
voila le résultat de ma commande :
nagios:/usr/local/nagios/libexec# ./check_graph_uptime.pl -H 10.20.0.21 -v1
Debug :: 9 hours, 08:08.74
OK - Uptime (in hundredths of a second): 3288874
wistof
03-24-2006, 10:00 AM
hello,
ligne 152 :
$un = $4 + $3 * 100 + $3 * 100 * 60 + $1 * 100 * 60 * 60 ; :arrow: $un = $4 + $3 * 100 + $2 * 100 * 60 + $1 * 100 * 60 * 60 ;
romain
03-24-2006, 10:04 AM
hello
./check_graph_uptime.pl -H 10.20.0.21 -v1 -d
Argument "" isn't numeric in multiplication (*) at ./check_graph_uptime.pl line 149.
OK - Uptime (in day): 0
commande uptime :
uptime
09:07:32 up 10 days, 16:42, 1 user, load average: 2.08, 1.97, 1.83
romain
03-24-2006, 10:10 AM
C pas un probleme du plugin ...
mais un probleme avec mon protocole SNMP
car la commande snmpwalk -v 1 -c public 10.20.0.21 hrSystemUptime
me retourne pas la date
HOST-RESOURCES-MIB::hrSystemUptime.0 = Timeticks: (3393001) 9:25:30.01