How to integrate Hobbit and MRTG
I've been playing about with MRTG today, and found out that adding MRTG graphs to the Hobbit set of graphs was a very simple task. Since this is probably something that others can use, I've written up a short description of how to do it: http://www.hswn.dk/hobbit/help/hobbit-mrtg.html
The short story is that you can configure MRTG so that it stores its datafiles in RRDtool format directly into the directory where Hobbit looks for all of the other RRD files for a host. So with a "mrtg" entry in the hobbitgraph.cfg file and an extra entry for "mrtg" in hobbitserver.cfg's GRAPHS setting, I've got the MRTG graphs showing up as normal Hobbit graphs on the "trends" page:
http://www.hswn.dk/hobbit-cgi/bb-hostsvc.sh?HOSTSVC=fenris,hswn,dk.trends&IP... (a bit down that page, 3rd and 4th last graphs)
The detailed view is here:
http://www.hswn.dk/hobbit-cgi/hobbitgraph.sh?host=fenris.hswn.dk&service=mrt...
I did make one simple tweak to the Hobbit code for this - hobbitgraph normally bundles graphs into bunches of 5, which doesn't work well for the MRTG graphs. So I made the "5" configurable so I could get one graph per network interface.
I think it's neat :-)
Henrik
Nice work henrik. I was just working the bb mrtg script from deadcat, but this looks like a better way to go.
Now you just need to get hobbit to make toast in the morning...
On Wed, 23 Mar 2005 17:48:54 +0100, Henrik Stoerner <henrik at hswn.dk> wrote:
I've been playing about with MRTG today, and found out that adding MRTG graphs to the Hobbit set of graphs was a very simple task. Since this is probably something that others can use, I've written up a short description of how to do it: http://www.hswn.dk/hobbit/help/hobbit-mrtg.html
The short story is that you can configure MRTG so that it stores its datafiles in RRDtool format directly into the directory where Hobbit looks for all of the other RRD files for a host. So with a "mrtg" entry in the hobbitgraph.cfg file and an extra entry for "mrtg" in hobbitserver.cfg's GRAPHS setting, I've got the MRTG graphs showing up as normal Hobbit graphs on the "trends" page:
http://www.hswn.dk/hobbit-cgi/bb-hostsvc.sh?HOSTSVC=fenris,hswn,dk.trends&IP... (a bit down that page, 3rd and 4th last graphs)
The detailed view is here:
http://www.hswn.dk/hobbit-cgi/hobbitgraph.sh?host=fenris.hswn.dk&service=mrt...
I did make one simple tweak to the Hobbit code for this - hobbitgraph normally bundles graphs into bunches of 5, which doesn't work well for the MRTG graphs. So I made the "5" configurable so I could get one graph per network interface.
I think it's neat :-)
Henrik
To unsubscribe from the hobbit list, send an e-mail to hobbit-unsubscribe at hswn.dk
On Wed, Mar 23, 2005 at 11:54:30AM -0500, Kevin Grady wrote:
Nice work henrik. I was just working the bb mrtg script from deadcat, but this looks like a better way to go.
Thanks!
Now you just need to get hobbit to make toast in the morning...
For that specific task, I have a much better solution.
Henrik
On Wed, Mar 23, 2005 at 05:48:54PM +0100, Henrik Stoerner wrote:
I've been playing about with MRTG today
A patch against Hobbit RC6 is avaiable at http://www.hswn.dk/beta/postRC6-mrtg.patch
This adds the "mrtg" entry to hobbitgraph.cfg, changes the default "GRAPHS" setting in hobbitserver.cfg (just add ",mrtg::1" to the entry in your file), and makes bb-larrdcolumn recognize the "::1" syntax for Hobbit.
Install with cd hobbit-4.0-RC6 patch -p0 </tmp/postRC6-mrtg.patch make
Then stop Hobbit, do "make install" as root, and start Hobbit.
Henrik
On Wed, 2005-03-23 at 17:48 +0100, Henrik Stoerner wrote:
I've been playing about with MRTG today, and found out that adding MRTG graphs to the Hobbit set of graphs was a very simple task. Since this is probably something that others can use, I've written up a short description of how to do it: http://www.hswn.dk/hobbit/help/hobbit-mrtg.html
The short story is that you can configure MRTG so that it stores its datafiles in RRDtool format directly into the directory where Hobbit looks for all of the other RRD files for a host.
That's ok for a few, but it won't scale terribly well. I have over 5000 points that I am currently monitoring with mrtg. I have that broken down into a three tier directory structure (region - site - device), with all of the thresholds and alerting from bbmrtg.pl.
Is there a way I can point to my existing rrd directory structure for the graphing bit - which bbmrtg.pl doesn't do terribly well - but still keep my stuff in its nice hierarchy?
On Wed, Mar 23, 2005 at 11:37:19AM -0600, Daniel J McDonald wrote:
That's ok for a few, but it won't scale terribly well. I have over 5000 points that I am currently monitoring with mrtg. I have that broken down into a three tier directory structure (region - site - device), with all of the thresholds and alerting from bbmrtg.pl.
OK, I haven't looked at bbmrtg.pl in much detail, and it clearly does a lot more than just provide access to the graphs.
Is there a way I can point to my existing rrd directory structure for the graphing bit - which bbmrtg.pl doesn't do terribly well - but still keep my stuff in its nice hierarchy?
Hmm ... well, hobbitgraph.cgi is actually fairly agnostic about what kind of data it gets. If you've got data in RRDtool format, it should be possible to generate the graphs with that.
(Note - I just checked the hobbitgraph.cgi man-page, and it's missing some updates. There's an extra CGI parameter that is needed to actually make it do something. I'll get that updated).
If you have an RRD file /var/lib/foo/mydata.rrd that you want to graph, then you call hobbitgraph.cgi with
REQUEST_URI=""
QUERY_STRING="host=something&service=mydata&graph=hourly&action=view"
hobbitgraph.cgi --rrddir=/var/lib/foo
Normally when hobbitgraph.cgi runs as a CGI script, REQUEST_URI is setup automatically.
For this to work, you must have a graph definition in hobbitgraph.cfg that defines how a "mydata" graph is generated. The "service" parameter is used as a key into the hobbitgraph.cfg definitions.
Regards, Henrik
participants (3)
-
dan.mcdonald@austinenergy.com
-
henrik@hswn.dk
-
kevin.grady@gmail.com