intelligent spike killer
Moderators: Developers, Moderators
intelligent spike killer
The FAQ says this
One of my devices rebooted and now I have a huge spike on my graph!
This occurs because the reboot causes SNMP's counters to reset, which can cause a rather large spike on the graph when RRDTool tries to determine the change between the new small counter value and the large previous value. One way to combat this issue is to specify realistic maximum values for your data sources. RRDTool will ignore any value that is larger than the maximum value.
Can Cacti be smart about this situation and realise that the SNMP value is lower. A counter data source should always be increasing... Cacti should realise that the counter has been reset. does this make sense ?
One of my devices rebooted and now I have a huge spike on my graph!
This occurs because the reboot causes SNMP's counters to reset, which can cause a rather large spike on the graph when RRDTool tries to determine the change between the new small counter value and the large previous value. One way to combat this issue is to specify realistic maximum values for your data sources. RRDTool will ignore any value that is larger than the maximum value.
Can Cacti be smart about this situation and realise that the SNMP value is lower. A counter data source should always be increasing... Cacti should realise that the counter has been reset. does this make sense ?
- TheWitness
- Developer
- Posts: 17007
- Joined: Tue May 14, 2002 5:08 pm
- Location: MI, USA
- Contact:
This is a perplexing issue in that it is almost impossible to eliminate the spike due to the nature of the counter rrd format. Will continue to think about it until such time as I have more time to think about it. Until then, there are a few utilities on this web site that provide spike killing utilities.
Good luck!!
TheWitness
Good luck!!
TheWitness
True understanding begins only when we realize how little we truly understand...
Life is an adventure, let yours begin with Cacti!
Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages
For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Life is an adventure, let yours begin with Cacti!
Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages
For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
It does not . Counter because of its finite nature can overflow - means that just after you read very high value you can read value just above 0 in the next polling cycle. RRDTool tries to handle such situation and write to rrd file correct value. As a side effect it causes spikes in unexpected counter reset case. As you can see Cacti can be only as smart as you are when providing correct maximum value (as you mentioned in your post).Cacti should realise that the counter has been reset. does this make sense ?
- Piotr
Actually it's easy to stop it happening, at least for SNMP counters:TheWitness wrote:This is a perplexing issue in that it is almost impossible to eliminate the spike due to the nature of the counter rrd format. Will continue to think about it until such time as I have more time to think about it. Until then, there are a few utilities on this web site that provide spike killing utilities.
Good luck!!
TheWitness
When you grab an oid value, grab sysUpTime at the same time.
if sysUpTime < your sample interval then you know the device you are sampling was reset since you last sampled it.
In that case don't just enter the value you sampled into the rrd, enter NaN and then the value instead.
Since there is now a NaN entry in the rrd rrdtool won't try to interpolate the pre and post crash records, there will be a gap in the graphs, but you won't get spikes anymore.
(this won't help if there is a way to reset the snmp stats for an interface independent of rebooting the box you are sampling, but it's against the snmp specs to do that).
This method has been used in cricket for ages, I patched cacti-0.8.5a, but had to use the machine i was developeing on for something else so I havn't had time to port the changes to 0.8.6. (the changes in 0.8.6 make it harder to implement).
I really should of got back to this problem ages ago (i don't use cacti at the moment so it's not an issue for me), here's the patch for 0.8.5a:
http://pointless.net/~jasper/cacti-no-spikes.patch
have fun!
spike killer using sysuptime: no SNMP
So checking against system uptime sounds like the ticket to prevent spikes.
However, in mycase almost all input is from scripts, so an SNMP sysUptime does not exist.
I can have my script return the sysuptime as part of the data input method.
How then can I make cacti utilize that part? Is there a patch which allows me to specify a data item which denotes the sysuptime?
However, in mycase almost all input is from scripts, so an SNMP sysUptime does not exist.
I can have my script return the sysuptime as part of the data input method.
How then can I make cacti utilize that part? Is there a patch which allows me to specify a data item which denotes the sysuptime?
- TheWitness
- Developer
- Posts: 17007
- Joined: Tue May 14, 2002 5:08 pm
- Location: MI, USA
- Contact:
Jasper,
It's easier to fix that you think. Since we track if the host requires recache, before polling, all you need to do is set a binary value and enter NaN or should it be "U" for that sample for all Counter type data.
TheWitness
It's easier to fix that you think. Since we track if the host requires recache, before polling, all you need to do is set a binary value and enter NaN or should it be "U" for that sample for all Counter type data.
TheWitness
True understanding begins only when we realize how little we truly understand...
Life is an adventure, let yours begin with Cacti!
Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages
For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Life is an adventure, let yours begin with Cacti!
Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages
For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
- TheWitness
- Developer
- Posts: 17007
- Joined: Tue May 14, 2002 5:08 pm
- Location: MI, USA
- Contact:
Yup. Just got to keep from forgetting it.
TheWitness
TheWitness
True understanding begins only when we realize how little we truly understand...
Life is an adventure, let yours begin with Cacti!
Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages
For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Life is an adventure, let yours begin with Cacti!
Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages
For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
- TheWitness
- Developer
- Posts: 17007
- Joined: Tue May 14, 2002 5:08 pm
- Location: MI, USA
- Contact:
I might just patch now that I think about it.
True understanding begins only when we realize how little we truly understand...
Life is an adventure, let yours begin with Cacti!
Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages
For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Life is an adventure, let yours begin with Cacti!
Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages
For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
- TheWitness
- Developer
- Posts: 17007
- Joined: Tue May 14, 2002 5:08 pm
- Location: MI, USA
- Contact:
True understanding begins only when we realize how little we truly understand...
Life is an adventure, let yours begin with Cacti!
Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages
For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Life is an adventure, let yours begin with Cacti!
Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages
For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Who is online
Users browsing this forum: No registered users and 1 guest