Compute difference between 2 values

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

Moderators: Developers, Moderators

Post Reply
lofalco
Posts: 9
Joined: Fri Jun 16, 2006 9:15 am

Compute difference between 2 values

Post by lofalco »

I,
I want to create a graph based on the result of current value minus last_value in a graph. How can i do that ?

best regards,

Laurent
danbeck
Posts: 30
Joined: Tue Jun 20, 2006 12:08 pm
Location: Huntsville, Alabama
Contact:

Re: Compute difference between 2 values

Post by danbeck »

lofalco wrote:I want to create a graph based on the result of current value minus last_value in a graph. How can i do that ?
That's a very general question. What exactly are you asking? Are you asking how do you create a graph with calcuations as graph items? Do you only need help creating a CDEF that will do the calculation for you? Or, are you asking as to how to make a graph that only shows the calculation and not the other datasources?

Please clarify your question and give us some more details and background and I'm sure we can give you the help you are looking for.
-Daniel

[url=http://dealnews.com/developers/cacti/memcached.html]memcached Template[/url] - Version 1.0

[url=http://dealnews.com/developers/]dealnews.com/developers[/url] - Useful scripts and Cacti templates.
[url=http://dealnews.com/]dealnews.com[/url] - How to go broke saving money.
lofalco
Posts: 9
Joined: Fri Jun 16, 2006 9:15 am

Post by lofalco »

i want to create a graph taht display only the calculation ( current - last value).

Laurent
danbeck
Posts: 30
Joined: Tue Jun 20, 2006 12:08 pm
Location: Huntsville, Alabama
Contact:

Post by danbeck »

lofalco wrote:i want to create a graph taht display only the calculation ( current - last value).
To make a graph item invisible, set it's Color to "None" and leave the Text Format field empty.

So, for your graph, you need to add two datasources that would normally graph, but make them invisible. So, Color = None, Text Format = empty and Graph Item Type = LINE1.

Then, add a third Graph Item that has no datasource, but uses a custom CDEF like b,a,-. Give it a color and a output type like AREA or LINE1. Add a lengend if you like.

Viola, you have a graph with only a calculation as visible output.
-Daniel

[url=http://dealnews.com/developers/cacti/memcached.html]memcached Template[/url] - Version 1.0

[url=http://dealnews.com/developers/]dealnews.com/developers[/url] - Useful scripts and Cacti templates.
[url=http://dealnews.com/]dealnews.com[/url] - How to go broke saving money.
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests