'top 10'

Hein-Pieter van Braam hp at tmm.cx
Thu Aug 21 15:26:57 CEST 2008


Hello List,

For a customer I have written a 'top10' cgi for Nagios 3.0.3. What it
basically does is sort services based on the status output, filtered
through a regexp.

It adds the following new configuration parameters for services:

show_top10 	Show this service in the top10 screen?
regmatch_sort	The regexp to sort the plugin output to
sort_reverse	Sort them in reverse

An example config would look like this:

define service{
        use                     generic-cisco-service-always
        servicegroups           PING
        hostgroup_name          alle-cisco-devices
        service_description     PING
        check_command           check_ping!100.0,20%!500.0,60%
        show_top10              1
        regmatch_sort           \([0-9]\+.\?[0-9]\+\)\ ms
}

The current implementation is fairly naive, and most certainly full of
holes, consider this to be a 'proof of concept'. I have a screenshot up
here:

http://www.tmm.cx/~hp/top10.png

Is there any interest in such a feature for nagios proper? if so, I'll
gladly clean up the code and submit a proper patch.

Attached you'll also find the patch to the current version. Not very
pretty, like I said :)


-------------- next part --------------
A non-text attachment was scrubbed...
Name: top.patch
Type: text/x-patch
Size: 41221 bytes
Desc: not available
URL: <https://www.monitoring-lists.org/archive/developers/attachments/20080821/67cc364b/attachment.bin>
-------------- next part --------------
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
-------------- next part --------------
_______________________________________________
Nagios-devel mailing list
Nagios-devel at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-devel


More information about the Developers mailing list