Re: [rrd-developers] Making MRTG work with rrdcached

Tobias Oetiker <[email protected]>
Newsgroups gmane.network.mrtg.devel,gmane.comp.db.rrdtool.devel
Message-ID <[email protected]>
Hi Steve,

Today Steve Shipway wrote:

> > Steve said
> > > Is anyone currently working on making MRTG 2.16.x work correctly with
> > > rrdcached (RRDTool 1.4.x)?
>
> Tobi said
> > sounds interesting ... there are ideas on how to make updatev work
> > in rrdcached mode. It would require more of the functionality of
> > rrdtool to happen in memory before flushing data to disk. This
> > should be possible but it would require some rather involved heart
> > surgery.
>
> I couldn't wait, and started hacking :)
>
> I've submitted a small patch for MRTG that makes it
> rrdcached-aware, although for now it simply disables threshold
> checking and uses update rather than updatev.
>
> I've been hacking rrd_daemon.c to make it support INFO and LAST
> (done!) and I'm looking at making it support create.  For INFO
> and LAST, I've used the time on the rrd file itself rather than
> in the queue, since any calls to GRAPH and FETCH will bypass the
> cache anyway.  This also makes it much easier :).  For CREATE,
> there's a bit more of an issue since we probably want to prevent
> absolute pathnames; however, noone would be stupid enough to run
> their rrdcached as root now, would they...?  Maybe I should
> reject absolute paths if UID==0?
>
> Once these are done, I need to sort out the main functions to use
> rrdcached for these three, and finally get MRTG to recognise the
> features and use them.
>
> I've been shying away from the updatev function since, as Tobi
> says, it requires rather deep work to query the values still in
> the cache queue.  For INFO and LAST, and possibly even GRAPH and
> FETCH, you could get away with ignoring the cache queue and just
> reading from the RRD file (call a FLUSH before your graph/fetch
> if it bothers you) but you can't really do this with updatev.
>
> I wonder if the rrdgraph command could be supported by returning
> the graph image as a huge base64-encoded blob?  It would need to
> force a flush beforehand... (goes off to think)

steve,

note that rrdtool trunk supports remote graph commands (and fetch)
there is a special syntax, so that you can include data from
different remote locations into the same graph.

cheers
tobi

>
> Steve
>
> Steve Shipway
> ITS Unix Services Design Lead
> University of Auckland, New Zealand
> Floor 1, 58 Symonds Street, Auckland
> Phone: +64 (0)9 3737599 ext 86487
> DDI: +64 (0)9 924 6487
> Mobile: +64 (0)21 753 189
> Email: [email protected]
> ? Please consider the environment before printing this e-mail
>
>
>
> _______________________________________________
> mrtg-developers mailing list
> [email protected]
> https://lists.oetiker.ch/cgi-bin/listinfo/mrtg-developers
>

-- 
Tobi Oetiker, OETIKER+PARTNER AG, Aarweg 15 CH-4600 Olten, Switzerland
http://it.oetiker.ch [email protected] ++41 62 775 9902 / sb: -9900
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.