<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns="http://www.w3.org/TR/REC-html40">

<head>
<meta http-equiv=Content-Type content="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 11 (filtered medium)">
<!--[if !mso]>
<style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style>
<![endif]-->
<style>
<!--
 /* Font Definitions */
 @font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman";}
p.MsoToc1, li.MsoToc1, div.MsoToc1
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:Arial;
        font-weight:bold;}
p.MsoToc2, li.MsoToc2, div.MsoToc2
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:Arial;
        font-weight:bold;}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {color:purple;
        text-decoration:underline;}
span.emailstyle17
        {font-family:Arial;
        color:windowtext;}
span.EmailStyle20
        {mso-style-type:personal-reply;
        font-family:Arial;
        color:navy;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
        {page:Section1;}
 /* List Definitions */
 @list l0
        {mso-list-id:1719818464;
        mso-list-template-ids:-1159922898;}
@list l0:level1
        {mso-level-number-format:bullet;
        mso-level-text:\F0B7;
        mso-level-tab-stop:.5in;
        mso-level-number-position:left;
        text-indent:-.25in;
        mso-ansi-font-size:10.0pt;
        font-family:Symbol;}
ol
        {margin-bottom:0in;}
ul
        {margin-bottom:0in;}
-->
</style>

</head>

<body lang=EN-US link=blue vlink=purple>

<div class=Section1>

<p class=MsoNormal><font size=2 color="#333399" face=Arial><span
style='font-size:10.0pt;font-family:Arial;color:#333399'>When you ran it by
hand as nagios user, did you include all relevant arguments?<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color="#333399" face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New";color:#333399'>/opt/nagios/plugins/check_snmp_load.pl
–H x.x.x.x –C public –w 2,2,3 –c 3,3,4 –L<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color="#333399" face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New";color:#333399'><o:p> </o:p></span></font></p>

<p class=MsoNormal><font size=2 color="#333399" face=Arial><span
style='font-size:10.0pt;font-family:Arial;color:#333399'>Another trick to
verify that you’re running it by hand correctly is to do <o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color="#333399" face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New";color:#333399'>define
command{</span></font><font color="#333399" face="Courier New"><span
style='font-family:"Courier New";color:#333399'><o:p></o:p></span></font></p>

<p class=MsoNormal style='margin-left:.5in'><font size=2 color="#333399"
face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New";
color:#333399'>      
command_name    check_linux_load</span></font><font
color="#333399" face="Courier New"><span style='font-family:"Courier New";
color:#333399'><o:p></o:p></span></font></p>

<p class=MsoNormal style='margin-left:.5in'><font size=2 color="#333399"
face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New";
color:#333399'>       command_line   
echo $USER1$/check_snmp_load.pl -H $HOSTADDRESS$ -C public -w $ARG1$ -c $ARG2$
-L</span></font><font color="#333399" face="Courier New"><span
style='font-family:"Courier New";color:#333399'><o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color="#333399" face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New";color:#333399'>}  <o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color="#333399" face=Arial><span
style='font-size:10.0pt;font-family:Arial;color:#333399'>The command will
appear in the UI, and then you can run what is shown.  <o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color="#333399" face=Arial><span
style='font-size:10.0pt;font-family:Arial;color:#333399'><o:p> </o:p></span></font></p>

<p class=MsoNormal><font size=2 color="#333399" face=Arial><span
style='font-size:10.0pt;font-family:Arial;color:#333399'>“No output from
plugin” means just that.  Nagios is expecting some kind of statement
about the check.  Your check is not outputting anything.   You’re
getting a difference between running by hand and running automatically. 
Get those to be the same, it’ll be easier to track down.<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color="#333399" face=Arial><span
style='font-size:10.0pt;font-family:Arial;color:#333399'><o:p> </o:p></span></font></p>

<p class=MsoNormal><font size=2 color="#333399" face=Arial><span
style='font-size:10.0pt;font-family:Arial;color:#333399'>-Lori<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p> </o:p></span></font></p>

<div>

<div class=MsoNormal align=center style='margin-left:.5in;text-align:center'><font
size=3 face="Times New Roman"><span style='font-size:12.0pt'>

<hr size=2 width="100%" align=center tabindex=-1>

</span></font></div>

<p class=MsoNormal style='margin-left:.5in'><b><font size=2 face=Tahoma><span
style='font-size:10.0pt;font-family:Tahoma;font-weight:bold'>From:</span></font></b><font
size=2 face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma'>
nagios-users-admin@lists.sourceforge.net [mailto:nagios-users-admin@lists.sourceforge.net]
<b><span style='font-weight:bold'>On Behalf Of </span></b>Dennis Hopp<br>
<b><span style='font-weight:bold'>Sent:</span></b> Monday, August 22, 2005 3:54
PM<br>
<b><span style='font-weight:bold'>To:</span></b>
nagios-users@lists.sourceforge.net<br>
<b><span style='font-weight:bold'>Subject:</span></b> [Nagios-users] Perl
plugins: No output from plugin</span></font><o:p></o:p></p>

</div>

<p class=MsoNormal style='margin-left:.5in'><font size=3 face="Times New Roman"><span
style='font-size:12.0pt'><o:p> </o:p></span></font></p>

<p class=MsoNormal style='margin-left:.5in'><font size=2 face=Arial><span
style='font-size:10.0pt;font-family:Arial'>I’m trying to use the
check_snmp_load.pl and check_snmp_storage.pl</span></font><o:p></o:p></p>

<p class=MsoNormal style='margin-left:.5in'><font size=2 face=Arial><span
style='font-size:10.0pt;font-family:Arial'> </span></font><o:p></o:p></p>

<p class=MsoNormal style='margin-left:.5in'><font size=2 face=Arial><span
style='font-size:10.0pt;font-family:Arial'>I can run the plugin from the
command line (as both root and nagios user) and get the right results but when
it’s fired off automatically I keep getting “No output from
plugin”.</span></font><o:p></o:p></p>

<p class=MsoNormal style='margin-left:.5in'><font size=2 face=Arial><span
style='font-size:10.0pt;font-family:Arial'> </span></font><o:p></o:p></p>

<p class=MsoNormal style='margin-left:.5in'><font size=2 face=Arial><span
style='font-size:10.0pt;font-family:Arial'>Here are the relevant config:</span></font><o:p></o:p></p>

<p class=MsoNormal style='margin-left:.5in'><font size=2 face=Arial><span
style='font-size:10.0pt;font-family:Arial'> </span></font><o:p></o:p></p>

<p class=MsoNormal style='margin-left:.5in'><font size=2 face=Arial><span
style='font-size:10.0pt;font-family:Arial'>define  service{</span></font><o:p></o:p></p>

<p class=MsoNormal style='margin-left:.5in'><font size=2 face=Arial><span
style='font-size:10.0pt;font-family:Arial'>       
use                            
generic-service</span></font><o:p></o:p></p>

<p class=MsoNormal style='margin-left:.5in'><font size=2 face=Arial><span
style='font-size:10.0pt;font-family:Arial'>       
hostgroup_name                 
LinuxServers</span></font><o:p></o:p></p>

<p class=MsoNormal style='margin-left:.5in'><font size=2 face=Arial><span
style='font-size:10.0pt;font-family:Arial'>       
service_description            
LOAD</span></font><o:p></o:p></p>

<p class=MsoNormal style='margin-left:.5in'><font size=2 face=Arial><span
style='font-size:10.0pt;font-family:Arial'>       
is_volatile                    
0</span></font><o:p></o:p></p>

<p class=MsoNormal style='margin-left:.5in'><font size=2 face=Arial><span
style='font-size:10.0pt;font-family:Arial'>       
check_period                   
24x7</span></font><o:p></o:p></p>

<p class=MsoNormal style='margin-left:.5in'><font size=2 face=Arial><span
style='font-size:10.0pt;font-family:Arial'>       
max_check_attempts             
3</span></font><o:p></o:p></p>

<p class=MsoNormal style='margin-left:.5in'><font size=2 face=Arial><span
style='font-size:10.0pt;font-family:Arial'>       
normal_check_interval          
5</span></font><o:p></o:p></p>

<p class=MsoNormal style='margin-left:.5in'><font size=2 face=Arial><span
style='font-size:10.0pt;font-family:Arial'>       
retry_check_interval           
1</span></font><o:p></o:p></p>

<p class=MsoNormal style='margin-left:.5in'><font size=2 face=Arial><span
style='font-size:10.0pt;font-family:Arial'>       
contact_groups                 
domain-admins</span></font><o:p></o:p></p>

<p class=MsoNormal style='margin-left:.5in'><font size=2 face=Arial><span
style='font-size:10.0pt;font-family:Arial'>       
check_command        
          check_linux_load!2,2,3!3,3,4</span></font><o:p></o:p></p>

<p class=MsoNormal style='margin-left:.5in'><font size=2 face=Arial><span
style='font-size:10.0pt;font-family:Arial'>}</span></font><o:p></o:p></p>

<p class=MsoNormal style='margin-left:.5in'><font size=2 face=Arial><span
style='font-size:10.0pt;font-family:Arial'> </span></font><o:p></o:p></p>

<p class=MsoNormal style='margin-left:.5in'><font size=2 face=Arial><span
style='font-size:10.0pt;font-family:Arial'> </span></font><o:p></o:p></p>

<p class=MsoNormal style='margin-left:.5in'><font size=2 face=Arial><span
style='font-size:10.0pt;font-family:Arial'>define command{</span></font><o:p></o:p></p>

<p class=MsoNormal style='margin-left:.5in'><font size=2 face=Arial><span
style='font-size:10.0pt;font-family:Arial'>       
command_name    check_linux_load</span></font><o:p></o:p></p>

<p class=MsoNormal style='margin-left:.5in'><font size=2 face=Arial><span
style='font-size:10.0pt;font-family:Arial'>       
command_line    $USER1$/check_snmp_load.pl -H $HOSTADDRESS$ -C
public -w $ARG1$ -c $ARG2$ -L</span></font><o:p></o:p></p>

<p class=MsoNormal style='margin-left:.5in'><font size=2 face=Arial><span
style='font-size:10.0pt;font-family:Arial'>}</span></font><o:p></o:p></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p> </o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'> </span></font><o:p></o:p></p>

<p class=MsoNormal style='margin-left:.5in'><font size=2 face=Arial><span
style='font-size:10.0pt;font-family:Arial'>$USER1$=/opt/nagios/plugins</span></font><o:p></o:p></p>

<p class=MsoNormal style='margin-left:.5in'><font size=2 face=Arial><span
style='font-size:10.0pt;font-family:Arial'> </span></font><o:p></o:p></p>

<p class=MsoNormal style='margin-left:.5in'><font size=2 face=Arial><span
style='font-size:10.0pt;font-family:Arial'>[root@cartier plugins]# ls -l
/opt/nagios/plugins/check_snmp_load.pl</span></font><o:p></o:p></p>

<p class=MsoNormal style='margin-left:.5in'><font size=2 face=Arial><span
style='font-size:10.0pt;font-family:Arial'>-rwxr-xr-x  1 root root 14168
Aug 22 12:42 /opt/nagios/plugins/check_snmp_load.pl</span></font><o:p></o:p></p>

<p class=MsoNormal style='margin-left:.5in'><font size=2 face=Arial><span
style='font-size:10.0pt;font-family:Arial'> </span></font><o:p></o:p></p>

<p class=MsoNormal style='margin-left:.5in'><font size=2 face=Arial><span
style='font-size:10.0pt;font-family:Arial'>Thanks,</span></font><o:p></o:p></p>

<p class=MsoNormal style='margin-left:.5in'><font size=2 face=Arial><span
style='font-size:10.0pt;font-family:Arial'> </span></font><o:p></o:p></p>

<p class=MsoNormal style='margin-left:.5in'><font size=2 face=Arial><span
style='font-size:10.0pt;font-family:Arial'>--Dennis</span></font><o:p></o:p></p>

<p class=MsoNormal style='margin-left:1.0in;text-indent:-.25in;mso-list:l0 level1 lfo1'><![if !supportLists]><font
size=2 face=Symbol><span style='font-size:10.0pt;font-family:Symbol'><span
style='mso-list:Ignore'>·<font size=1 face="Times New Roman"><span
style='font:7.0pt "Times New Roman"'>        
</span></font></span></span></font><![endif]><font size=1 face=Arial><span
style='font-size:7.5pt;font-family:Arial'>"Privileged/Confidential
Information of Communications Supply Corp. may be contained in this
message.  If you are not the addressee of this message, you may not copy,
use or deliver this message to anyone.  In such event, you should destroy
the message and kindly notify the sender by reply e-mail.  It is
understood that opinions or conclusions that do not relate to the official
business of Communications Supply Corp. are neither given nor endorsed by
Communications Supply Corp."</span></font><o:p></o:p></p>

<div>

<p class=MsoNormal style='margin-left:1.0in'><font size=3 face="Times New Roman"><span
style='font-size:12.0pt'> <o:p></o:p></span></font></p>

</div>

<p class=MsoNormal style='margin-left:.5in'><font size=3 face="Times New Roman"><span
style='font-size:12.0pt'> <o:p></o:p></span></font></p>

</div>

</body>

</html>