I want to be able to plot a graph of the difference over a certain length of time on a counter data source.
My particular case is a printer, I am receiving its total printed pages value into a graph but it would be good if I could display this as a graph of either total prints today or total prints in the last X seconds. It's not an option to reset the printers page count.
I've been trying to create a CDEF to do this for me currently I have this:
cdef=CURRENT_DATA_SOURCE,CURRENT_DATA_SOURCE,PREV,-
I rote this intending it to take the latest data value and then take the previous one from it and plot the result. Clearly it hasn't worked.
I would appreciate anyone’s help in making this work or creating a better one making use of the TIME function, but I don't fully understand how that one works.
Thanks.
CDEF to Show diference over time
Moderators: Developers, Moderators
Re: CDEF to Show diference over time
This is how graphs are displayed by default. Well technically it would be 'prints per second'.lawton27 wrote:... total prints in the last X seconds.
To display the number of prints from the last 5 minutes, use the following CDEF 'Make per 5 minutes'
Code: Select all
cdef=CURRENT_DATA_SOURCE,300,*
| Scripts: Monitor processes | RFC1213 MIB | DOCSIS Stats | Dell PowerEdge | Speedfan | APC UPS | DOCSIS CMTS | 3ware | Motorola Canopy |
| Guides: Windows Install | [HOWTO] Debug Windows NTFS permission problems |
| Tools: Windows All-in-one Installer |
All that does it multiply every value in the graph by 300.
That's not what I want. My graph is a continuous count of all printed pages by the printer, I want to be able to take a graph value and subtract from it the value of that graph 5 minutes ago to get the amount the graph has increased in the last 5 minutes.
That's not what I want. My graph is a continuous count of all printed pages by the printer, I want to be able to take a graph value and subtract from it the value of that graph 5 minutes ago to get the amount the graph has increased in the last 5 minutes.
What DS type are you using for your page count?
Have you read through http://docs.cacti.net/manual:087:6_refe ... cdef#cdefs to see if what you want is possible?
Have you read through http://docs.cacti.net/manual:087:6_refe ... cdef#cdefs to see if what you want is possible?
| Scripts: Monitor processes | RFC1213 MIB | DOCSIS Stats | Dell PowerEdge | Speedfan | APC UPS | DOCSIS CMTS | 3ware | Motorola Canopy |
| Guides: Windows Install | [HOWTO] Debug Windows NTFS permission problems |
| Tools: Windows All-in-one Installer |
for the data types see http://docs.cacti.net/manual:087:3_temp ... a_template
When using a counter, the value per time unit is calculated.
So this is probably what you want instead of a gauge.
I'm not sure though what happens when the counter overflows (when does this happen? when the printer is reset?)
Say you define a maximum of a million and when the value drops from 1000 to 0 it thinks there was an overflow and plots a peak of 999000....
Therefore, a DERIVE may also not be that wrong....
When using a counter, the value per time unit is calculated.
So this is probably what you want instead of a gauge.
I'm not sure though what happens when the counter overflows (when does this happen? when the printer is reset?)
Say you define a maximum of a million and when the value drops from 1000 to 0 it thinks there was an overflow and plots a peak of 999000....
Therefore, a DERIVE may also not be that wrong....
Who is online
Users browsing this forum: No registered users and 1 guest