setting ENV for checks in commands.cfg

Litwin, Matthew mlitwin at stubhub.com
Thu Jul 8 05:11:49 CEST 2010


Never mind, the documentation has this little workaround:

NOTE: You may not include a semicolon (;) in the command_line directive, because everything after it will be ignored as a config file comment. You can work around this limitation by setting one of the $USER$<macros.html#user> macros in your resource file<configmain.html#resource_file> to a semicolon and then referencing the appropriate $USER$ macro in the command_line directive in place of the semicolon.

On Jul 7, 2010, at 8:00 PM, Litwin, Matthew wrote:

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?


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


------------------------------------------------------------------------------
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