Is TREND rrdtool function taken into account

Anything that you think should be in Cacti.

Moderators: Developers, Moderators

Post Reply
Didier
Posts: 4
Joined: Tue Jul 12, 2005 1:13 am
Location: France - Aix en Provence

Is TREND rrdtool function taken into account

Post by Didier »

Hi,

I'd like to know if the TREND rrdtool function is taken into account into the last release of cacti. If not how can I intergrate it ?

A description of this function can be seen at

http://people.ee.ethz.ch/~oetiker/webto ... pn.en.html (search for TREND keyword)

CDEF:result=x,delay,TREND


where delay is in second
x is a variable
result will be at each time t an avareage of x between [t-delay] and [t]

This function allows to display a trend and have a baseline in the graph to make comparison easier to the current value and what we should have. I think it will be very useful.

Thanks

Didier
scavenger67
Posts: 49
Joined: Fri Mar 18, 2005 7:33 am
Location: France

trend is fine !

Post by scavenger67 »

Have a trendling line will be very good to anticipate bottleneck..
hope this new function will be added in the next release !
:P
Grand Master Wierdo
Posts: 10
Joined: Fri Nov 05, 2004 11:26 am

Post by Grand Master Wierdo »

I implemented this by adding a CDEF into Cacti. This can then be applied on a graph item against a data source in a graph.

See attached
Attachments
Screenshot of CDEF
Screenshot of CDEF
Trend.jpg (39.6 KiB) Viewed 10772 times
User avatar
fmangeant
Cacti Guru User
Posts: 2345
Joined: Fri Sep 19, 2003 8:36 am
Location: Sophia-Antipolis, France
Contact:

Post by fmangeant »

Hi

thanks for the CDEF. Could you post an example of a graph with trend ?

