how to create a command that submits a passive service check

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
david_sloboda
Posts: 33
Joined: Mon Apr 30, 2012 1:26 pm
Location: Burnaby, Canada

how to create a command that submits a passive service check

Post by david_sloboda »

Nagios XI 2011 r3.3

I am looking for information on how to set up an existing test to return its result as a passive check.

I have this URL
http://nagios.sourceforge.net/docs/3_0/ ... hecks.html

I have a test check_naf.py to measure disk usage and inode usage for Network Appliance (NetApp) filer exported volumes.

Frequently enough that test takes longer than 60 seconds to complete.
The service_check_timeout directive of 60 seconds then kills the test and raises a Critical event.

In the short term I would like to convert that test into a passive check.

I believe what I need to do is write a script that puts
[<timestamp>] PROCESS_SERVICE_CHECK_RESULT;<host_name>;<svc_description>;<return_code>;<plugin_output>
to the Nagios external command file.
Then, call that script via cron every INTERVAL.
INTERVAL would be something more than 60 seconds. Maybe 300 seconds.

The NetApps which time out are overloaded with traffic intermittently.
My long term goal is to have that test complete in less than 60 seconds by
tuning the NetApps. The NetApp tuning is managed by a separate team at my employer.

Any advice, suggestions or pointers would be appreciated.
Thank you,
David Sloboda
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: how to create a command that submits a passive service c

Post by scottwilkerson »

You can do this via NRDP, NRDS, or NSCA

NRDP
http://exchange.nagios.org/directory/Ad ... nt/details
Get the token from Admin -> Inbound Transfer

NRDS
http://library.nagios.com/library/produ ... s-tutorial
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
david_sloboda
Posts: 33
Joined: Mon Apr 30, 2012 1:26 pm
Location: Burnaby, Canada

Re: how to create a command that submits a passive service c

Post by david_sloboda »

Thanks for the references.

Between the references you provided and the online docs, I have a fix in place.
The NRDP example looks like the best to me.
I may implement that if/when I have to move these checks to a second host.
However, at present I am running from the Nagios server all of the below :
(1) the services are configured to have active checks disabled and passive checks enabled.
(2) From cron, I have a script that runs every INTERVAL (varies per NetApp volume; not all have to be tested at the same frequency.)
(3) the script runs the check_naf.py command and writes to the external command file
(4) the external command file updates Nagios.

So far, works great.

The only thing I still have to clean up is what Nagios XI displays as the "Status Information"
Step (3) writes all status information to the external command file as one line using plugin_output.
I need to re-read
http://nagios.sourceforge.net/docs/3_0/ ... hecks.html
http://nagios.sourceforge.net/docs/3_0/pluginapi.html
then tune the plugin output to make use of
$SERVICEOUTPUT$
$SERVICEPERFDATA$
$LONGSERVICEOUTPUT$

David Sloboda
Locked