How can I graph a line with old data?
Moderators: Developers, Moderators
How can I graph a line with old data?
I need to compare the values of the current day with the values of the previous days of the week.
Using the command "rrdtool fetch" the answer is a type number:
1266407100: 3.3986666667e +01
This does not seem a valid value for Cacti.
How can I make it a valid number for Cacti?
Anybody know a script that makes the extraction of data from an rrd file and submit it as an integer?
Thx
Using the command "rrdtool fetch" the answer is a type number:
1266407100: 3.3986666667e +01
This does not seem a valid value for Cacti.
How can I make it a valid number for Cacti?
Anybody know a script that makes the extraction of data from an rrd file and submit it as an integer?
Thx
- gandalf
- Developer
- Posts: 22383
- Joined: Thu Dec 02, 2004 2:46 am
- Location: Muenster, Germany
- Contact:
Do you only request a single data point?
Or is the SHIFT function the solution? Please see http://www.vandenbogaerdt.nl
R.
Or is the SHIFT function the solution? Please see http://www.vandenbogaerdt.nl
R.
Thank you for support.
I will try to explain better.
I want to have a graph showing two lines (A and B).
The first line (A) is the data in real time, the second line (B) is the data observed seven days before the same hour.
The value A is detected by a getSnmpdata and recorded in the file lineA.rrd and this works well.
The value B should read the file lineA.rrd for the value recorded 7 days before.
Thanks
I will try to explain better.
I want to have a graph showing two lines (A and B).
The first line (A) is the data in real time, the second line (B) is the data observed seven days before the same hour.
The value A is detected by a getSnmpdata and recorded in the file lineA.rrd and this works well.
The value B should read the file lineA.rrd for the value recorded 7 days before.
Thanks
- gandalf
- Developer
- Posts: 22383
- Joined: Thu Dec 02, 2004 2:46 am
- Location: Muenster, Germany
- Contact:
Well, fine. That's the perfect use case for SHIFT. See the explanation at the web site I advertised above. Unfortunately, this is not yet supported by current 087; but this will be supported by 088; the code is already in. 088 is NOT yet in beta state. So if you need a solution now, this turns out to be a problem.
R.
R.
Right, the example given in the link is just my case, of course, all integrated into cacti.
I thought I crare invoked through a script that cacti could give as output the value recorded in a file rrd.
For example:
#/bin/bash!
value_b=0
value_b='rrdtool fetch lineA.rrd AVERAGE -s -7d -e -7d`
echo value_b
But the output 1266407100: 3.3986666667e +01 don't seem valid for cacti.
Wating full integration with cacti and not 'possible, in your opinion, use that or anyone script?
Grazie
I thought I crare invoked through a script that cacti could give as output the value recorded in a file rrd.
For example:
#/bin/bash!
value_b=0
value_b='rrdtool fetch lineA.rrd AVERAGE -s -7d -e -7d`
echo value_b
But the output 1266407100: 3.3986666667e +01 don't seem valid for cacti.
Wating full integration with cacti and not 'possible, in your opinion, use that or anyone script?
Grazie
- TheWitness
- Developer
- Posts: 17007
- Joined: Tue May 14, 2002 5:08 pm
- Location: MI, USA
- Contact:
I would so something like:
TheWitness
Code: Select all
echo $number | awk -F: '{print $2}' | tr -d ' '
True understanding begins only when we realize how little we truly understand...
Life is an adventure, let yours begin with Cacti!
Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages
For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Life is an adventure, let yours begin with Cacti!
Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages
For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Who is online
Users browsing this forum: No registered users and 0 guests