Build precise queries to find exactly what you need
Press ESC to close
Join our next live webinar: “Advanced Nagios Monitoring Techniques” – Register Now
Your review has been submitted and is pending approval.
Do you need to store your plugin results and return status anywhere? Its a simple PHP script to use as a bridge between nagios and the final plugin.
Current Version
Last Release Date
June 24, 2009
Owner
Nagios Exchange
Compatible With
bridge script
Its usage is very simple: Put the script check_any.php on the libexec nagios directory (review the owner, permissions, ...) Edit the nagios checkcommands.cfg file and change the definition for all plugins for which you want to store the results as the example does: Example: Original definition: define command{ command_name check_ping command_line $USER1$/check_ping -H $HOSTADDRESS$ -w $ARG1$ -c $ARG2$ -p 5 } New definition: define command{ command_name check_ping command_line $USER1$/check_any.php $USER1$/check_ping -H $HOSTADDRESS$ -w $ARG1$ -c $ARG2$ -p 5 } Logging By default, this php script will log all plugin results at /usr/local/nagios/var/nagactiv.log. Of course, you can use this script to store all results as you need (Data Base, RRD systems, ...) The log file structure is: DATE: 2005-05-30 17:12:43 COMMAND: /usr/local/nagios/libexec/check_ping -H 10.0.0.1 -w 100.0,20% -c 500.0,60% -p 5 RETURNED: 2 CRITICAL - Plugin timed out after 10 seconds DATE: 2005-05-30 17:12:58 COMMAND: /usr/local/nagios/libexec/check_ping -H 10.0.0.2 -w 100.0,20% -c 500.0,60% -p 5 RETURNED: 2 CRITICAL - Plugin timed out after 10 seconds DATE: 2005-05-30 17:13:12 COMMAND: /usr/local/nagios/libexec/check_ping -H 10.0.0.3 -w 100.0,20% -c 500.0,60% -p 5 RETURNED: 0 PING OK - Packet loss = 0%, RTA = 1.30 ms The behaviour of Nagios is not affected.
You must be logged in to submit a review.
To:
From: