Extract text values (MAX & Average) from rrd file

Post support questions that directly relate to Linux/Unix operating systems.

Moderators: Developers, Moderators

Post Reply
RandomWelshBloke
Posts: 33
Joined: Mon Feb 18, 2002 7:00 pm
Location: London, UK

Extract text values (MAX & Average) from rrd file

Post by RandomWelshBloke »

Does anyone know of a good way to extract text values (MAX & Average) from a rrd file?

The intention is to have a dashboard type page summarising the statistics for a whole network.

e.g. Location, bandwidth, traffic, %utilisation for all sites on one page. Possibly flagging sites that are over 80% utilised for example.

I did look at the rrd xport function but it produces a mental amount of data :-?

Any Ideas are more than welcome :D
raX
Lead Developer
Posts: 2243
Joined: Sat Oct 13, 2001 7:00 pm
Location: Carlisle, PA
Contact:

Post by raX »

To get the last entry from an rrd, I recommend a command like:

Code: Select all

rrdtool fetch <filename.rrd> AVERAGE --start 0 --end 0
The result should be the time of data gather followed by the result in floating point.

-Ian
RandomWelshBloke
Posts: 33
Joined: Mon Feb 18, 2002 7:00 pm
Location: London, UK

Post by RandomWelshBloke »

The specific data I am after is the MAX and AVERAGE values printed on the Monthly (2 Hour Average) graph.

The end goal is to have this inserted into a web page.

So far looked at...

The info command gives MAX and AVERAGE values but they are not the same as on the graph other than MAX for the Day graph :-?

The fetch command produces the raw data which would need to be manipulated, and isn't as elegant as I'm sure it can be.

The Perl bindings look like they might do the trick but I can't say I am that familiar with working with them!

Any further ideas? Or links to info!
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests