RRD problem with a Custom Script

Guðmundur Ö. Ingvarsson Gudmundur.Ingvarsson at landsbanki.is
Tue Dec 12 15:56:45 CET 2006


Hello Hobbit lovers.

 

I'm hoping someone can help me with this dilemma I'm facing.

I created these settings and the script to count the number of

connections to a specific IP.PORT from a few machines. The status

comes correctly into Hobbit and it does go to the warning and critical

levels if they are exceeded and the monitor works quite well.

 

What isn't working is the RRD graph. On one hand it seems the rrd file is not being

generated although Hobbit does link to a graph in the status page. But no

graph is displayed and clicking on the hobbit graph rb-conn link gives four

magnifying glasess and hourly, daily etc lines. But again, no graphs.

 

On the other if I use the NCV feature hobbit does generate the RRD but not only

links it wrong in the web-gui but also writes the information wrong into it.

 

The Output from the RRD file

 

<!-- Round Robin Database Dump -->

<rrd>

        <version> 0001 </version>

        <step> 300 </step> <!-- Seconds -->

        <lastupdate> 1165934698 </lastupdate> <!-- 2006-12-12 14:44:58 CUT -->

 

        <ds>

                <name> Heildartegngingarfr </name>

                <type> DERIVE </type>

                <minimal_heartbeat> 600 </minimal_heartbeat>

                <min> 0.0000000000e+00 </min>

                <max> NaN </max>

 

                <!-- PDP Status -->

                <last_ds> 8 </last_ds>

                <value> 1.9800664452e+00 </value>

                <unknown_sec> 0 </unknown_sec>

        </ds>

 

Can anyone help me please, I've banged my head against my desk for a couple

of days now but still nothing happens. I must be missing something which I 

have not been able to find on this mailing list or anywhere else. Am I doing

this all wrong? Should I be using the --extra-scripts option for hobbitd_rrd

or just the NCV or should I skip both and kick the Hobbit!?

 

Below are all the settings I have for this.

 

 

This is the line as it comes into Hobbit

@@HOBBITDCHK-V1||myhostname|rb-conn|666.666.666.666|green||green|1165925931|1165925328|1165927731|0|0|-1|0|status myhostname.rb-conn green Tue Dec 12 12:18:51 CUT 2006\n\n\tCurrent connections from myhostname to RB currently at 75 (OK)\n\t||

 

This is from hobbitgraph.cfg

[rb-conn]

        TITLE Kjarna tengingar til RB

        YAXIS Tegningar

        DEF:p=rb-conn.rrd:rb-conn:AVERAGE

        AREA:p#DD0000:Connections

        COMMENT:\n

        GPRINT:p:LAST: \: %5.1lf%s (cur)

        GPRINT:p:MAX: \: %5.1lf%s (max)

        GPRINT:p:MIN: \: %5.1lf%s (min)

        GPRINT:p:AVERAGE: \: %5.1lf%s (avg)\n

 

>From hobbitserver.cfg        

TEST2RRD="cpu=la,disk,inode,qtree,memory,$PINGCOLUMN=tcp,http=tcp,dns=tcp,dig=tcp,time=ntpstat,vmstat,iostat,netstat,temperature,apache,bind,sendmail,mailq,nmailq=mailq,socks,bea,iishealth,citrix,bbgen,bbtest,bbproxy,hobbitd,files,procs=processes,ports,clock,lines,rb-conn"

 

GRAPHS="la,disk,inode,qtree,files,processes,memory,users,vmstat,iostat,tcp.http,tcp,ncv,netstat,ifstat,mrtg::1,ports,temperature,ntpstat,apache,bind,sendmail,mailq,socks,bea,iishealth,citrix,bbgen,bbtest,bbproxy,hobbitd,clock,lines,rb-conn"

 

NCV_rb-conn = "Heildartegngingarfr:GAUGE"

 

>From clientlaunch.cfg on the client machine

[rb-conn]

        ENVFILE $HOBBITCLIENTHOME/etc/hobbitclient.cfg

        CMD $HOBBITCLIENTHOME/ext/RB-Connections.sh 80 150

        LOGFILE $HOBBITCLIENTHOME/logs/rbcon.log

        INTERVAL 5m

 

And the script from the ext directory on the client machine (Called RB-Connections.sh)        

#!/bin/ksh

 

# This script is an extension for the BB client running on

# your server. It will feed data about the local kjarna connections 

# into Hobbit.

 

COLUMN=rb-conn  # Name of the column

OUTPUT=$(netstat -an | grep 555.555.555.555.3120 | wc -l|awk '{ print $1}')

 

WARN="$1"

PANIC="$2"

 

        if [[ $OUTPUT -ge $PANIC ]]

        then

        COLOR="red"

        STATUS="Critical"

        elif [[ $OUTPUT -ge $WARN ]]

        then

        COLOR="yellow"

        STATUS="Warning"

        else

        COLOR="green"

        STATUS="OK"

        fi

 

   # Tell Hobbit about it

   $BB $BBDISP "status $MACHINE.$COLUMN $COLOR `date`

 

        Current connections from $MACHINEDOTS to RB currently at $OUTPUT ($STATUS)

        "

 

exit 0

 


Fyrirvari/Disclaimer
http://www.landsbanki.is/disclaimer
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.xymon.com/pipermail/xymon/attachments/20061212/94a20da1/attachment.html>


More information about the Xymon mailing list