hobbitd_rrd not starting an extra script
list Sébastien Munch
Hello I'm trying to create an extra script for hobbit_rrd. I've followed tutorials found on the net, especially http://www.trantor.org/theshire/doku.php/tutorials:customgraph I'm getting the information in the status page. Data is correctly sent to the hobbit server. Everything seems to be configured correctly, but I'm not getting any rrd data. In the configurations, I've double-checked paths, execution rights, etc. To simplify the tests, I've changed my extra-script so that it writes everything in a temporary file. The script isn't started : it doesn't write in this temporary file. In the rrd-status log, I don't see anything about executing the extra script. hobbitlaunch.cfg : [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/rrd --extra-script /usr/lib/hobbit/server/ext/rrd_openvz.sh --extra-tests openvz --debug /usr/lib/hobbit/server/ext/rrd_openvz.sh : #!/bin/sh echo "Pop !" > /tmp/plouf hostname=$1 testname=$2 messagefile=$3 echo "Host $hostname" >> /tmp/plouf echo "Test $testname" >> /tmp/plouf echo "Message file $messagefile" >> /tmp/plouf cat $messagefile >> /tmp/plouf exit 0 /var/log/hobbit/rrd-status.log : [...] 2008-09-25 18:01:41 RRD update param 01: '/var/lib/hobbit/rrd/<some other host 1>/memory.actual.rrd' 2008-09-25 18:01:41 RRD update param 02: '-t' 2008-09-25 18:01:41 RRD update param 03: 'realmempct' 2008-09-25 18:01:41 RRD update param 04: '1222358501:22' 2008-09-25 18:01:41 Want msg 7363, startpos 128053, fillpos 128053, endpos -1, usedbytes=0, bufleft=400330 2008-09-25 18:01:42 hobbitd_rrd: Got message 7363 @@status#7363| 1222358502.509616|10.1.60.214||<the host I want to check>|openvz| 1222360302|green||green|1222249676|0||0||1222358207 2008-09-25 18:01:42 startpos 128527, fillpos 128527, endpos -1 2008-09-25 18:01:42 Want msg 7364, startpos 128527, fillpos 128527, endpos -1, usedbytes=0, bufleft=399856 2008-09-25 18:01:44 hobbitd_rrd: Got message 7364 @@status#7364| 1222358504.541929|10.1.0.52||<some other host 2>|cpu|1222360304|green|| green|1222302537|0||0||0 2008-09-25 18:01:44 startpos 130305, fillpos 130305, endpos -1 2008-09-25 18:01:44 RRD update param 00: 'rrdupdate' 2008-09-25 18:01:44 RRD update param 01: '/var/lib/hobbit/rrd/<some other host 2>/la.rrd' [...] Could anyone see something that would be wrong there ? Thanks in advance :) Regards Sebastien
list Rich Smrcina
Did you add your graph definition to hobbitgraph.cfg? You would need to bounce Hobbit after changing that file since it is only processed once.
▸
Sébastien Munch wrote:Hello I'm trying to create an extra script for hobbit_rrd. I've followed tutorials found on the net, especially http://www.trantor.org/theshire/doku.php/tutorials:customgraph I'm getting the information in the status page. Data is correctly sent to the hobbit server. Everything seems to be configured correctly, but I'm not getting any rrd data. In the configurations, I've double-checked paths, execution rights, etc. To simplify the tests, I've changed my extra-script so that it writes everything in a temporary file. The script isn't started : it doesn't write in this temporary file. In the rrd-status log, I don't see anything about executing the extra script. hobbitlaunch.cfg : [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/rrd --extra-script /usr/lib/hobbit/server/ext/rrd_openvz.sh --extra-tests openvz --debug /usr/lib/hobbit/server/ext/rrd_openvz.sh : #!/bin/sh echo "Pop !" > /tmp/plouf hostname=$1 testname=$2 messagefile=$3 echo "Host $hostname" >> /tmp/plouf echo "Test $testname" >> /tmp/plouf echo "Message file $messagefile" >> /tmp/plouf cat $messagefile >> /tmp/plouf exit 0 /var/log/hobbit/rrd-status.log : [...] 2008-09-25 18:01:41 RRD update param 01: '/var/lib/hobbit/rrd/<some other host 1>/memory.actual.rrd' 2008-09-25 18:01:41 RRD update param 02: '-t' 2008-09-25 18:01:41 RRD update param 03: 'realmempct' 2008-09-25 18:01:41 RRD update param 04: '1222358501:22' 2008-09-25 18:01:41 Want msg 7363, startpos 128053, fillpos 128053, endpos -1, usedbytes=0, bufleft=400330 2008-09-25 18:01:42 hobbitd_rrd: Got message 7363 @@status#7363| 1222358502.509616|10.1.60.214||<the host I want to check>|openvz| 1222360302|green||green|1222249676|0||0||1222358207 2008-09-25 18:01:42 startpos 128527, fillpos 128527, endpos -1 2008-09-25 18:01:42 Want msg 7364, startpos 128527, fillpos 128527, endpos -1, usedbytes=0, bufleft=399856 2008-09-25 18:01:44 hobbitd_rrd: Got message 7364 @@status#7364| 1222358504.541929|10.1.0.52||<some other host 2>|cpu|1222360304|green|| green|1222302537|0||0||0 2008-09-25 18:01:44 startpos 130305, fillpos 130305, endpos -1 2008-09-25 18:01:44 RRD update param 00: 'rrdupdate' 2008-09-25 18:01:44 RRD update param 01: '/var/lib/hobbit/rrd/<some other host 2>/la.rrd' [...] Could anyone see something that would be wrong there ? Thanks in advance :) Regards Sebastien
--
Rich Smrcina VM Assist, Inc. Phone: XXX-XXX-XXXX Ans Service: XXX-XXX-XXXX user-61add9955ef9@xymon.invalid http://www.linkedin.com/in/richsmrcina Catch the WAVV! http://www.wavv.org WAVV 2009 - Orlando, FL - May 15-19, 2009
list Sanu Mathew
Nope. I don't know how to do that, how do i?
▸
On Thu, Sep 25, 2008 at 10:01 PM, Rich Smrcina <user-cf452ff334e0@xymon.invalid> wrote:
Did you add your graph definition to hobbitgraph.cfg? You would need to bounce Hobbit after changing that file since it is only processed once. Sébastien Munch wrote:Hello I'm trying to create an extra script for hobbit_rrd. I've followed tutorials found on the net, especially http://www.trantor.org/theshire/doku.php/tutorials:customgraph I'm getting the information in the status page. Data is correctly sent to the hobbit server. Everything seems to be configured correctly, but I'm not getting any rrd data. In the configurations, I've double-checked paths, execution rights, etc. To simplify the tests, I've changed my extra-script so that it writes everything in a temporary file. The script isn't started : it doesn't write in this temporary file. In the rrd-status log, I don't see anything about executing the extra script. hobbitlaunch.cfg : [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/rrd --extra-script /usr/lib/hobbit/server/ext/rrd_openvz.sh --extra-tests openvz --debug /usr/lib/hobbit/server/ext/rrd_openvz.sh : #!/bin/sh echo "Pop !" > /tmp/plouf hostname=$1 testname=$2 messagefile=$3 echo "Host $hostname" >> /tmp/plouf echo "Test $testname" >> /tmp/plouf echo "Message file $messagefile" >> /tmp/plouf cat $messagefile >> /tmp/plouf exit 0 /var/log/hobbit/rrd-status.log : [...] 2008-09-25 18:01:41 RRD update param 01: '/var/lib/hobbit/rrd/<some other host 1>/memory.actual.rrd' 2008-09-25 18:01:41 RRD update param 02: '-t' 2008-09-25 18:01:41 RRD update param 03: 'realmempct' 2008-09-25 18:01:41 RRD update param 04: '1222358501:22' 2008-09-25 18:01:41 Want msg 7363, startpos 128053, fillpos 128053, endpos -1, usedbytes=0, bufleft=400330 2008-09-25 18:01:42 hobbitd_rrd: Got message 7363 @@status#7363| 1222358502.509616|10.1.60.214||<the host I want to check>|openvz| 1222360302|green||green|1222249676|0||0||1222358207 2008-09-25 18:01:42 startpos 128527, fillpos 128527, endpos -1 2008-09-25 18:01:42 Want msg 7364, startpos 128527, fillpos 128527, endpos -1, usedbytes=0, bufleft=399856 2008-09-25 18:01:44 hobbitd_rrd: Got message 7364 @@status#7364| 1222358504.541929|10.1.0.52||<some other host 2>|cpu|1222360304|green|| green|1222302537|0||0||0 2008-09-25 18:01:44 startpos 130305, fillpos 130305, endpos -1 2008-09-25 18:01:44 RRD update param 00: 'rrdupdate' 2008-09-25 18:01:44 RRD update param 01: '/var/lib/hobbit/rrd/<some other host 2>/la.rrd' [...] Could anyone see something that would be wrong there ? Thanks in advance :) Regards Sebastien-- Rich Smrcina VM Assist, Inc. Phone: XXX-XXX-XXXX Ans Service: XXX-XXX-XXXX user-61add9955ef9@xymon.invalid http://www.linkedin.com/in/richsmrcina Catch the WAVV! http://www.wavv.org WAVV 2009 - Orlando, FL - May 15-19, 2009
list Sébastien Munch
▸
Le jeudi 25 septembre 2008 à 11:31 -0500, Rich Smrcina a écrit :
Did you add your graph definition to hobbitgraph.cfg? You would need to bounce Hobbit after changing that file since it is only processed once.
I didn't add the graph definition. From my experience, the graph definition is not needed for hobbit to create the .rrd files. However, I've created a "dumb" graph definition : [openvz] TITLE OpenVZ limits YAXIS % Used It didn't help. Weird... Regards, Sebastien Munch
list Sébastien Munch
Hello, As a complementary information, using "ps auxw" shows that hobbitd_channel is correctly started : hobbit 19873 0.0 0.0 1892 520 ? S 14:56 0:00 hobbitd_channel --channel=status --log=/var/log/hobbit/rrd-status.log hobbitd_rrd --rrddir=/var/lib/hobbit/rrd --extra-script /usr/lib/hobbit/server/ext/rrd_openvz.sh --extra-tests openvz However, the script is still not executed... Regards Sebastien
list Tom Kauffman
This is a potentially dumb question - but are you sure your client-side test is returning 'status' messages? If they're 'data' messages, you'll need to change '--channel=status' to '--channel=data'. Tom
▸
-----Original Message-----
From: Sébastien Munch [mailto:user-81411fe4ed54@xymon.invalid]
Sent: Friday, September 26, 2008 9:14 AM
To: user-ae9b8668bcde@xymon.invalid
Subject: [hobbit] hobbitd_rrd not starting an extra script - more information
Hello,
As a complementary information, using "ps auxw" shows that
hobbitd_channel is correctly started :
hobbit 19873 0.0 0.0 1892 520 ? S 14:56 0:00
hobbitd_channel --channel=status --log=/var/log/hobbit/rrd-status.log
hobbitd_rrd --rrddir=/var/lib/hobbit/rrd
--extra-script /usr/lib/hobbit/server/ext/rrd_openvz.sh --extra-tests
openvz
However, the script is still not executed...
Regards
Sebastien
list Sébastien Munch
▸
Le vendredi 26 septembre 2008 à 09:53 -0400, Kauffman, Tom a écrit :
This is a potentially dumb question - but are you sure your client-side test is returning 'status' messages? If they're 'data' messages, you'll need to change '--channel=status' to '--channel=data'.
Double-checked again :) It is definitely a 'status' message ; and it is displayed as a column in the Hobbit web interface. Regards Sebastien
list Graham Nayler
Sébastien I think this one is pretty simple - ready to kick yourself? Try putting "=" (without quotes) instead of the blank after --extra-script and --extra-tests! Once that's done though you may hit another problem, over which I've been tearing my hair out for the last week. I got the graphs connected up OK, but values were only being written into it very intermittently. I've finally tracking it down to a bug in the external script handler do_external.c (at least in the version we're running - snapshot as of 9th Sept). This does not apply to 4.2.0 - but we had troubles getting that to work with BBWin (we're monitoring Windows boxes). The problem is that recent versions of hobbit caches writes to RRD, but the external script is handled by a forked process, which only operates on a copy of the cache controller, and not that of the main process. I'll submit my fix (albeit crude) when I've worked out haw to do so (I'm really new to this open source stuff)!, Graham Nayler
▸
Sébastien Munch wrote: Hello I'm trying to create an extra script for hobbit_rrd. I've followed tutorials found on the net, especially http://www.trantor.org/theshire/doku.php/tutorials:customgraph I'm getting the information in the status page. Data is correctly sent to the hobbit server. Everything seems to be configured correctly, but I'm not getting any rrd data. In the configurations, I've double-checked paths, execution rights, etc. To simplify the tests, I've changed my extra-script so that it writes everything in a temporary file. The script isn't started : it doesn't write in this temporary file. In the rrd-status log, I don't see anything about executing the extra script. hobbitlaunch.cfg : [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/rrd --extra-script /usr/lib/hobbit/server/ext/rrd_openvz.sh --extra-tests openvz --debug [snip]
Graham Nayler
list Rich Smrcina
Equal signs, indeed. Nice catch! As far as submitting fixes, if they're not too big I might suggest just posting them to the list. If folks are interested in it, they can try it out and give you feedback.
▸
Graham Nayler wrote:Sébastien I think this one is pretty simple - ready to kick yourself? Try putting "=" (without quotes) instead of the blank after --extra-script and --extra-tests! Once that's done though you may hit another problem, over which I've been tearing my hair out for the last week. I got the graphs connected up OK, but values were only being written into it very intermittently. I've finally tracking it down to a bug in the external script handler do_external.c (at least in the version we're running - snapshot as of 9th Sept). This does not apply to 4.2.0 - but we had troubles getting that to work with BBWin (we're monitoring Windows boxes). The problem is that recent versions of hobbit caches writes to RRD, but the external script is handled by a forked process, which only operates on a copy of the cache controller, and not that of the main process. I'll submit my fix (albeit crude) when I've worked out haw to do so (I'm really new to this open source stuff)!, Graham Nayler
-- Rich Smrcina VM Assist, Inc. Phone: XXX-XXX-XXXX Ans Service: XXX-XXX-XXXX user-61add9955ef9@xymon.invalid http://www.linkedin.com/in/richsmrcina Catch the WAVV! http://www.wavv.org WAVV 2009 - Orlando, FL - May 15-19, 2009
list Sébastien Munch
Graham, Okay, nice... I'm preparing to kick myself. Thanks -- Sébastien
list Henrik Størner
▸
In <1222359096.12262.34.camel at sebastien-desktop> =?ISO-8859-1?Q?S=E9bastien?= Munch <user-81411fe4ed54@xymon.invalid> writes:
The script isn't started : it doesn't write in this temporary file.
In the rrd-status log, I don't see anything about executing the extra script.
hobbitlaunch.cfg :
[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/rrd
--extra-script /usr/lib/hobbit/server/ext/rrd_openvz.sh --extra-tests
openvz --debugHate to point out the obvious, but those options should be --extra-script=/usr/lib/hobbit/server/ext/rrd_openvz.sh and --extra-tests=openvz with an equal sign ... Henrik