[hobbit] How to integrate Hobbit and MRTG

Henrik Stoerner henrik at hswn.dk
Wed Mar 23 20:31:48 CET 2005


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



More information about the Xymon mailing list