Variable lines in graphs
list Hobbit Client
Hello, I have a problem with rrdtool graphs. I have created an external script that reads fan speeds and I want to draw that information. However, not all of the servers have the same number of fans, so Lines in graph are variable and I don't know what I have to write in hobbitgraph.cfg. Could you help me? Thank you!
list S Aiello
So you said you already have a script running collecting data and creating/updating RRD files ? These should be written under data/rrd/DeviceName/ (DeviceName being the name of the device in Hobbit). So your data collection script could create/update files like; fan.1.rrd, fan.2.rrd, fan.3.rrd, etc... Then under the server/etc/hobbitgraph.cfg you would need to tell hobbit how to build a graph from your collected data. i.e. [fan] FNPATTERN fan\.(.*)\.rrd TITLE Fans YAXIS RPM DEF:r at RRDIDX@=@RRDFN@:rpm:AVERAGE LINE2:r at RRDIDX@#@COLOR@:@RRDPARAM@ GPRINT:r at RRDIDX@:LAST: : %5.1lf (cur) GPRINT:r at RRDIDX@:MAX: : %5.1lf (max) GPRINT:r at RRDIDX@:MIN: : %5.1lf (min) GPRINT:r at RRDIDX@:AVERAGE: : %5.1lf (avg)\n Then you will need to edit server/etc/hobbitserver.cfg, and add "fan" to the GRAPHS= and/or TEST2RRD=. Please reference the hobbitgraph.cfg man page for further info.
▸
On Friday 13 April 2007 08:51, Hobbit Client wrote:Hello, I have a problem with rrdtool graphs. I have created an external script that reads fan speeds and I want to draw that information. However, not all of the servers have the same number of fans, so Lines in graph are variable and I don't know what I have to write in hobbitgraph.cfg. Could you help me? Thank you!
list Hobbit Client
Thanks for the answer. Yes, I already have the scripts (one for Linux and other for Windows) and I have others scripts with their graphs but I don't know how to create files like you say (fan.1.rrd). I only make a graph called fan.rrd for each server and I haven't found anything about it in man pages. How can I make them? Thanks for your help!
list Charles Goyard
▸
Hobbit Client wrote :
Thanks for the answer. Yes, I already have the scripts (one for Linux and other for Windows) and I have others scripts with their graphs but I don't know how to create files like you say (fan.1.rrd). I only make a graph called fan.rrd for each server and I haven't found anything about it in man pages. How can I make them?
Hi, it fact, you can't unless you apply a patch I submitted somes weeks (and months) ago. Search the archive for : Date: Thu, 29 Mar 2007 17:07:01 +0200 Subject: Re: [hobbit] Custom graphs again There's a patch that lets one have split rrd files just like the disk column, but for NCV-like output. It comes with full documentation (in the man pages and tutorial). I hope one day it will be integrated in the mainstream hobbit. I use it in production for several months and works like a charm. Regards, -- Charles Goyard - user-a6cdca7046e2@xymon.invalid - (+33) 1 45 38 01 31 Orange Business Services - online multimedia // ingénierie
list Hobbit Client
Thanks for the answer. I began reading mails since January 2006 looking for some answer so I didn't reach it yet :) So, I have to add each line with "+" in the files you say o I can execute the patch so that it changes all of them? Sorry if my question is too obvious... 2007/4/16, Charles Goyard <user-a6cdca7046e2@xymon.invalid>:
▸
Hobbit Client wrote :Thanks for the answer. Yes, I already have the scripts (one for Linux and other for Windows) and I have others scripts with their graphs but I don't know how to create files like you say (fan.1.rrd). I only make a graph called fan.rrd for each server and I haven't found anything about it in man pages. How can I make them?Hi, it fact, you can't unless you apply a patch I submitted somes weeks (and months) ago. Search the archive for : Date: Thu, 29 Mar 2007 17:07:01 +0200 Subject: Re: [hobbit] Custom graphs again There's a patch that lets one have split rrd files just like the disk column, but for NCV-like output. It comes with full documentation (in the man pages and tutorial). I hope one day it will be integrated in the mainstream hobbit. I use it in production for several months and works like a charm. Regards, -- Charles Goyard - user-a6cdca7046e2@xymon.invalid - (+33) 1 45 38 01 31 Orange Business Services - online multimedia // ingénierie
list Charles Goyard
▸
Hobbit Client wrote :
So, I have to add each line with "+" in the files you say
Yes, you can do that manually if you want, but the "patch" command does it for you :) To keep it straight: - the patch applies to the source code. If you installed hobbit from a binary package rather than source, then you'll have to get the source first. - change to the source directory of hobbit (cd /usr/local/src/hobbit-4.2.0) - run the command: patch -p1 < /path/to/split-ncv2.patch - recompile hobbit - reinstall (you can reinstall only hobbitd_rrd if you want) - restart hobbit (or just kill the hobbitd_rrd, it will be restarted) Hope that helps,
▸
--
Charles Goyard - user-a6cdca7046e2@xymon.invalid - (+33) 1 45 38 01 31
Orange Business Services - online multimedia // ingénierie
list Hobbit Client
Thanks! I will try it.
▸
2007/4/16, Charles Goyard <user-a6cdca7046e2@xymon.invalid>:Hobbit Client wrote :So, I have to add each line with "+" in the files you sayYes, you can do that manually if you want, but the "patch" command does it for you :) To keep it straight: - the patch applies to the source code. If you installed hobbit from a binary package rather than source, then you'll have to get the source first. - change to the source directory of hobbit (cd /usr/local/src/hobbit-4.2.0 ) - run the command: patch -p1 < /path/to/split-ncv2.patch - recompile hobbit - reinstall (you can reinstall only hobbitd_rrd if you want) - restart hobbit (or just kill the hobbitd_rrd, it will be restarted) Hope that helps, -- Charles Goyard - user-a6cdca7046e2@xymon.invalid - (+33) 1 45 38 01 31 Orange Business Services - online multimedia // ingénierie
list Hobbit Client
Hello,
I run the command as you told me and I have had some problems:
[root at proyServer hobbit-4.2.0]# patch -p1 < split-ncv2.patch
(Stripping trailing CRs from patch.)
patching file hobbitd/do_rrd.c
(Stripping trailing CRs from patch.)
patching file hobbitd/do_rrd.h
(Stripping trailing CRs from patch.)
patching file hobbitd/hobbitd_rrd.8
(Stripping trailing CRs from patch.)
patching file hobbitd/hobbitd_rrd.c
(Stripping trailing CRs from patch.)
patching file hobbitd/rrd/do_ncv.c
Hunk #1 FAILED at 5.
Hunk #2 FAILED at 18.
Hunk #3 FAILED at 94.
3 out of 3 hunks FAILED -- saving rejects to file hobbitd/rrd/do_ncv.c.rej
Then, I have recompiled, reintalled and restarted Hobbit and I have changed
hobbitserver.cfg and hobbitgraph.cfg:
Hobbitserver.cfg:
TEST2RRD="cpu=la,disk, ... , fan=ncv"
SPLITNCV_fan="fan1:GAUGE,fan2:GAUGE,fan3:GAUGE,fan4:GAUGE"
Hobbitgraph,cfg:
[fan]
FNPATTERN fan\.(.*)\.rrd
TITLE Fan Speed
YAXIS RPM
DEF:p at RRDIDX@=@RRDFN@:fan1:AVERAGE
DEF:p at RRDIDX@=@RRDFN@:fan2:AVERAGE
DEF:p at RRDIDX@=@RRDFN@:fan3:AVERAGE
DEF:p at RRDIDX@=@RRDFN@:fan4:AVERAGE
LINE2:p at RRDIDX@#@COLOR@:@RRDPARAM@
GPRINT:p at RRDIDX@:LAST: \: %5.1lf (cur)
GPRINT:p at RRDIDX@:MAX: \: %5.1lf (max)
GPRINT:p at RRDIDX@:MIN: \: %5.1lf (min)
GPRINT:p at RRDIDX@:AVERAGE: \: %5.1lf (avg)\n
The scripts send the information as:
fan1 : $fan1 rpm
fan2 : $fan2 rpm
...
according to the number of fans.
Now I don´t have any .rrd file. Can you help me? Thanks!
2007/4/16, Hobbit Client <user-10a61b5322b3@xymon.invalid>:▸
Thanks! I will try it. 2007/4/16, Charles Goyard <user-a6cdca7046e2@xymon.invalid >:Hobbit Client wrote :So, I have to add each line with "+" in the files you sayYes, you can do that manually if you want, but the "patch" command does it for you :) To keep it straight: - the patch applies to the source code. If you installed hobbit from a binary package rather than source, then you'll have to get the source first.
- change to the source directory of hobbit (cd /usr/local/src/hobbit- 4.2.0)
▸
- run the command: patch -p1 < /path/to/split-ncv2.patch - recompile hobbit - reinstall (you can reinstall only hobbitd_rrd if you want) - restart hobbit (or just kill the hobbitd_rrd, it will be restarted) Hope that helps, -- Charles Goyard - user-a6cdca7046e2@xymon.invalid - (+33) 1 45 38 01 31 Orange Business Services - online multimedia // ingénierie
list Charles Goyard
Hi, I believe my patch depends on that one : http://www.hswn.dk/hobbitsw/patches/ncv-ignoretext.patch Either apply it or apply the whole "all-in-one" : http://www.hswn.dk/hobbitsw/patches/allinone.patch Sorry I did not point that out. Regards,
▸
Hobbit Client wrote :Hello, I run the command as you told me and I have had some problems: patching file hobbitd/rrd/do_ncv.c Hunk #1 FAILED at 5. Hunk #2 FAILED at 18. Hunk #3 FAILED at 94. 3 out of 3 hunks FAILED -- saving rejects to file hobbitd/rrd/do_ncv.c.rej
-- Charles Goyard - user-a6cdca7046e2@xymon.invalid - (+33) 1 45 38 01 31 Orange Business Services - online multimedia // ingénierie
list Hobbit Client
Hi again, I have installed all-in-one patch and then your patch again but it continues without working. The installation shows the same errors and hobbitgraph.cfgdoesn´t recognize: FNPATTERN fan\.(.*)\.rrd. I have also tried with FNPATTERN fan.(.*).rrd but it doesn't work either. I'm sorry to bother you but I need it works. Thanks! 2007/4/17, Charles Goyard <user-a6cdca7046e2@xymon.invalid>:
▸
Hi, I believe my patch depends on that one : http://www.hswn.dk/hobbitsw/patches/ncv-ignoretext.patch Either apply it or apply the whole "all-in-one" : http://www.hswn.dk/hobbitsw/patches/allinone.patch Sorry I did not point that out. Regards, Hobbit Client wrote :Hello, I run the command as you told me and I have had some problems: patching file hobbitd/rrd/do_ncv.c Hunk #1 FAILED at 5. Hunk #2 FAILED at 18. Hunk #3 FAILED at 94. 3 out of 3 hunks FAILED -- saving rejects to file hobbitd/rrd/do_ncv.c.rej-- Charles Goyard - user-a6cdca7046e2@xymon.invalid - (+33) 1 45 38 01 31 Orange Business Services - online multimedia // ingénierie
list Hobbit Client
Finally I could changed the files of the patch but it continues without
working. Have I to add something more in hobbitserver.cfg? Or it's like
that:
TEST2RRD="cpu=la,disk, ... , fan=ncv"
SPLITNCV_fan="fan1:GAUGE,fan2:GAUGE,fan3:GAUGE,fan4:GAUGE" ?
Thanks!
2007/4/18, Hobbit Client <user-10a61b5322b3@xymon.invalid>:▸
Hi again, I have installed all-in-one patch and then your patch again but it continues without working. The installation shows the same errors and
hobbitgraph.cfg doesn´t recognize: FNPATTERN fan\.(.*)\.rrd. I have also
▸
tried with FNPATTERN fan.(.*).rrd but it doesn't work either. I'm sorry to bother you but I need it works. Thanks! 2007/4/17, Charles Goyard <user-a6cdca7046e2@xymon.invalid >:Hi, I believe my patch depends on that one : http://www.hswn.dk/hobbitsw/patches/ncv-ignoretext.patch Either apply it or apply the whole "all-in-one" : http://www.hswn.dk/hobbitsw/patches/allinone.patch Sorry I did not point that out. Regards, Hobbit Client wrote :Hello, I run the command as you told me and I have had some problems: patching file hobbitd/rrd/do_ncv.c Hunk #1 FAILED at 5. Hunk #2 FAILED at 18. Hunk #3 FAILED at 94. 3 out of 3 hunks FAILED -- saving rejects to file hobbitd/rrd/do_ncv.c.rej-- Charles Goyard - user-a6cdca7046e2@xymon.invalid - (+33) 1 45 38 01 31 Orange Business Services - online multimedia // ingénierie
list Hobbit Client
I don't know what I have changed that already creates the different files .rrd. I have read the name that it gives to the variables and have modified hobbitgraph.cfg and it already paints well the graphs. Thank you very much! 2007/4/20, Hobbit Client <user-10a61b5322b3@xymon.invalid>:
▸
Finally I could changed the files of the patch but it continues without working. Have I to add something more in hobbitserver.cfg? Or it's like that: TEST2RRD="cpu=la,disk, ... , fan=ncv" SPLITNCV_fan="fan1:GAUGE,fan2:GAUGE,fan3:GAUGE,fan4:GAUGE" ? Thanks! 2007/4/18, Hobbit Client <user-10a61b5322b3@xymon.invalid>:Hi again, I have installed all-in-one patch and then your patch again but it continues without working. The installation shows the same errors and hobbitgraph.cfg doesn´t recognize: FNPATTERN fan\.(.*)\.rrd. I have also tried with FNPATTERN fan.(.*).rrd but it doesn't work either. I'm sorry to bother you but I need it works. Thanks! 2007/4/17, Charles Goyard < user-a6cdca7046e2@xymon.invalid >:Hi, I believe my patch depends on that one : http://www.hswn.dk/hobbitsw/patches/ncv-ignoretext.patch Either apply it or apply the whole "all-in-one" : http://www.hswn.dk/hobbitsw/patches/allinone.patch Sorry I did not point that out. Regards, Hobbit Client wrote :Hello, I run the command as you told me and I have had some problems: patching file hobbitd/rrd/do_ncv.c Hunk #1 FAILED at 5. Hunk #2 FAILED at 18. Hunk #3 FAILED at 94. 3 out of 3 hunks FAILED -- saving rejects to file hobbitd/rrd/do_ncv.c.rej-- Charles Goyard - user-a6cdca7046e2@xymon.invalid - (+33) 1 45 38 01 31 Orange Business Services - online multimedia // ingénierie