extract current value....

Post general support questions here that do not specifically fall into the Linux or Windows categories.

Moderators: Developers, Moderators

Post Reply
fozzy
Cacti User
Posts: 54
Joined: Mon Jan 09, 2006 11:33 am
Location: SE of LIML
Contact:

extract current value....

Post by fozzy »

Hi all, not sure if this has been asked before... i found some reference on google but not pointing to the forum and without an answer :( In fact i suspect it is more of a rrd question.. but i'll give it a try here.

I'm trying to create a simple way to find the most traffic generating ports in a location... so i'm using the different cacti tables together with the mac_track plugin tables to find all rrd files which reference traffic on devices in a particular location... up to here no big problem... the problem is i can't find the way to get the last input/output values for these ports...

how does cacti get the "Current:" value from the RRD?

i would then compare these values and create a sort of "top ten" query for every location... at least it could be useful if a remote location is giving some troubles...

Thanks in advance, Luca
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Post by Howie »

Two things - Cacti doesn't "get" the current value from the RRD, it puts it there. RRD then draws the graph (which includes that value). So you could look at the output from 'rrdtool info' - somewhere near the top is the last value added, if I remember.

The way that other plugins like thold do it is by intercepting the data between cacti and the rrd files using the poller_output plugin hook.

You might also want to look at reportit, which will at least do the fetching values and sorting them part, and can apply filters. You might need to adopt a naming scheme to get it to filter the way you want.
Weathermap 0.98a is out! & QuickTree 1.0. Superlinks is over there now (and built-in to Cacti 1.x).
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)
fozzy
Cacti User
Posts: 54
Joined: Mon Jan 09, 2006 11:33 am
Location: SE of LIML
Contact:

Post by fozzy »

Hello Howie,
thanks for the answer, unfortunately these values on't seem to have anything to do with the values i see in the graph...

Graph reports last as inbound 25.75 and out bound as 1.64 k while the rrdtool info gives as LAST values (which is the same as the last AVERAGE value) 1.7700447665e+04 1.6719428711e+04

The strangest part is that these last two values found in the RRA are very similar while the current values are quite different...

Thank you, Luca
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Post by Howie »

fozzy wrote:Hello Howie,
thanks for the answer, unfortunately these values on't seem to have anything to do with the values i see in the graph...

Graph reports last as inbound 25.75 and out bound as 1.64 k while the rrdtool info gives as LAST values (which is the same as the last AVERAGE value) 1.7700447665e+04 1.6719428711e+04

The strangest part is that these last two values found in the RRA are very similar while the current values are quite different...

Thank you, Luca
Oh my mistake. Those sound like they might be the actual byte counter values, rather than the calculated rate.

You know as I was typing it yesterday I was wondering to myself why I go through so much grief to get data for weathermap if rrdtool info would work, and that would be why :oops:
Weathermap 0.98a is out! & QuickTree 1.0. Superlinks is over there now (and built-in to Cacti 1.x).
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)
fozzy
Cacti User
Posts: 54
Joined: Mon Jan 09, 2006 11:33 am
Location: SE of LIML
Contact:

Post by fozzy »

:D

No problem, i'll continue waiting for a possible answer :)

Thanks again.

Luca
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest