Curve Fitting Graphs

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

Moderators: Developers, Moderators

Post Reply
dononeil
Cacti User
Posts: 194
Joined: Wed Aug 06, 2008 4:45 pm

Curve Fitting Graphs

Post by dononeil »

Is there any way to create a 'running average' on a graph for an extended time period?

For example, see the mock up below, where the red line represents a curve fitted running averatge for the whole time window (hand drawn approximate).

Using the average consolidation function doesn't change the graph.. since it's still a '5 minute' average.... what I'm looking for is a 1 hour or more 'running' average.
Attachments
untitled.JPG
untitled.JPG (36.21 KiB) Viewed 4283 times
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Please use a CDEF that defines the "TREND" function, see man rrdgraph_rpn
Reinhard
dononeil
Cacti User
Posts: 194
Joined: Wed Aug 06, 2008 4:45 pm

Post by dononeil »

gandalf wrote:Please use a CDEF that defines the "TREND" function, see man rrdgraph_rpn
Reinhard
There doesn't seem to be a way to access the "TREND" cdef in Cacti RRD config... only min/max/avg/last. Am I looking in the wrong place, or does Cacti not support this yet?
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Post by Howie »

dononeil wrote:
gandalf wrote:Please use a CDEF that defines the "TREND" function, see man rrdgraph_rpn
Reinhard
There doesn't seem to be a way to access the "TREND" cdef in Cacti RRD config... only min/max/avg/last. Am I looking in the wrong place, or does Cacti not support this yet?
You're looking in the wrong place - Click Graph Management, and a sub-menu called CDEFs appears. That's where you want to be.

However, as far as I can see, Cacti doesn't support CDEFs with TREND - that isn't in the list of available functions...
Weathermap 0.98a is out! & QuickTree 1.0. Superlinks is over there now (and built-in to Cacti 1.x).
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)
dononeil
Cacti User
Posts: 194
Joined: Wed Aug 06, 2008 4:45 pm

Post by dononeil »

Howie wrote:
dononeil wrote:
gandalf wrote:Please use a CDEF that defines the "TREND" function, see man rrdgraph_rpn
Reinhard
There doesn't seem to be a way to access the "TREND" cdef in Cacti RRD config... only min/max/avg/last. Am I looking in the wrong place, or does Cacti not support this yet?
You're looking in the wrong place - Click Graph Management, and a sub-menu called CDEFs appears. That's where you want to be.

However, as far as I can see, Cacti doesn't support CDEFs with TREND - that isn't in the list of available functions...
Yeah, I looked there too and didn't see anything either. So, I guess I'm out of luck, or we need a new feature.
mrnoodle
Cacti User
Posts: 59
Joined: Sun Apr 02, 2006 3:56 pm

Post by mrnoodle »

You can create your hourly trend line with the following CDEF (give it whatever name you like) with a single custom string:


CURRENT_DATA_SOURCE,3600,TREND


Just add a second Line item to your graph and use the CDEF define above for the line as well as the legend.

You may have to convert bits to bytes first to ensure your data remains consistent.
dononeil
Cacti User
Posts: 194
Joined: Wed Aug 06, 2008 4:45 pm

Post by dononeil »

Thanks... that did the trick... although there is a 1 hour 'gap' in the graph at the beginning of each graph, most likely due to the fact that it is using the same data window that the grap is to generate the trend.
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

dononeil wrote:although there is a 1 hour 'gap' in the graph at the beginning of each graph.
That's indeed the drawback of TREND
Reinhard
hurdad
Posts: 2
Joined: Wed Oct 07, 2009 12:30 am

Post by hurdad »

I am having an issue occasionally when using this trending CDEF.
The current trend value will drop to zero see attachment.
Attachments
untitled.JPG
untitled.JPG (47.03 KiB) Viewed 4144 times
hurdad
Posts: 2
Joined: Wed Oct 07, 2009 12:30 am

Post by hurdad »

Anyone?
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest