Holt-Winters functionality (forecasting) with Cacti
Moderators: Developers, Moderators
Example
This example is just more data of the other RRA.
You can see the confidence bands are well trained for a 24 hour season, but they get confused at the weekend.
Hope to have another graph of a different datasource available tomorrow or the day after.
It should have prediction & confidence bands for both incoming and outgoing traffic.
You can see the confidence bands are well trained for a 24 hour season, but they get confused at the weekend.
Hope to have another graph of a different datasource available tomorrow or the day after.
It should have prediction & confidence bands for both incoming and outgoing traffic.
- Attachments
-
- Example of Holt-Winters on weekly graph.
- hw-update.png (57.03 KiB) Viewed 9619 times
Nagios Integration
Here's an example of alerting (not using Cacti thresholds, but Nagios). The Window Length is 9 and the failure threshold is 6. Delta pos and delta neg, I believe, are the number of standard deviations away from the predicted value to trigger an alert (same as our confidence bands), you can see the raw FAILURES data below.
Example Dump of RRA, showing failures:
<params>
<delta_pos> 2.0000000000e+00 </delta_pos>
<delta_neg> 2.0000000000e+00 </delta_neg>
<window_len> 9 </window_len>
<failure_threshold> 6 </failure_threshold>
...snip...
<!-- 2008-03-11 13:40:00 CET / 1205239200 --> <row><v> 0.0000000000e+00 </v><v> 0.0000000000e+00 </v></row>
<!-- 2008-03-11 13:45:00 CET / 1205239500 --> <row><v> 1.0000000000e+00 </v><v> 0.0000000000e+00 </v></row>
<!-- 2008-03-11 13:50:00 CET / 1205239800 --> <row><v> 1.0000000000e+00 </v><v> 0.0000000000e+00 </v></row>
<!-- 2008-03-11 13:55:00 CET / 1205240100 --> <row><v> 1.0000000000e+00 </v><v> 0.0000000000e+00 </v></row>
<!-- 2008-03-11 14:00:00 CET / 1205240400 --> <row><v> 1.0000000000e+00 </v><v> 0.0000000000e+00 </v></row>
<!-- 2008-03-11 14:05:00 CET / 1205240700 --> <row><v> 0.0000000000e+00 </v><v> 0.0000000000e+00 </v></row>
Here are the Email's from Nagios notifying about the abberant behaviour and the restoration of normal traffic:
Email from Nagios giving resolution of problem:
Hope this might be a little useful to some.
Example Dump of RRA, showing failures:
<params>
<delta_pos> 2.0000000000e+00 </delta_pos>
<delta_neg> 2.0000000000e+00 </delta_neg>
<window_len> 9 </window_len>
<failure_threshold> 6 </failure_threshold>
...snip...
<!-- 2008-03-11 13:40:00 CET / 1205239200 --> <row><v> 0.0000000000e+00 </v><v> 0.0000000000e+00 </v></row>
<!-- 2008-03-11 13:45:00 CET / 1205239500 --> <row><v> 1.0000000000e+00 </v><v> 0.0000000000e+00 </v></row>
<!-- 2008-03-11 13:50:00 CET / 1205239800 --> <row><v> 1.0000000000e+00 </v><v> 0.0000000000e+00 </v></row>
<!-- 2008-03-11 13:55:00 CET / 1205240100 --> <row><v> 1.0000000000e+00 </v><v> 0.0000000000e+00 </v></row>
<!-- 2008-03-11 14:00:00 CET / 1205240400 --> <row><v> 1.0000000000e+00 </v><v> 0.0000000000e+00 </v></row>
<!-- 2008-03-11 14:05:00 CET / 1205240700 --> <row><v> 0.0000000000e+00 </v><v> 0.0000000000e+00 </v></row>
Here are the Email's from Nagios notifying about the abberant behaviour and the restoration of normal traffic:
Code: Select all
Notification Type: PROBLEM
Service: Cacti - Test Bandwidth
Host: Cacti
Address: 192.168.1.1
State: WARNING
Date/Time: Tue Mar 11 13:47:36 CET 2008
Additional Info:
WARNING Inbound - Current BW in: 16.71Mbps Out: 22.04Mbps
Code: Select all
Notification Type: RECOVERY
Service: Cacti - Test Bandwidth
Host: Cacti
Address: 192.168.1.1
State: OK
Date/Time: Tue Mar 11 14:06:12 CET 2008
Additional Info:
OK - Current BW in: 15.05Mbps Out: 21.58Mbps
- Attachments
-
- check_rrdtraf2.sh
- This rrdtraf script has been further modified to get the predicted value and standard deviations and display the expected range when a WARNING state occurs for Holt-Winters.
- (12.15 KiB) Downloaded 337 times
-
- check_rrdtraf.sh
- Check rrdtraf script, modified to accept Holt-Winters failures RRA as option. Original script was written by Israel Brewster, who took it from Garry W. Cook
- (11.48 KiB) Downloaded 295 times
-
- Clip of the graph, graffically showing the aberrant behaviour.
- clip-of-graph.png (8.76 KiB) Viewed 9610 times
Awesome graph, gilesc. Thanks to you, I have resumed my experimentation with HW . About the problem I wrote about in my previous post. If you look at wind_weekly.png and wind_weekly2.png (about 12 hours later), you see that the old data just disappears! Do you have any clue why this is?
- Attachments
-
- wind_weekly.png (32.01 KiB) Viewed 9582 times
-
- wind_weekly2.png (31.79 KiB) Viewed 9582 times
That's interesting...sveioen wrote:Awesome graph, gilesc. Thanks to you, I have resumed my experimentation with HW . About the problem I wrote about in my previous post. If you look at wind_weekly.png and wind_weekly2.png (about 12 hours later), you see that the old data just disappears! Do you have any clue why this is?
I can't say what causes it, but I reckon that the answer would be displayed somewhere in the XML in a "rrdtool dump file.rrd" command. Perhaps the data source has been truncated in size for some reason. Unfortunately I don't think the rrd_hwreapply perl script is perfect, and can have difficulties with some RRD files, it's also not really been developed on for a few years or so. I'm no perl, nor XML guru... but I'm hoping there's enough people watching this thread with enough interest to provide solutions to the problems.
As an aside, I reckon that there is real money to be made in a "catch all" rrd manipulation tool with a GUI interface... these kind of problems could be resolved real quickly.
Anyway, I'll take the opportunity to attach a screenshot of my latest graph, our data source behaviour was changed recently (just under a week ago) so the predictions and confidence bands are not ideal (yet) - the season is a 2016 weekly, but it's nice enough to post to the forum.
- Attachments
-
- Holt-Winters Example
- Clipboard01.png (138.91 KiB) Viewed 9566 times
Ok, I have just found out what I have been doing wrong( ). For every update on the rrd-files (those with no HW), I have been using rrd_hwreapply and made HW-able-copies. So I have made a "new clean" HW-rrd every time with minimum HW-data. It never occured to me that this is a script you run only once to initiate the HW-stuff, and then update the new file the normal way.
At least its working now!
gilesc: Love the graph
At least its working now!
gilesc: Love the graph
- Attachments
-
- real_weekly.png (33.67 KiB) Viewed 9487 times
Code: Select all
TICK:fail#ffffa0:1.0:"Feil\n" \
- Attachments
-
- real_weekly.png (49.23 KiB) Viewed 9458 times
OK - I want this - is that within Cacti, or is it a graph custom made from the RRD....sveioen wrote:Added TICK .Code: Select all
TICK:fail#ffffa0:1.0:"Feil\n" \
It is a graph custom made from the RRD. It's actually really simple to add the TICK-thing. Just add:gilesc wrote:OK - I want this - is that within Cacti, or is it a graph custom made from the RRD....sveioen wrote:Added TICK .Code: Select all
TICK:fail#ffffa0:1.0:"Feil\n" \
Code: Select all
DEF:fail="/blabla/bla/windhw.rrd":wind:FAILURES \
TICK:fail#ffffa0:1.0:"Feil\n" \
Here's another iteration of the graph I showed before.
This is a Cacti RRD, but the RRA was generated with the TICK entry outside of Cacti. The same graph exists in the Cacti interface without the TICK entry.
Also - the weekly graph, which is looking pretty good now.
This is a Cacti RRD, but the RRA was generated with the TICK entry outside of Cacti. The same graph exists in the Cacti interface without the TICK entry.
Also - the weekly graph, which is looking pretty good now.
- Attachments
-
- Cacti RRD with Holt-Winters, generated outside of Cacti to add the TICK entry.
- my-graph.png (78.14 KiB) Viewed 9275 times
-
- Weekly Graph
- weekly.PNG (95.23 KiB) Viewed 9275 times
Very nice. One thing though, in the lower graph gilesc, the real value is way off the lower confidence band, still no TICK is drawn?
And; I know I should know this, but exactly what can a HW-graph tell you? I know it is supposed to give a predicted value based on previous data (right?), but here we just have a predicted value and the real value graphed at the same time, so you cant really call it a forecast. Or I am missing something?
And; I know I should know this, but exactly what can a HW-graph tell you? I know it is supposed to give a predicted value based on previous data (right?), but here we just have a predicted value and the real value graphed at the same time, so you cant really call it a forecast. Or I am missing something?
It is a predicted value of what it should be based on previous values. And therefor when it is not within the predicted parameters, you might be having some weird stuff going on in your network that someone might want to look into Not sure if it can be used to predict your bandwidth requirements next yearsveioen wrote:Very nice. One thing though, in the lower graph gilesc, the real value is way off the lower confidence band, still no TICK is drawn?
And; I know I should know this, but exactly what can a HW-graph tell you? I know it is supposed to give a predicted value based on previous data (right?), but here we just have a predicted value and the real value graphed at the same time, so you cant really call it a forecast. Or I am missing something?
/Carl
- Howie
- Cacti Guru User
- Posts: 5508
- Joined: Thu Sep 16, 2004 5:53 am
- Location: United Kingdom
- Contact:
With that in mind, does rrdtool's implementation have any way to communicate with the outside world (e.g. PRINT) so that you could have some sort of alerting? What you *really* want is a report that shows links that are "a bit funny" so you can look at them. If you have to go and look at each graph to do that, well, you're looking at each graph so what's the point?cwahlin wrote:It is a predicted value of what it should be based on previous values. And therefor when it is not within the predicted parameters, you might be having some weird stuff going on in your network that someone might want to look into
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!)
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!)
Who is online
Users browsing this forum: No registered users and 3 guests