getting closer

Tedman Eng teng at dataway.com
Wed Apr 21 21:39:06 CEST 2004


If you can run the script from the Nagios machine, why not just run it as a
plugin?
nsca is really only needed when you need to pass data from another nagios or
another external source (ie. mon or cricket).

Use exit codes to tell nagios the status, and use 1-line stdout to tell
nagios the output.
See: http://nagiosplug.sourceforge.net/developer-guidelines.html#RETURNCODES



Regarding the check_dummy usage, the command should be:
/usr/local/nagios/libexec/check_dummy 0 

Using check_dummy means you're essentially hardcoding the active check
status.
0 is for OK, 1 for warning, 2 for critical, and 3 for unknown


> -----Original Message-----
> From: John Stotler [mailto:jstotler at mysck.com]
> Sent: Wednesday, April 21, 2004 11:33 AM
> To: nagios-users at lists.sourceforge.net
> Subject: [Nagios-users] getting closer
> 
> 
> 
> I've realized that I can run my check script on the box 
> hosting nagios,
> so I can simply write directly to the nagios.cmd file.
> 
> Now, however, I'm getting an "Incorrect number of arguments supplied"
> error.
> 
> Here's the bit in services.cfg:
> 
> #'check_ibm_db' command definition
> define command {
> command_name check_ibm_db
> command_line /usr/local/nagios/libexec/check_dummy -H $HOSTADDRESS$
> }
> 
> Here's what I'm writing out to the FIFO:
> 
> /bin/echo -e "[1082570845]
> PROCESS_SERVICE_CHECK_RESULT;eco-bobino;check_ibm_db;0;0" >>
> /usr/local/nagios/var/rw/nagios.cmd
> 
> Now, it would seem to me that since I'm writing directly to 
> the command
> file, the arguments for check_dummy in services.cfg shouldn't really
> come into play, but it appears that I'm mistaken on this, and doing
> something wrong....
> 
> 
> 
> -------------------------------------------------------
> This SF.Net email is sponsored by: IBM Linux Tutorials
> Free Linux tutorial presented by Daniel Robbins, President and CEO of
> GenToo technologies. Learn everything from fundamentals to system
> administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
> _______________________________________________
> 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
> 


-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
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