<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7638.1">
<TITLE>RE: [Nagios-users] check_rpc returns Unknown "Program -H is notdefined"</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/plain format -->

<P><FONT SIZE=2>If you look at the Perl code (at least for the latest version of the plugin), that error message can only result when the code thinks that -H is being passed as an argument (not a switch), or as the argument to -C.<BR>
<BR>
I tried various broken invocations to reproduce your problem, but I couldn't.  Are you using the latest version of the plugin?<BR>
<BR>
My version:   check_rpc (nagios-plugins 1.4.2) 1.8<BR>
<BR>
It's extremely frustrating that there's no simple way to view the exact command being invoked by nagios.  It would seem likely that there's a spurious character or something else weird about the way it's being invoked.<BR>
<BR>
-John<BR>
<BR>
<BR>
<BR>
-----Original Message-----<BR>
From: nagios-users-bounces@lists.sourceforge.net on behalf of Scott Dungan<BR>
Sent: Sat 7/8/2006 12:08 PM<BR>
To: Hugo van der Kooij<BR>
Cc: nagios-users@lists.sourceforge.net<BR>
Subject: Re: [Nagios-users] check_rpc returns Unknown "Program -H is notdefined"<BR>
<BR>
<BR>
Hugo van der Kooij wrote:<BR>
<BR>
>On Fri, 7 Jul 2006, Scott Dungan wrote:<BR>
><BR>
> <BR>
><BR>
>>I am having a problem with the check_rpc command and I am hoping<BR>
>>someone can point out where I am going wrong.<BR>
>><BR>
>>when I run the following from the terminal:<BR>
>><BR>
>>  sh-3.00$ ./check_rpc -H 131.215.64.60 nfs -c 4<BR>
>><BR>
>>I get this:<BR>
>><BR>
>>  OK: RPC program nfs version 4 udp running<BR>
>>   <BR>
>><BR>
><BR>
>The important question is: Who are you at this point? user 'scott', user<BR>
>'root' or user 'nagios'?<BR>
><BR>
> <BR>
><BR>
I am running the command line test as the user nagios just like all of<BR>
the other check command tests.<BR>
<BR>
>>I have created the following in checkcommands.cfg:<BR>
>><BR>
>>  # 'check_rpc' command definition<BR>
>>  define command{<BR>
>>          command_name    check_rpc<BR>
>>          command_line    $USER1$/check_rpc -H $HOSTADDRESS$ nfs -c 4<BR>
>>          }<BR>
>>   <BR>
>><BR>
><BR>
>Here you run with a full path and you did not do so in the manual test. So<BR>
>your current work directory is also a relevant factor.<BR>
><BR>
> <BR>
><BR>
The working directory for "check_rpc" is the same as all of the other<BR>
check commands. The error would indicate that the command is actually<BR>
executing, yet it somehow does not know what to do with the -H switch<BR>
when run by nagios per the services.cfg configuration.<BR>
<BR>
Thanks,<BR>
<BR>
Scott.<BR>
<BR>
<BR>
<BR>
Using Tomcat but need to do more? Need to support web services, security?<BR>
Get stuff done quickly with pre-integrated technology to make your job easier<BR>
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo<BR>
<A HREF="http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642">http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642</A><BR>
_______________________________________________<BR>
Nagios-users mailing list<BR>
Nagios-users@lists.sourceforge.net<BR>
<A HREF="https://lists.sourceforge.net/lists/listinfo/nagios-users">https://lists.sourceforge.net/lists/listinfo/nagios-users</A><BR>
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue.<BR>
::: Messages without supporting info will risk being sent to /dev/null<BR>
<BR>
<BR>
</FONT>
</P>

</BODY>
</HTML>