<br><div><span class="gmail_quote">On 4/24/07, <b class="gmail_sendername">Valdinger, Stephen (DOV, MSX)</b> <<a href="mailto:stephen.valdinger@doverchem.com">stephen.valdinger@doverchem.com</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">











<div link="blue" vlink="purple" lang="EN-US">

<div>

<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;">When declaring new commands do I need to sub out the $USER1$
arguments for anything, or can those stay there?</span></font></p>

<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;"> </span></font></p>

<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;">Define command{</span></font></p>

<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;">            Command_name            check_snmp_win</span></font></p>

<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;">            Command_line               $USER1$/check_snmp_win.pl
–V 2 –H xxx.xxx.xxx.xxx –C <communityname> -N BESAlert –T BESAlert</span></font></p>

<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;">            }<br>
<br>
</span></font></p>

<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;">Would that be the proper way to define this new command on
my Blackberry Enterprise server?</span></font></p>

<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;"> </span></font></p>

<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;">Here is what the service looks like:</span></font></p>

<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;"> </span></font></p>

<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;">Define service{</span></font></p>

<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;">            Host_name        XXXXXXX</span></font></p>

<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;">            Service_description        BES Alert</span></font></p>

<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;">            Check_command           check_snmp_win!BESAlert</span></font></p>

<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;">            Max_check_attempts     5</span></font></p>

<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;">            Normal_check_interval    5</span></font></p>

<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;">            Retry_check_interval      1</span></font></p>

<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;">            Check_period 24x7</span></font></p>

<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;">            }</span></font></p>

<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;"> </span></font></p>

<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;"> </span></font></p>

<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;">Thanks a lot.</span></font></p></div></div></blockquote><div><br><br>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.
<br><br>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.
<br><br>When defining the service, simply use the name of the command.<br><br>Rob<br></div><br></div>