<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META content="MSHTML 5.50.4134.600" name=GENERATOR></HEAD>
<BODY>
<DIV><SPAN class=042164717-22072002><FONT face=Arial
size=2>Hi,</FONT></SPAN></DIV>
<DIV><SPAN class=042164717-22072002><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=042164717-22072002><FONT face=Arial size=2>I am trying to use
check_snmp to get the system uptime and displayed in Nagios.</FONT></SPAN></DIV>
<DIV><SPAN class=042164717-22072002><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=042164717-22072002><FONT face=Arial size=2>Here's my command
line output: </FONT></SPAN></DIV>
<DIV><SPAN class=042164717-22072002><FONT face=Arial size=2>check_snmp -H
10.25.100.28 -o sysUpTime.0 -C public<BR>SNMP WARNING - Timeticks: (25639539) 2
days, 23:13:15.39 </FONT></SPAN></DIV>
<DIV><SPAN class=042164717-22072002><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=042164717-22072002><FONT face=Arial size=2>Here's my
checkcommands.cfg</FONT></SPAN></DIV>
<DIV><SPAN class=042164717-22072002><FONT face=Arial size=2>#
'check_snmp_uptime' command definition<BR>define
command{<BR>
command_name
check_snmp_uptime<BR>
command_line $USER1$/check_snmp -H $HOSTADDRESS$ -o
sysUpTime.0 -w $ARG1$ -C public
}</FONT></SPAN></DIV>
<DIV><SPAN class=042164717-22072002><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=042164717-22072002><FONT face=Arial size=2>Here's my
services.cfg</FONT></SPAN></DIV>
<DIV><SPAN class=042164717-22072002><FONT face=Arial size=2># Generic service
definition template<BR>define
service{<BR>@<BR>/snmp<BR>
service_description
System UpTime<BR>
is_volatile
0<BR>
check_period
24x7<BR>
max_check_attempts
3<BR>
normal_check_interval
1<BR>
retry_check_interval
1<BR>
contact_groups
snmp-admins<BR>
notification_interval
120<BR>
notification_period
24x7<BR>
notification_options
w,u,c,r<BR>
check_command
check_snmp_uptime!20:10<BR>
}</FONT></SPAN></DIV>
<DIV><SPAN class=042164717-22072002><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=042164717-22072002><FONT face=Arial size=2>What I got from
Nagios is</FONT></SPAN></DIV>
<DIV><SPAN class=042164717-22072002><FONT face=Arial size=2>SNMP WARNING
25639539</FONT></SPAN></DIV>
<DIV><SPAN class=042164717-22072002><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=042164717-22072002><FONT face=Arial
size=2>Questions</FONT></SPAN></DIV>
<DIV><SPAN class=042164717-22072002><FONT face=Arial size=2>1. How do I display
"2 days, 23:13:15.39", not the Timeticks: "25639539" ?</FONT></SPAN></DIV>
<DIV><SPAN class=042164717-22072002><FONT face=Arial size=2>2. According to
check_snmp help page, if I use warning integer_rangers (max:min), I should get
ok state. I also try !10:20, it gives me the same result.</FONT></SPAN></DIV>
<DIV><SPAN class=042164717-22072002><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=042164717-22072002><FONT face=Arial size=2>Thanks a
lot,</FONT></SPAN></DIV>
<DIV><SPAN class=042164717-22072002><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=042164717-22072002><FONT face=Arial
size=2>Li</FONT></SPAN></DIV>
<DIV><SPAN class=042164717-22072002><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=042164717-22072002><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=042164717-22072002><FONT face=Arial
size=2></FONT></SPAN> </DIV></BODY></HTML>