$USER1$

Rob Blake rob.blake at gmail.com
Tue Apr 24 13:43:40 CEST 2007


On 4/24/07, Valdinger, Stephen (DOV, MSX) <stephen.valdinger at doverchem.com>
wrote:
>
>  When declaring new commands do I need to sub out the $USER1$ arguments
> for anything, or can those stay there?
>
>
>
> Define command{
>
>             Command_name            check_snmp_win
>
>             Command_line               $USER1$/check_snmp_win.pl –V 2 –H
> xxx.xxx.xxx.xxx –C <communityname> -N BESAlert –T BESAlert
>
>             }
>
>  Would that be the proper way to define this new command on my Blackberry
> Enterprise server?
>
>
>
> Here is what the service looks like:
>
>
>
> Define service{
>
>             Host_name        XXXXXXX
>
>             Service_description        BES Alert
>
>             Check_command           check_snmp_win!BESAlert
>
>             Max_check_attempts     5
>
>             Normal_check_interval    5
>
>             Retry_check_interval      1
>
>             Check_period 24x7
>
>             }
>
>
>
>
>
> Thanks a lot.
>


The $USER1$ macro typically refers to the location in which the majority of
your plugins are stored (usually this is $Nagios_home/libexec). Rather than
having to type out the full path to your plugin everytime you define a
command, you can use the $USER1$ macro as a shortcut.

If the plugin for the new command you are defining is in the same directory
as the rest of your plugins, the simply maintain your use of $USER1$. If the
plugin resides elsewhere on your filesystem, you will either need to provide
the full path in your command definition, or define a second macro with the
command location and use that.

When defining the service, simply use the name of the command.

Rob
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20070424/821e5f03/attachment.html>
-------------- next part --------------
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
-------------- next part --------------
_______________________________________________
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