Graphing only changes in a value?

Templates, scripts for templates, scripts and requests for templates.

Moderators: Developers, Moderators

Post Reply
sjs
Posts: 22
Joined: Wed Oct 24, 2007 1:22 pm

Graphing only changes in a value?

Post by sjs »

Hi all!

I've got a counter (the numbers of printed pages by a network printer to be precise) which I could query via SNMP. However, showing an ever increasing graph which shows the total number of pages printed wouldn't be too helpful in my opinion. Therefore I would like to ask: is there any allready existing method in Cacti (or rrdtool) to not show the absolute number of a counter but only its changes over time?
To give an example: When five pages are printed in a certain time interval, the counter increases from "123456" to "123461". But Cacti should show only a graph value of "5" for that specific time interval. (And "0" before and after if no more pages are printed.)

TIA,
sjs
User avatar
XTech
Cacti User
Posts: 59
Joined: Sat May 26, 2012 9:25 pm

Re: Graphing only changes in a value?

Post by XTech »

sjs wrote: I've got a counter (the numbers of printed pages by a network printer to be precise) which I could query via SNMP. However, showing an ever increasing graph which shows the total number of pages printed wouldn't be too helpful in my opinion. Therefore I would like to ask: is there any allready existing method in Cacti (or rrdtool) to not show the absolute number of a counter but only its changes over time?
To give an example: When five pages are printed in a certain time interval, the counter increases from "123456" to "123461". But Cacti should show only a graph value of "5" for that specific time interval. (And "0" before and after if no more pages are printed.)
sjs
Try to use GAUGE data source type instead of COUNTER in Data Template.
sjs
Posts: 22
Joined: Wed Oct 24, 2007 1:22 pm

Re: Graphing only changes in a value?

Post by sjs »

XTech wrote:
sjs wrote: To give an example: When five pages are printed in a certain time interval, the counter increases from "123456" to "123461". But Cacti should show only a graph value of "5" for that specific time interval. (And "0" before and after if no more pages are printed.)
sjs
Try to use GAUGE data source type instead of COUNTER in Data Template.
Thanks for the hint.
But JFTR, as I found out in the meantime, it's exactly the other way round: GAUGE will show "123456" and "123461" (to stick with the abovementioned example) while COUNTER will show "5". (After applying a CDEF to convert the per second(?) value to a polling interval value.)


Regards
sjs
User avatar
XTech
Cacti User
Posts: 59
Joined: Sat May 26, 2012 9:25 pm

Re: Graphing only changes in a value?

Post by XTech »

Sorry, I posted a wrong hint. Just confused with GAUGE and COUNTER, edited data sources last time a while ago. But as I see, you solved your problem despite of my wrong hint :-)
Jujonet
Posts: 1
Joined: Thu Nov 30, 2017 5:36 am

Re: Graphing only changes in a value?

Post by Jujonet »

sjs wrote: Thanks for the hint.
But JFTR, as I found out in the meantime, it's exactly the other way round: GAUGE will show "123456" and "123461" (to stick with the abovementioned example) while COUNTER will show "5". (After applying a CDEF to convert the per second(?) value to a polling interval value.)
Hi! Have exactly the same issue; could you point me the CDEF you used to convert to the "per second" pls?
I'm to track water usage by hour/day/week/month and already have access to the total liters counter value

Regards
sjs
Posts: 22
Joined: Wed Oct 24, 2007 1:22 pm

Re: Graphing only changes in a value?

Post by sjs »

sjs wrote: Hi! Have exactly the same issue; could you point me the CDEF you used to convert to the "per second" pls?
On my cacti installation it's called "Make Per 5 Minutes". But I don't know, if this CDEF comes with the standard cacti package or if it was installed by one of the "external" graph templates I'm using.


HTH,
sjs
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests