setting ENV for checks in commands.cfg

Stuart Browne stuart.browne at ausregistry.com.au
Thu Jul 8 05:17:00 CEST 2010


> -----Original Message-----
> From: Litwin, Matthew [mailto:mlitwin at stubhub.com]
> Sent: Thursday, 8 July 2010 13:01
> To: nagios-users at lists.sourceforge.net
> Subject: [Nagios-users] setting ENV for checks in commands.cfg
> 
> Hi, I need to set up my checks in command.cfg to source an ENV file
> before running a command however I am not sure how I  can do this since
> the semicolon (;) is designated as the comment sign. For instance, I
> want to do something like this:
> 
> # check_oracle_login
> define command{
>         command_name    check_oracle_login
>         command_line    . $USER20$/oracle_env_$ARG1$; $USER1$/solaris-
> libexec/check_oracle --tns $ARG1$
> }
> 
> Anyone know how I can do this?

Write a small wrapper script.

Have $ARG1$ be passed.

------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
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





More information about the Users mailing list