Customize "service detail" page

borkmann at cbs.mpg.de borkmann at cbs.mpg.de
Thu Apr 16 11:40:55 CEST 2009


thanks for your answers!

i'm just wondering how nagiosgrapher got their grapher icon into the 
service
page ... i mean ... at first view they doesn't seem to have any patched 
c file or
command.

in their configuration (ngraph.ncfg) they have sth like this:

icon_image_tag          ' dot.png' alt="___ALT___" border="0"></a><A 
TARGET="_blank" HREF="graphs.cgi?___URL___"><img sr
c="___IMAGESRC___" '

icon_image_src          /nagios3/images/logos/graph.png

icon_image_script       
/nagios3/cgi-bin/rrd2-system.cgi?___URL___&width=20&height=20&type=AVERAGE&only-graph=true

icon_image_static       false

but changing it to my needs (as mentioned before) didn't work ... 
nothing happens ...
hmm ... i guess i'll have to take a further look into their source.


short description of what's my plan:
# i've build a generic algorithm interface that sits on top of 
nagiosgrapher (ng)
# ng provides now to rrds per service per host.. one for ng-payload and 
one for the specific algorithm
# the algorithm  (e.g. holt-winters forecasting and or own, better 
ideas) detects anomalies in the graph behaviour and corrects itself 
concerning "normal"-behaviour by the time
# next to every grapher icon in the nagios service detail page should be 
a short summary, e.g. "3/5 anomalies"
# in the later graph both rrds will be merged so that it's all in one 
diagram
# the algorithms can be exchanged at runtime without loosing our ng-payload

most of it works so far ;)

> I've heard of people achieving something similar by running the
> service plugin through a wrapper which prepends the relevant string to
> the normal plugin output.  I can't say I've ever tried it myself
> though.
>
> As an example, instead of the normal check command:
>
>   define command{
>           command_name    check_ftp
>           command_line    $USER1$/check_ftp -H $HOSTADDRESS$ $ARG1$
>           }
>
> You could have a wrapper script which prints the output of your perl
> script (with no newline) then runs the command proper.  Depending on
> how you write the wrapper script (I'll leave that to your
> imagination), the command definition might then look something like:
>
>   define command{
>           command_name    check_ftp
>           command_line    /usr/local/bin/my_wrapper.pl -c
> $USER1$/check_ftp -H $HOSTADDRESS$ $ARG1$
>           }
>
> Your perl output wouldn't appear in a seperate column as such, but at
> least it would appear on the normal service detail page where you can
> see it.
>
> It's a bit dirty, but if you only need it for a small number of checks
> might be a quick way to get it done.
>
> Cheers,
>
> Jim
>   


------------------------------------------------------------------------------
Stay on top of everything new and different, both inside and 
around Java (TM) technology - register by April 22, and save
$200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
300 plus technical and hands-on sessions. Register today. 
Use priority code J9JMT32. http://p.sf.net/sfu/p
_______________________________________________
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