[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [hobbit] Problem with hobbitd_rrd custom graph



Hi Graham,

Good find, thanks! I haven't tried the fix yet, but given your description of it and that our snapshot does include the RRD cache mechanism I think it's safe to say this is it. I'll try your patch tomorrow.

Kind regards,

Davíð

Graham Nayler wrote:
Davíð

That sounds exactly the same problem I was having. What version is your hobbit installation? If recent source (ours is 4.3.0, and I don't know when the caching went in), it could be that this is your answer. http://www.hswn.dk/hobbiton/2008/09/msg00283.html

Check back through that log and see if you have occasional lines like
Flushing '/<hostname>/temp.rrd' with 1 updates pending, template '11:12:13:21:31:41:42' just before the "Unlinking temp file" entries, corresponding to when you saw points on the graph.

Graham Nayler

----- Original Message ----- From: "Davíð Steinn Geirsson" <david (at) basis.is>
To: <hobbit (at) hswn.dk>
Sent: Monday, September 29, 2008 4:17 PM
Subject: [hobbit] Problem with hobbitd_rrd custom graph


Hi all,

I'm trying to create a custom graph for hobbit but am having some problems.

I have a script doing SNMP probing and returning status messages to hobbit. I have another script that generates RRD definitions for hobbitd_rrd.

I've added the script to hobbit_rrd extra_scripts:
[rrdstatus]
        ENVFILE /usr/lib/hobbit/server/etc/hobbitserver.cfg
        NEEDS hobbitd
CMD hobbitd_channel --channel=status --log=$BBSERVERLOGS/rrd-status.log hobbitd_rrd --rrddir=$BBVAR/rr d --extra-script=/usr/lib/hobbit/server/ext/sensatronics-grapher.py --extra-tests=temp --debug


I've also made a graph definition in hobbitgraph.cgi (not really the finished definition, but I think it should work for testing):
[temp]
        TITLE Sensatronics environment monitor
        YAXIS Measurement
        DEF:11=sensatronics.rrd:11:AVERAGE
        DEF:12=sensatronics.rrd:11:AVERAGE
        DEF:13=sensatronics.rrd:11:AVERAGE
        DEF:21=sensatronics.rrd:11:AVERAGE
        DEF:31=sensatronics.rrd:11:AVERAGE
        DEF:41=sensatronics.rrd:11:AVERAGE
        DEF:42=sensatronics.rrd:11:AVERAGE
        LINE2:11#00CCCC:value
        COMMENT:\n
        GPRINT:11:LAST: \: %5.1lf (cur)
        GPRINT:11:MAX: \: %5.1lf (max)
        GPRINT:11:MIN: \: %5.1lf (min)
        GPRINT:11:AVERAGE: \: %5.1lf (avg)\n


Now, the rrd file is created but only occasionally do I see values entered into it (I haven't seen a pattern - looking over the rrd generated over the weekend I see some values, sometimes 30 minutes apart, sometimes hours, but almost all the measurement points show NaN)

My script is being executed every 5 minutes.

Here is the output from rrd-status.log (with hobbitd_rrd run with --debug flag): 2008-09-29 14:03:37 Want msg 698, startpos 1151746, fillpos 1151746, endpos -1, usedbytes=0
, bufleft=425213
2008-09-29 14:03:38 hobbitd_rrd: Got message 698 @@status#698/tankar_hiti|1222697018.325994 |10.200.10.3||tankar_hiti|temp|1222698818|green||green|1222263717|0||0||0|0
2008-09-29 14:03:38 startpos 1152334, fillpos 1152334, endpos -1
2008-09-29 14:03:38 -> do_external(tankar_hiti, temp)
2008-09-29 14:03:38 000021108 : Saving msg to file /usr/lib/hobbit/server/tmp/rrd_msg_21108
2008-09-29 14:03:38 <- do_external(tankar_hiti, temp)
2008-09-29 14:03:38 Want msg 699, startpos 1152334, fillpos 1152334, endpos -1, usedbytes=0
, bufleft=424625
2008-09-29 14:03:38 000021108 : Calling helper script /usr/lib/hobbit/server/ext/sensatroni
cs-grapher.py tankar_hiti temp /usr/lib/hobbit/server/tmp/rrd_msg_21108
2008-09-29 14:03:38 000021108 : Helper input 'DS:11:GAUGE:600:0:U'
2008-09-29 14:03:38 000021108 : Helper input 'DS:12:GAUGE:600:0:U'
2008-09-29 14:03:38 000021108 : Helper input 'DS:13:GAUGE:600:0:U'
2008-09-29 14:03:38 000021108 : Helper input 'DS:21:GAUGE:600:0:U'
2008-09-29 14:03:38 000021108 : Helper input 'DS:31:GAUGE:600:0:U'
2008-09-29 14:03:38 000021108 : Helper input 'DS:41:GAUGE:600:0:U'
2008-09-29 14:03:38 000021108 : Helper input 'DS:42:GAUGE:600:0:U'
2008-09-29 14:03:38 000021108 : Helper input 'sensatronics.rrd'
2008-09-29 14:03:38 000021108 : Helper input '7:62:4:21:27:24:16'
2008-09-29 14:03:38 000021108 : Unlinking temp file
2008-09-29 14:03:38 get_hobbitd_message: Interrupted

The 'get_hobbitd_message: Interrupted' message always appears after accepting input from my script.

Any ideas?

Kind regards,

--
Davíð Steinn Geirsson
Basis ehf.
david (at) basis.is / (+354) 575-0419

To unsubscribe from the hobbit list, send an e-mail to
hobbit-unsubscribe (at) hswn.dk





To unsubscribe from the hobbit list, send an e-mail to
hobbit-unsubscribe (at) hswn.dk




--
Davíð Steinn Geirsson
Basis ehf.
david (at) basis.is / (+354) 575-0419