Thanks in advance.
[size=84]
[color=green]HOWTOs[/color] :
[list][*][url=http://forums.cacti.net/viewtopic.php?t=15353]Install and configure the Net-SNMP agent for Unix[/url]
[*][url=http://forums.cacti.net/viewtopic.php?t=26151]Install and configure the Net-SNMP agent for Windows[/url]
[*][url=http://forums.cacti.net/viewtopic.php?t=28175]Graph multiple servers using an SNMP proxy[/url][/list]
[color=green]Templates[/color] :
[list][*][url=http://forums.cacti.net/viewtopic.php?t=15412]Multiple CPU usage for Linux[/url]
[*][url=http://forums.cacti.net/viewtopic.php?p=125152]Memory & swap usage for Unix[/url][/list][/size]
Grand Master Wierdo
Posts: 10
Joined: Fri Nov 05, 2004 11:26 am

Post by Grand Master Wierdo »

I originally created the CDEF as an academic exercise, but I have quickly knocked up a graph to show it in action. In addition, this uses a '30 Min moving average bits negative' CDEF which is the same as the one above, just with -1 & * added as extra steps, to make the cdef

cdef=CURRENT_DATA_SOURCE,1800,TREND,8,*,-1,*

Enjoy :)
Attachments
Moving Average
Moving Average
Moving Average.JPG (111.41 KiB) Viewed 10759 times
User avatar
egarnel
Cacti Pro User
Posts: 708
Joined: Thu Nov 21, 2002 8:55 am
Location: Austin, TX

Post by egarnel »

Awesome cdef! simple & easy to implement


custom interface graph template with the cdef
It worked for me, your mileage may vary

Running Cacti 0.8.6e patched with 0.8.6.f patches

| CentOS 3.5 | mysql-3.23.58-1 |php-4.3.2-23.ent | httpd-2.0.46-44.ent.centos.2|
Attachments
what it looks like
what it looks like
graph_image.jpg (50.99 KiB) Viewed 10743 times
cacti_graph_template_custom_interface_traffic_with_avg.xml
(41.66 KiB) Downloaded 504 times
disorganizer
Cacti User
Posts: 68
Joined: Thu Aug 04, 2005 8:34 am

Post by disorganizer »

the trending function works great, just one question:
is it possible to turn off the 30min average (or change it to another base) on the non-daily graphs?

as it uses a roaming average of 30 mins, beginning from the weekly graphs that graph is identical to the original graph anyways. so changing this to for example a 3hrs roaming average for weekly would be perfect, but turning it completely off for those would also fit.
tnx
User avatar
egarnel
Cacti Pro User
Posts: 708
Joined: Thu Nov 21, 2002 8:55 am
Location: Austin, TX

Post by egarnel »

Sure, the 1800 in the CDEf refers to 30 minutes. 1800/60 = 30. Plug in what ever seconds value you want. 3 hours - 10800 seconds

cdef=CURRENT_DATA_SOURCE,10800,TREND,8,*,-1,*

not sure what it would look like. It would be interesting to have a template with 30 minutes, 60 minutes, 4 hour, & 24 hour averages. Something to do when I have more time
Cacti1 OS: CentOS 5.6 | 300+ devices
Cacti2 OS: CentOS 5.6 | 300+ devices
King of the Elves
Local Anarchists Union #427
"Anarchism is founded on the observation that since few men are wise enough to rule themselves, even fewer are wise enough to rule others." -Edward Abbey
disorganizer
Cacti User
Posts: 68
Joined: Thu Aug 04, 2005 8:34 am

Post by disorganizer »

interesting. but how do i define that the daily graph cacti displays per default uses the 30minutes, the weekly graph uses the <whatever> minutes..... ?

another interesting point i check when i have time:
i would like to use a rra with 5 minute data, storing this data for 2 months, showing a one month graph.
now afaik in that graph the roaming 30 minute average should show the right values in a monthly overview.
the interesting point would be (if diskspace doesnt matter) to turn off the rrd accumulation feature and just have a rra with only one thing in it: 5 minute values, for 1,5 years of data ;-)

also we should be aware that rrd_maximum must obviously be automatically set to ifspeed/8, as cacti does not set this correctly. so the %-calculations do indeed go wrong by a factor of 10 on my gigabit interfaces *g*
newbie1
Posts: 1
Joined: Tue Oct 04, 2005 2:23 pm

Post by newbie1 »

I am trying to implement a moving average in cacti, but am getting an error. I'm using cdef=CURRENT_DATA_SOURCE,1800,TREND.

Item Item Value
Item #1 Special Data Source: CURRENT_DATA_SOURCE
Item #2 Custom String: 1800
Item #3 Custom String: TREND

The error I get is:
ERROR: invalid rpn expression 'b,1800,TREND'.

Do I need something else to get cacti to recognize the trend function?

Thanks in advance!
scavenger67
Posts: 49
Joined: Fri Mar 18, 2005 7:33 am
Location: France

version

Post by scavenger67 »

What version of rrdtool you have ?
as i know you need at least 1.2 to have TREND feature.
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

disorganizer wrote:the interesting point would be (if diskspace doesnt matter) to turn off the rrd accumulation feature and just have a rra with only one thing in it: 5 minute values, for 1,5 years of data ;-)
You'll find my tutorial for doing so at http://forums.cacti.net/viewtopic.php?t=9605. But I don't think that this is a good solution. I'm going to compile some howto, similar to http://forums.cacti.net/viewtopic.php?t=9383. It will show you the MAX values for consolidated data, so you'll have an idea about the spreading of values, even if consolidation is done
Reinhard
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

egarnel wrote:Sure, the 1800 in the CDEf refers to 30 minutes. 1800/60 = 30. Plug in what ever seconds value you want. 3 hours - 10800 seconds

cdef=CURRENT_DATA_SOURCE,10800,TREND,8,*,-1,*

not sure what it would look like. It would be interesting to have a template with 30 minutes, 60 minutes, 4 hour, & 24 hour averages. Something to do when I have more time
Would it be a solution, if the CDEF could access the timespan for the actual graph to be displayed? Like the one in the RRA definitions at "Data Sources" -> "RRAs"? Then, the calculation for the TREND interval could refer to this timespan?
Of course, this must be filled in dynamically, cause you may have different timespans if you select special intervals (or even use zooming). But I don't know, if RRDTOOL provides some kind of "special variable" for start/end time of the graph. In this case, it would be nice to have these "special values" as variables in cacti.
Reinhard
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Found a starting point at http://people.ee.ethz.ch/~oetiker/webto ... ph.en.html. It says
LAST, FIRST
Return the last/first value including its time. The time for FIRST is actually the start of the corresponding interval, whereas LAST returns the end of the corresponding interval.

Example: VDEF:first=mydata,FIRST
So it should be possible to get FIRST and LAST timestamp of the current graph. But it seems, there's a nice CDEF ahead ...
Reinhard
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests