<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
  <title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
ok, I am closer, but still unclear on the check_command and the define
service part (I will try to read more 2nt) but I can run in manually as
nagios from the cli;<br>
<br>
./check_snmp_load.pl -H 1.1.1.1 -C community -w 3,3,2 -c 4,4,3 -T netsl<br>
Load : 4.37 4.27 4.20 : 4.37 > 4 : CRITICAL 4.27 > 4 : CRITICAL
4.20 > 3 : CRITICAL<br>
<br>
so that works.  Now in the command.cfg I have the following;<br>
<br>
define command{<br>
   command_name check_snmp_load_v1<br>
   command_line $USER1$/check_snmp_load.pl -H $HOSTADDRESS$ $USER7$ -T
$ARG1$ -w $ARG2$ -c $ARG3$ $ARG4$ -C community<br>
}<br>
<br>
and the server.cfg I have;<br>
<br>
define service{<br>
        use                             local-service         ; Name of
service$<br>
        host_name                       bigbird<br>
        service_description             Current Load via SNMP<br>
        check_command                  
check_snmp_load_v1!netsl!3,3,2!4,4,3<br>
 }<br>
<br>
I have played numerous times, that is the latest, I am trying to
understand where the $ARG variables are defined (and how).  I assume
the $HOSTADDRESS is just by the server.cfg file, but not sure on
$USER7$ as well as push the other $ARG$ one's, becuase as you see from
the cli hand entering the info it works!<br>
<br>
Can't wait till all this basic stuff is behind me!<br>
<br>
<br>
Lee Azzarello wrote:
<blockquote
 cite="mid:16b031c0902240845k6401fd90nfb49c47e5e3312c1@mail.gmail.com"
 type="cite">
  <pre wrap="">On Mon, Feb 23, 2009 at 11:10 PM, Lance Raymond
<a class="moz-txt-link-rfc2396E" href="mailto:lraymond@weatherflow.com"><lraymond@weatherflow.com></a> wrote:
  </pre>
  <blockquote type="cite">
    <pre wrap="">I tried a few things after the _v1 but nagios kept failing on restart, so I
think I just need to figure out howto push the variables (such as hostIP ,
community name) to the check_command, right?  Since changing the service to
use the new command, nagios is now red with the following error; Return code
of 255 is out of bounds
    </pre>
  </blockquote>
  <pre wrap=""><!---->
There are good docs on how to pass arguments to a check command.
Here's my pattern to bring new service checks online without mucking
about with the running nagios process:

1) Find the plugin on the host running nagios
2) Run the plugin manually as the nagios user with the arguments you
would like. Inspect the output. Is it what you expect?
3) If it is what you expect, compose the check command and service
definition exactly as your manual run, only use macro substitution as
per the documentation
4) Save your configs and check them before loading the new objects.
nagios -v nagios.cfg will automate this check and inform you that
everything is okay before you "go live".
5) If everything's okay, reload the configuration and check the web
interface for the new service check status.

-lee

------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
<a class="moz-txt-link-freetext" href="http://p.sf.net/sfu/XcvMzF8H">http://p.sf.net/sfu/XcvMzF8H</a>
_______________________________________________
Nagios-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Nagios-users@lists.sourceforge.net">Nagios-users@lists.sourceforge.net</a>
<a class="moz-txt-link-freetext" href="https://lists.sourceforge.net/lists/listinfo/nagios-users">https://lists.sourceforge.net/lists/listinfo/nagios-users</a>
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null
  </pre>
</blockquote>
<br>
</body>
</html>