Sorry for the quick update, but don't want people to waste time, or they may change based on my update.

Well, reading the http://nagios.manubulon.com/index_commands.html#load page more, I am trying to understand a bit more.  So my commands.cfg file now looks like this;

define command{
   command_name check_snmp_load_v1
   command_line $USER1$/check_snmp_load.pl -H $HOSTADDRESS$ -C community -T netsl -w 3,3,2 -c 4,4,3  -C community

}

and the server.cfg file looks like this;

define service{
        use                             local-service         ; Name of service$
        host_name                       bigbird
        service_description             Current Load via SNMP
      check_command                   check_snmp_load_v1!netsl!3,3,2!4,4,3
 }

All seems to be working now, I need to understand the alarm levels a bit (that's easy reading) as well as figure if I even need the !netsl, etc. on the check_command line.

But thanks for the push's in the right direction


Lee Azzarello wrote:
On Mon, Feb 23, 2009 at 11:10 PM, Lance Raymond
<lraym...@weatherflow.com> wrote:
  
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
    

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
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
Nagios-users mailing list
Nagios-users@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
  

------------------------------------------------------------------------------
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
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
Nagios-users mailing list
Nagios-users@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

Reply via email to