[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Make a custom rrd file without NCV module
- To: hobbit (at) hswn.dk
- Subject: Make a custom rrd file without NCV module
- From: Eric LOEW <eloew (at) eloew.org>
- Date: Thu, 27 Nov 2008 11:32:54 +0100
- User-agent: Mutt/1.5.13 (2006-08-11)
Hi,
I want to create a custom rrd file to display a graph on a column in
hobbit.
The column (named test2) is Ok in hobbit and write datas send from a
client hobbit on an another server. I can't use NCV module because I
want to match a specific number in a specific line.
The column display datas like this
---------------------------------------------------------------------------
Thu Nov 27 11:12:13 2008
&green DR jour : 3145
&green DR periode : 54
&yellow Liste de DR à problème
---------------------
|Col1 | Col2 | Col3 |
+-----+------+------+
|Val1 | Val2 | Val3 |
|Val1 | Val2 | Val3 |
---------------------
--------------------------------------------------------------------------
I want to make a rrd file with one value : "DR periode :" (=54).
I do a script for making rrd :
#!/bin/sh
# Input parameters : Hostname, testname (column), and messagefile
HOSTNAME="$1"
TESTNAME="$2"
FNAME="$3"
date >> /tmp/rrd_ext.log
if [ "$TESTNAME"="test2" ]
then
DR=`grep "DR periode :" $FNAME | sed "s/.*: //`
echo "DS:DR:GAUGE:600:0:600"
echo "test2.rrd"
echo "$DR"
fi
exit 0
I modified hobbitlaunch.cfg :
rrdstatus]
ENVFILE /usr/local/hobbit/server/etc/hobbitserver.cfg
NEEDS hobbitd
CMD hobbitd_channel --channel=status --log=$BBSERVERLOGS/rrd-status.log \
hobbitd_rrd --rrddir=$BBVAR/rrd --debug \
--extra-script=/usr/local/hobbit/server/ext/rrd-ext.sh \
--extra-tests=test2
Finaly, i restart hobbit.
But the rrd file are not created and the script is never running.
Can someone help me or give me a link to a doc ?
Eric
--
(°- http://www.eloew.org -°)
//\ Page sur les canaris : http://canaris.eloew.org /\\
v_/_ Gestion de budget : http://lebufin.eloew.org _\_v