Question: Graphing Continual Incremental Data

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

Moderators: Developers, Moderators

Post Reply
cowww
Posts: 4
Joined: Thu Apr 19, 2007 10:19 am

Question: Graphing Continual Incremental Data

Post by cowww »

I am moving forward in my life as a cacti user. I am making my first post. :D

OK. I am trying to graph data that comes from a windows performance counter that continually increments until the process restarts. I am trying to get the graph to show 0 when the counter remains unchanged from the last polling cycle. And only show the difference between the current and last polling cycle. Like the way the Interface Traffic graphs do. When I create the data template and set the Data Source Type on the Data Source Item as GUAGE I get what I expect. The graph continually increments right along with the performance counter. There was no surprises for me there. Here is what is in the RRD:

Code: Select all

1176992700: nan nan nan nan
1176993000: 2.2000000000e+01 1.0000000000e+00 0.0000000000e+00 2.1000000000e+01
1176993300: 2.2000000000e+01 1.0000000000e+00 0.0000000000e+00 2.1000000000e+01
1176993600: nan nan nan nan
And that makes sense when the counter is at 22.

However when I change the Data Source Type to COUNTER and create a new data source I see odd data when I fetch it out of the RRD.

It looks like this:

Code: Select all

1176990900: 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00
1176991200: 2.4858757062e-03 0.0000000000e+00 0.0000000000e+00 2.4858757062e-03
1176991500: 8.4745762712e-04 0.0000000000e+00 0.0000000000e+00 8.4745762712e-04
1176991800: 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00
When I perform a task that causes the counter to increment (as verified using Windows Performance Monitor) I would like to see a value of 1 for that polling cycle. Or more importantly I would like to see a value of 1 on my graph.

I am not sure how to make this happen. Are CDEFs the answer to my problem? I did some research and RPN is over my head so I hope not.

I would be grateful for any help or point in the right direction.
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

I suggest you read through the documentation site on how rrdtool works. You're seeing rrdtool average the data for the past 5 minutes, when you use COUNTER. Try using the CDEF 'per 5 minutes' in the graph template if you want to see that instead.
cowww
Posts: 4
Joined: Thu Apr 19, 2007 10:19 am

Post by cowww »

Thanks for the reply BSOD2600. I appreciate it.

Well, It still isn't doing what I'm looking for even after changing the CDEF as suggested. I'll do some more reading and playing around with it.

At least no one is telling me that it can't be done.
cowww
Posts: 4
Joined: Thu Apr 19, 2007 10:19 am

Post by cowww »

I've got the DST set to GAUGE and I can see the right data in the RRD.

I've created a CDEF that looks like this:

Code: Select all

cdef=CURRENT_DATA_SOURCE,PREV(CURRENT_DATA_SOURCE),-
When I apply that CDEF function to my graph template it stops rendering the graph.

This is after 4 hours of reading the documentation and interpreting it as best I can.

Any thoughts?
cowww
Posts: 4
Joined: Thu Apr 19, 2007 10:19 am

Post by cowww »

OK. Disregard my last. I was reading where someone was trying to create a graph from a bash shell and was getting an error because of the parentheses. So I escaped them in my CDEF to make it look like this:

Code: Select all

cdef=CURRENT_DATA_SOURCE,PREV\(CURRENT_DATA_SOURCE\),-
And works as I would expect it to.
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests