Exemption Time
Moderators: Developers, Moderators
Exemption Time
Thold is a great Plug-in, it is working perfectly for me!
One thing I would like to try and figure out is if there is a way to create an exception time, similiar to the weekend exemption, where from 8pm - 5am it would ignore triggers. We do backups accross the WAN overnight and are getting several alerts overnight, which we could do without.
One thing I would like to try and figure out is if there is a way to create an exception time, similiar to the weekend exemption, where from 8pm - 5am it would ignore triggers. We do backups accross the WAN overnight and are getting several alerts overnight, which we could do without.
- TheWitness
- Developer
- Posts: 17047
- Joined: Tue May 14, 2002 5:08 pm
- Location: MI, USA
- Contact:
Patches are always welcomed.
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: 17047
- Joined: Tue May 14, 2002 5:08 pm
- Location: MI, USA
- Contact:
Work it over and send it upstream. If it's good, it in.
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?
I've been toying with this (and learning how cacti/thold code works). It's working but need some clean up. Currently only one exemption can be set per template, you can toggle it on/off, select one or many day of the week and choose a start/stop hour.
Things I'd like to add :
More precise time support (ie minutes not just hour). Rather easy to do, I just kept it simple for now.
Multiple exemption per template. Can this be done? I'm thinking something along the line of multiple Data Source in the Data Templates.
Adding a thold Exemption State. Right now, when an exemption is in effect there is no obvious way to know this. What would be better, adding an exempt state? Or just flag it disabled?
What's the best way to send it to you and get some feedback on the code?
Things I'd like to add :
More precise time support (ie minutes not just hour). Rather easy to do, I just kept it simple for now.
Multiple exemption per template. Can this be done? I'm thinking something along the line of multiple Data Source in the Data Templates.
Adding a thold Exemption State. Right now, when an exemption is in effect there is no obvious way to know this. What would be better, adding an exempt state? Or just flag it disabled?
What's the best way to send it to you and get some feedback on the code?
Hi, I'm still testing/debuging this. So far so good. Since SVN is in flux lately I did my patch with thold 0.4.1 (including a few other patches here and there that have been included in SVN).
I can upload a proper patch today if you want to test it.
I can upload a proper patch today if you want to test it.
Last edited by DarkMan on Tue Oct 06, 2009 3:40 pm, edited 1 time in total.
Here is the patch.
First you have to upgrade the database with exemption.sql. Then run the patch (I made it against a clean 0.4.1). Do a dry-run first. If everything works, you will see that the Weekend exempt is gone on the threshold and templates (but not the Global one, this one still works the same...in fact it is the same). You now have a checkbox to enable the exemption, a multiple choice dropbox and a start/stop time. You can modify it at the template level and at threshold level. Beware when an exemption works overnight.
Example : you have a backup running from 8PM to 2AM starting on monday. You must select monday and tuesday, start at 20h and stop at 2h.
Comments? Questions? Idea on how to improve?
First you have to upgrade the database with exemption.sql. Then run the patch (I made it against a clean 0.4.1). Do a dry-run first. If everything works, you will see that the Weekend exempt is gone on the threshold and templates (but not the Global one, this one still works the same...in fact it is the same). You now have a checkbox to enable the exemption, a multiple choice dropbox and a start/stop time. You can modify it at the template level and at threshold level. Beware when an exemption works overnight.
Example : you have a backup running from 8PM to 2AM starting on monday. You must select monday and tuesday, start at 20h and stop at 2h.
Comments? Questions? Idea on how to improve?
- Attachments
-
- thold-exempt-v1.1.tar.gz
- Oops, found a little logic issue with the global weekend exception. This is the new full patch.
- (3.8 KiB) Downloaded 516 times
Last edited by DarkMan on Tue Oct 06, 2009 3:53 pm, edited 2 times in total.
Darkman,
Thanks for the quick reply.
The patch went well, I can see the changes, but I can not figure out how I would set it to exempt Mon to Friday, 8pm to 8am the next day, but then exepmt the weekend from Friday 8pm to Monday morning 8am. In other words, only alert mon to fri 8am to 8pm.
...hope I am not missing the point here.
Thanks for the quick reply.
The patch went well, I can see the changes, but I can not figure out how I would set it to exempt Mon to Friday, 8pm to 8am the next day, but then exepmt the weekend from Friday 8pm to Monday morning 8am. In other words, only alert mon to fri 8am to 8pm.
...hope I am not missing the point here.
Ah, I think I was missing the point...
So, in the threshold template I select Monday to Saturday then select the start at 20 and end at 08, which will apply to each day following through to the next, then use the weekend exemption on the global setting.
Excellent work, thank you, Just got this on a test VB at the moment. I will give it a couple of days then wack on the live box.
So, in the threshold template I select Monday to Saturday then select the start at 20 and end at 08, which will apply to each day following through to the next, then use the weekend exemption on the global setting.
Excellent work, thank you, Just got this on a test VB at the moment. I will give it a couple of days then wack on the live box.
Last edited by tinalee on Tue Oct 06, 2009 1:51 pm, edited 1 time in total.
Yep, that should work the way you want.tinalee wrote:Ah, I think I was missing the point...
So, in the threshold template I select Monday to Saturday then select the start at 20 and end at 08, which will apply to each day following through to the next, then use the weekend exemption on the global setting.
Oops, found a possible logic issue. It's the same code but reordered the global check. Made a quick patch for you, just patch over your current test with this one. Also uploaded a new version.
- Attachments
-
- exempt-oops.patch
- (1.48 KiB) Downloaded 426 times
- TheWitness
- Developer
- Posts: 17047
- Joined: Tue May 14, 2002 5:08 pm
- Location: MI, USA
- Contact:
Please open a bug report here: http://bugs.cacti.net and attache your patch and some information on design to cut down the time that the Dev's have to spend reviewing the patch.
Thanks,
TheWitness
Thanks,
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?
Who is online
Users browsing this forum: No registered users and 0 guests