There is a debug level you can set in nagios.cfg that will show you
all commands being executed - an easier way would be to make a shell
wrapper for check_int that logs all args and then execs them with the
real check_int.  Something like

1.  Copy check_int to check_int.bin
2.  Make check_int a shell script like

!#/bin/bash

echo "$*" >> /path/tlo/logfile.log
exec /path/to/check_int.bin $*


Now whenever check_int is called, the full command line and args will
be appended to the log each run for you to inspect - without cranking
up debug or restarting nagios.

Max

On 2/22/11, socomm <[email protected]> wrote:
> On Mon, 21 Feb 2011 20:23:54 -0500, Allan Clark
> <[email protected]>
> wrote:
>> Can you confirm that "%%" is needed for a single "%" token?  I don't
>> remember that being needed, but I don't use "%" in my commands.  I
>> could see "$" needing doubling up due to token replacement.
>
> Apparently check_nt will returns same code whether I pass it the '%' sign
> or not, however the double '%' was a typo which I've corrected.
>
>> Also, see about increasing logging, see if you can log what the actual
>> command is running as, and what it responds as a result code.  Maybe
>> proving that the check_nt script is being called in the way you think
>> it is can help bisect the problem.
>
> I am looking for a way to log commands, but best I've found is the debug
> option which will give me option to log commands to a debug file. However,
> the output I get is the following:
>
> -----  OUTPUT  -----
>
> Raw Command Input: /usr/lib/nagios/plugins/check_nrpe -H $HOSTADDRESS$ -c
> $ARG1$
> Expanded Command Output: /usr/lib/nagios/plugins/check_nrpe -H
> $HOSTADDRESS$ -c $ARG1$
>
> --------------------
>
> Which I'm not sure why variables are not being expanded to the actual
> arguments being passed. Anyone more familiar as what I may need to do to
> view the expanded variables being passed?
>
>
>
>
> ------------------------------------------------------------------------------
> Free Software Download: Index, Search & Analyze Logs and other IT data in
> Real-Time with Splunk. Collect, index and harness all the fast moving IT
> data
> generated by your applications, servers and devices whether physical,
> virtual
> or in the cloud. Deliver compliance at lower cost and gain new business
> insights. http://p.sf.net/sfu/splunk-dev2dev
> _______________________________________________
> Nagios-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/nagios-users
> ::: Please include Nagios version, plugin version (-v) and OS when reporting
> any issue.
> ::: Messages without supporting info will risk being sent to /dev/null
>

------------------------------------------------------------------------------
Free Software Download: Index, Search & Analyze Logs and other IT data in 
Real-Time with Splunk. Collect, index and harness all the fast moving IT data 
generated by your applications, servers and devices whether physical, virtual
or in the cloud. Deliver compliance at lower cost and gain new business 
insights. http://p.sf.net/sfu/splunk-dev2dev 
_______________________________________________
Nagios-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting 
any issue. 
::: Messages without supporting info will risk being sent to /dev/null

Reply via email to