[Nagiosplug-devel] [ nagiosplug-Patches-3301066 ] check_mysql_query perfdata + smarter output

SourceForge.net noreply at sourceforge.net
Thu May 12 17:16:25 CEST 2011


Patches item #3301066, was opened at 2011-05-12 17:16
Message generated for change (Tracker Item Submitted) made by psychoweb
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=397599&aid=3301066&group_id=29880

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Perf data
Group: release-1.4.15
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Paolo Serra (psychoweb)
Assigned to: Nobody/Anonymous (nobody)
Summary: check_mysql_query perfdata + smarter output

Initial Comment:
Added basic support for performance data. The MIN and MAX can be specified by submitting a query with two more columns as result. Either constants or other queries can be used as values.
A different string formatting allows automatical removal of trailing zeroes and decimal values, without ugly outputs such as "returned 6.000000".
Plus, the plugin now prints the query specification on the second line, thus shortening the output in Nagios web GUI. The first line is more straight-to-the-point and more readable. This is an example:

[input:]#check_mysql_query -H xxx -u xxx -p xxx -d nagios -q 'select count(*),10,100  from nagios_servicestatus as ss, nagios_services as s, nagios_hosts as h, nagios_objects as o where ss.service_object_id = s.service_object_id and s.service_object_id = o.object_id and s.host_object_id = h.host_object_id and ss.current_state = 2 and ss.scheduled_downtime_depth = 0' -c 3

[output:] QUERY CRITICAL: returned 6
'select count(*),10,100  from nagios_servicestatus as ss, nagios_services as s, nagios_hosts as h, nagios_objects as o where ss.service_object_id = s.service_object_id and s.service_object_id = o.object_id and s.host_object_id = h.host_object_id and ss.current_state = 2 and ss.scheduled_downtime_depth = 0'
| value=6;;;10;100

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=397599&aid=3301066&group_id=29880




More information about the Devel mailing list