<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.3790.4186" name=GENERATOR></HEAD>
<BODY>
<DIV><SPAN class=228560621-18012008><FONT face=Arial size=2>I have the snmpd
running on a client box. I have nagois monitoring this box without any
issues. I decided to implement a new plugin I found,
check_snmp_storage.pl. From the "nagios server" I can issue this command
to the client box, and I get a valid response, e.g.</FONT></SPAN></DIV>
<DIV><SPAN class=228560621-18012008><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=228560621-18012008><FONT face=Arial size=2>[root@nagois_server
]# su - nagois</FONT></SPAN></DIV>
<DIV><SPAN class=228560621-18012008><FONT face=Arial
size=2>-sh-3.00$ cd
/usr/lib64/nagios/plugins</FONT></SPAN></DIV>
<DIV><SPAN class=228560621-18012008><FONT face=Arial
size=2>-sh-3.00$ ./check_snmp_storage.pl -H star -C public -m
/temp -w 95 -c 98 -f</FONT></SPAN></DIV>
<DIV><SPAN class=228560621-18012008><FONT face=Arial size=2>/temp:
2%used(35MB/1984MB) (<95%) : OK |
'/temp'=35MB;1885;1945:0:1984</FONT></SPAN></DIV>
<DIV><SPAN class=228560621-18012008><FONT face=Arial
size=2>-sh-3.00$</FONT></SPAN></DIV>
<DIV><SPAN class=228560621-18012008><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=228560621-18012008><FONT face=Arial size=2>But, when I
implement this plugin in Nagios, I get the following response: "Put snmp
login info!"</FONT></SPAN></DIV>
<DIV><SPAN class=228560621-18012008><FONT face=Arial size=2>Why does the plugin
work from the shell prompt, but fails when run from Nagios?</FONT></SPAN></DIV>
<DIV><SPAN class=228560621-18012008><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=228560621-18012008><FONT face=Arial size=2>My service is
defined as:</FONT></SPAN></DIV>
<DIV><SPAN class=228560621-18012008><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=228560621-18012008><FONT face=Arial size=2>define
service{</FONT></SPAN></DIV>
<DIV><SPAN class=228560621-18012008> <FONT face=Arial
size=2>use
generic-service</FONT></SPAN></DIV>
<DIV><SPAN class=228560621-18012008> <FONT face=Arial
size=2>host_name
star</FONT></SPAN></DIV>
<DIV><SPAN class=228560621-18012008> <FONT face=Arial
size=2>service_description snmp /temp Free
Space</FONT></SPAN></DIV>
<DIV><SPAN class=228560621-18012008> <FONT face=Arial
size=2>is_volatile
0</FONT></SPAN></DIV>
<DIV><SPAN class=228560621-18012008> <FONT face=Arial
size=2>check_period
24x7</FONT></SPAN></DIV>
<DIV><SPAN class=228560621-18012008> <FONT face=Arial
size=2>max_check_attempts 3</FONT></SPAN></DIV>
<DIV><SPAN class=228560621-18012008> <FONT face=Arial
size=2>normal_check_interval 5</FONT></SPAN></DIV>
<DIV><SPAN class=228560621-18012008> <FONT face=Arial
size=2>retry_check_interval
1</FONT></SPAN></DIV>
<DIV><SPAN class=228560621-18012008> <FONT face=Arial
size=2>contact_groups
linux-admins</FONT></SPAN></DIV>
<DIV><SPAN class=228560621-18012008> <FONT face=Arial
size=2>notification_interval
1440</FONT></SPAN></DIV>
<DIV><SPAN class=228560621-18012008> <FONT face=Arial
size=2>notification_period
24x7</FONT></SPAN></DIV>
<DIV><SPAN class=228560621-18012008> <FONT face=Arial
size=2>notification_options
w,u,c,r</FONT></SPAN></DIV>
<DIV><SPAN class=228560621-18012008> <FONT face=Arial
size=2>check_command
check_snmp_storage!-C public -m /temp -w 95 -c 98 -f!</FONT></SPAN></DIV>
<DIV><SPAN class=228560621-18012008><FONT face=Arial size=2>
}</FONT></SPAN></DIV>
<DIV><SPAN class=228560621-18012008><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=228560621-18012008><FONT face=Arial size=2>My command is
defined as:</FONT></SPAN></DIV>
<DIV><SPAN class=228560621-18012008><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=228560621-18012008><FONT face=Arial size=2>define
command{</FONT></SPAN></DIV>
<DIV><SPAN class=228560621-18012008> <FONT face=Arial
size=2>command_name check_snmp_storage</FONT></SPAN></DIV>
<DIV><SPAN class=228560621-18012008> <FONT face=Arial
size=2>command_line $USER$/check_snmp_storage.pl -H
$HOSTADDRESS$ $ARG1$</FONT></SPAN></DIV>
<DIV><SPAN class=228560621-18012008> <FONT face=Arial
size=2>}</FONT></SPAN></DIV>
<DIV><SPAN class=228560621-18012008><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=228560621-18012008><FONT face=Arial size=2>Can anyone help me
here?</FONT></SPAN></DIV>
<DIV><SPAN class=228560621-18012008><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=228560621-18012008></SPAN> </DIV></BODY></HTML>