Exemption Time
Moderators: Developers, Moderators
Hi all
Thanks for this patch its a really cool feature, I just want to request one enhancement.... could we please get the no notifications on weekends function back? I would like to only receive notifications from Mon - Fri (08h00 - 17h00) ... I have just started learning perl and if I had to try and figure out PHP now I will be even more confused
Thnaks again for the patch !!
B
Thanks for this patch its a really cool feature, I just want to request one enhancement.... could we please get the no notifications on weekends function back? I would like to only receive notifications from Mon - Fri (08h00 - 17h00) ... I have just started learning perl and if I had to try and figure out PHP now I will be even more confused
Thnaks again for the patch !!
B
I removed it from the template because it ends up being a duplicate feature. If you want to be alerted only from mon-fri 8h to 17h then either use the global weekend exempt (you will find this in Cacti console configuration -> Settings -> Alerting/Thold) or set an exemption for Saturday-Sunday 0-23.
While writing this reply I figured something wrong. It's still a work in progress but I have an idea on out to make it work the way you would like.
While writing this reply I figured something wrong. It's still a work in progress but I have an idea on out to make it work the way you would like.
Doh!
Tried to be too clever for my own good and caused a bug.
In thold_functions.php change this line :
to this :
In some case, it can cause an exempt to get back on and stay on. To reset all exempt state run this :
I'm working on some improvment / concept and should have this done in a few day. This could allow me to do a multiple exempt per template.
Tried to be too clever for my own good and caused a bug.
In thold_functions.php change this line :
Code: Select all
if ( $current_time >= $item['exempt_begin_time']) {
Code: Select all
if ( $current_time == $item['exempt_begin_time']) {
Code: Select all
UPDATE thold_data set exempt_state = 0 WHERE `exempt_state` = '1'
- Attachments
-
- thold-exempt-v1.2.tar.gz
- New patch version
- (3.66 KiB) Downloaded 286 times
Come to think of it, to do this, enable the global weekend exemption and then in the template select all the days (Monday through Sunday) with a start time of 17h00 and end time of 8h00. This way, you will only receive an alert between 8h00-17h00 monday through friday.b-boy wrote:Hi all
Thanks for this patch its a really cool feature, I just want to request one enhancement.... could we please get the no notifications on weekends function back? I would like to only receive notifications from Mon - Fri (08h00 - 17h00) ... I have just started learning perl and if I had to try and figure out PHP now I will be even more confused
Thnaks again for the patch !!
B
This gave me an idea. Instead of only being able to choose an exemption period, selecting an alerting period could be simpler for a case like yours. It should be rather easy to do.
I have several idea but I'm not sure what is usefull or not depending on what kind of schedule you use. So I'd like some feedback from thold users.
Is my current patch good enough?
Would having an alerting period be better? (with or without a possibility for exemption?).
Always alert 24/7 with one or multiple exemption?
About doing multiple exempt schedule, right now it can work on multiple day but it is the "same schedule". I'll need some help from the dev because I'm not too sure how to do this. I know it can be done (like in the data template you can have multiple data source). However from what I understand the threshold template would need some reworking and this is where I need help.
Is my current patch good enough?
Would having an alerting period be better? (with or without a possibility for exemption?).
Always alert 24/7 with one or multiple exemption?
About doing multiple exempt schedule, right now it can work on multiple day but it is the "same schedule". I'll need some help from the dev because I'm not too sure how to do this. I know it can be done (like in the data template you can have multiple data source). However from what I understand the threshold template would need some reworking and this is where I need help.
Re: Exemption Time
patching file thold_functions.php
Hunk #1 FAILED at 434.
Hunk #2 FAILED at 449.
Hunk #3 FAILED at 909.
Hunk #4 FAILED at 1164.
Hunk #5 FAILED at 1223.
Hunk #6 FAILED at 1248.
Hunk #7 FAILED at 1496.
Hunk #8 FAILED at 1526.
Hunk #9 FAILED at 1534.
9 out of 9 hunks FAILED -- saving rejects to file thold_functions.php.rej
patching file thold.php
Hunk #1 FAILED at 283.
Hunk #2 FAILED at 314.
Hunk #3 FAILED at 364.
Hunk #4 FAILED at 387.
Hunk #5 FAILED at 626.
5 out of 5 hunks FAILED -- saving rejects to file thold.php.rej
patching file thold_templates.php
Hunk #1 FAILED at 84.
Hunk #2 FAILED at 264.
Hunk #3 FAILED at 273.
Hunk #4 FAILED at 339.
Hunk #5 FAILED at 395.
Hunk #6 FAILED at 425.
Hunk #7 FAILED at 476.
Hunk #8 FAILED at 499.
8 out of 8 hunks FAILED -- saving rejects to file thold_templates.php.rej
it's faild,help me!
Hunk #1 FAILED at 434.
Hunk #2 FAILED at 449.
Hunk #3 FAILED at 909.
Hunk #4 FAILED at 1164.
Hunk #5 FAILED at 1223.
Hunk #6 FAILED at 1248.
Hunk #7 FAILED at 1496.
Hunk #8 FAILED at 1526.
Hunk #9 FAILED at 1534.
9 out of 9 hunks FAILED -- saving rejects to file thold_functions.php.rej
patching file thold.php
Hunk #1 FAILED at 283.
Hunk #2 FAILED at 314.
Hunk #3 FAILED at 364.
Hunk #4 FAILED at 387.
Hunk #5 FAILED at 626.
5 out of 5 hunks FAILED -- saving rejects to file thold.php.rej
patching file thold_templates.php
Hunk #1 FAILED at 84.
Hunk #2 FAILED at 264.
Hunk #3 FAILED at 273.
Hunk #4 FAILED at 339.
Hunk #5 FAILED at 395.
Hunk #6 FAILED at 425.
Hunk #7 FAILED at 476.
Hunk #8 FAILED at 499.
8 out of 8 hunks FAILED -- saving rejects to file thold_templates.php.rej
it's faild,help me!
Re: Exemption Time
Will this patch work with 0.4.3? The bug page lists it at for 0.4.1
Thanks
Thanks
Re: Exemption Time
I applied it to thold 0.4.3 and it worked without any change to the patch. Had to re-import my previous template from database backup since installation of the new version cleared out all previous template.ralf wrote:Will this patch work with 0.4.3? The bug page lists it at for 0.4.1
Thanks
Re: Exemption Time
I've got a Windows installation of Cacti that I would like to add this patch to. Would you be able to post the patched thold PHP files?
Thanks
Thanks
Re: Exemption Time
Good day,
Is there maybe a exemption time patch for Thold 0.5?
I've tried to install the patch (0.4.1) on Thold 0.5, didn't work.
Thanks,
Cacti running on Freebsd.
(Cacti Version: 0.8.8a, Plugin Architecture Version: 3.1, Thold 0.5)
Is there maybe a exemption time patch for Thold 0.5?
I've tried to install the patch (0.4.1) on Thold 0.5, didn't work.
Thanks,
Cacti running on Freebsd.
(Cacti Version: 0.8.8a, Plugin Architecture Version: 3.1, Thold 0.5)
Who is online
Users browsing this forum: No registered users and 3 guests