Discussion:
Alerts rules with active periods
Touko Vainio-Kaila
2012-09-18 11:58:11 UTC
Permalink
Touko Vainio-Kaila [http://community.zenoss.org/people/touko] created the discussion

"Re: Alerts rules with active periods"

To view the discussion, visit: http://community.zenoss.org/message/68635#68635

--------------------------------------------------------------
I have just the same problem, using Zenoss 2.5.1 ATM.

The alerting rule is set disabled and active periods are set enabled but I don't get any alerts. Alert rule hsould otherwise be OK because in the case of "ongoing issue", if I set the alerting rule enabled, I get an alert email in a couple of minutes.

Is there something trivial we are missing with Active period settings? I suppose this should work, right?

regards,
Touko
--------------------------------------------------------------

Reply to this message by replying to this email -or- go to the discussion on Zenoss Community
[http://community.zenoss.org/message/68635#68635]

Start a new discussion in zenoss-users by email
[discussions-community-forums-zenoss--***@community.zenoss.org] -or- at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
Touko Vainio-Kaila
2012-09-18 13:01:29 UTC
Permalink
Touko Vainio-Kaila [http://community.zenoss.org/people/touko] created the discussion

"Re: Alerts rules with active periods"

To view the discussion, visit: http://community.zenoss.org/message/68651#68651

--------------------------------------------------------------
Hi again,

one place to get related info is the zenactions log (from the GUI : Settings -> Daemons).

Based on that, it would seem that combination of Disabled Alerting Rule + Enabled Active Periods would end up as not processing the rule?

I tried with enabling the alerting rule. That increased the number of processed rules and email was sent (my alerting rule condition was fulfilled)

2012-09-18 15:40:28,472 INFO zen.ZenActions: processed 30 rules in 0.12 secs
2012-09-18 15:41:28,486 INFO zen.ZenActions: Processed 0 commands in 0.000028
2012-09-18 15:41:28,902 INFO zen.ZenActions: rule 'Rule_name' sent email:Email subject to:['***@bar.com']
2012-09-18 15:41:28,986 INFO zen.ZenActions: processed 31 rules in 0.51 secs
2012-09-18 15:42:29,030 INFO zen.ZenActions: Processed 0 commands in 0.000035

Does anyone have more insight?

regards, Touko
--------------------------------------------------------------

Reply to this message by replying to this email -or- go to the discussion on Zenoss Community
[http://community.zenoss.org/message/68651#68651]

Start a new discussion in zenoss-users by email
[discussions-community-forums-zenoss--***@community.zenoss.org] -or- at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
Touko Vainio-Kaila
2012-09-19 09:45:25 UTC
Permalink
Touko Vainio-Kaila [http://community.zenoss.org/people/touko] created the discussion

"Re: Alerts rules with active periods"

To view the discussion, visit: http://community.zenoss.org/message/68658#68658

--------------------------------------------------------------
After some googling etc, I found that this alerting rules + schedules + enabled-states seems to have been somewhat unclear.

Related Zenoss Trac tickets:
* http://dev.zenoss.com/trac/ticket/6223 #6332 (for 2.5.1, Current documentation in Administration Guide is incorrect)
* http://dev.zenoss.com/trac/ticket/4146 #4146 (for 2.3.0 originally, AlertingRuleWindows are ignored if AlertingRule is enabled)* From comments :  The defect review meeting agrees with this and the P2/S1 prioritization. This does need to be addressed, but will not likely make 3.0.

* http://dev.zenoss.com/trac/ticket/4889 #4889 (for 2.3.3 originally, Alerting rule 'Enabled' status, to not be effected by schedule)

Some related messages (mostly for 2.X series)
* http://community.zenoss.org/message/21635#21635 http://community.zenoss.org/message/21635#21635
* http://community.zenoss.org/message/21838#21838 http://community.zenoss.org/message/21838#21838
* http://community.zenoss.org/message/21753#21753 http://community.zenoss.org/message/21753#21753

It remains a bit unclear how the functionality has worked during the different old versions.

regards, Touko
--------------------------------------------------------------

Reply to this message by replying to this email -or- go to the discussion on Zenoss Community
[http://community.zenoss.org/message/68658#68658]

Start a new discussion in zenoss-users by email
[discussions-community-forums-zenoss--***@community.zenoss.org] -or- at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
Arend van der Boom
2012-09-19 18:28:53 UTC
Permalink
Arend van der Boom [http://community.zenoss.org/people/Moob] created the discussion

"Re: Alerts rules with active periods"

To view the discussion, visit: http://community.zenoss.org/message/68681#68681

--------------------------------------------------------------
Hi Touko,

Hi have tried some other things to get the active periods working but I did not suceed, sometime they worked and sometime then don't. So now I switch to using maintenance windows instead. It gives me greater flexibility then the active period windows and it does what I wanted to do with active periods. Creating a window in which Zenoss does not do any active monitoring and alerting.

Regards
Moob
--------------------------------------------------------------

Reply to this message by replying to this email -or- go to the discussion on Zenoss Community
[http://community.zenoss.org/message/68681#68681]

Start a new discussion in zenoss-users by email
[discussions-community-forums-zenoss--***@community.zenoss.org] -or- at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
Touko Vainio-Kaila
2012-09-20 07:30:18 UTC
Permalink
Touko Vainio-Kaila [http://community.zenoss.org/people/touko] created the discussion

"Re: Alerts rules with active periods"

To view the discussion, visit: http://community.zenoss.org/message/68688#68688

--------------------------------------------------------------
Hi Arend,

thanks for the info.

Maintenance windows seem to be device/device group specific? (What I'd need in a perfect world would be different time windows for different monitored things but these could also work).

If somebody still knows a way to get these alerting rule schedules to work, please share =)

Regards,
Touko
--------------------------------------------------------------

Reply to this message by replying to this email -or- go to the discussion on Zenoss Community
[http://community.zenoss.org/message/68688#68688]

Start a new discussion in zenoss-users by email
[discussions-community-forums-zenoss--***@community.zenoss.org] -or- at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
Arend van der Boom
2012-09-20 18:11:31 UTC
Permalink
Arend van der Boom [http://community.zenoss.org/people/Moob] created the discussion

"Re: Alerts rules with active periods"

To view the discussion, visit: http://community.zenoss.org/message/68691#68691

--------------------------------------------------------------
Hi Touko,

Yes, you can set a maintenance window on groups and seperate devices. For a device go to Administration, for a group click on Details and then Administration. That way you can give every single device a different maintenance window if you want to.

Regards
Arend
--------------------------------------------------------------

Reply to this message by replying to this email -or- go to the discussion on Zenoss Community
[http://community.zenoss.org/message/68691#68691]

Start a new discussion in zenoss-users by email
[discussions-community-forums-zenoss--***@community.zenoss.org] -or- at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
jcurry
2012-09-21 12:20:36 UTC
Permalink
jcurry [http://community.zenoss.org/people/jcurry] created the discussion

"Re: Alerts rules with active periods"

To view the discussion, visit: http://community.zenoss.org/message/68695#68695

--------------------------------------------------------------
Maintenance windows and schedules for alerting rules are, in fact, implemented using the same underlying Python code.

Maintenance windows can be deployed on devices, device classes, groups, systems and locations so it is a good way to implement (as the name says) maintenance windows for a collection of devices.

The schedule for an alerting rule is the same concept but user-focused.

Schedules for alerting rules do work (in my experience) but can be a little confusing to setup and get especially confusing if you have several alerting rules / schedules that apply to a particular user (like an alerting rule specific to a user and an alerting rule for the group that a user is a member of).

I would always setup an alerting rule as Enabled.  Then create your schedule and make sure that is enabled.  The schedule will then enable / disable the alerting rule as appropriate.

As Touko says, zenactions.log is your debug tool here.

One thing I have been working on recently is an audit script to dump to flat files, many of the elements of the Zope database.  I have one that dumps users, their alerting rules and associated schedules; another dumps user groups with rules and schedules; a third dumps maintenance windows.  I have done basic testing of these on both Zenoss 3 and 4 (the alerting rules and schedules do not get reported on Zenoss 4 as the notifications / triggers mechanism has changed) - other than that, they seem to work fine.  I am looking for other testers.  please let me know if these would be helpful and you have a test environment to run them in and I will send you the tar bundle.

Cheers,
Jane
--------------------------------------------------------------

Reply to this message by replying to this email -or- go to the discussion on Zenoss Community
[http://community.zenoss.org/message/68695#68695]

Start a new discussion in zenoss-users by email
[discussions-community-forums-zenoss--***@community.zenoss.org] -or- at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
Touko Vainio-Kaila
2012-09-25 07:33:08 UTC
Permalink
Touko Vainio-Kaila [http://community.zenoss.org/people/touko] created the discussion

"Re: Alerts rules with active periods"

To view the discussion, visit: http://community.zenoss.org/message/68709#68709

--------------------------------------------------------------
Thanks Jane for your reply

despite trying, I haven't seen Active Periods of Schedule to have any effect at all (using Zenoss 2.5.1; pretty old, I know).

What I have tried:

* Alerting rule disabled, Active periods enabled* This seems to be what the manual advices to do.
* Alerting rule is disabled
* Active Period for desired time (Enabled, repeat daily)
* -> Don't get any notifications
* *So active period alone doesn't seem to activate disabled alerting rule?*

* Alerting rule enabled, Active periods enabled/disabled* As you mentioned
* Alerting rule enabled
* Active period that is enabled for certain time (enabled, repeat daily)
* Active period that is disabled for rest of the time (disabled, repeat daily)
* -> I get notifications every hour (Repeat Time set to one hour for testing)
* *So Active period that is disabled doesn't seem to disable an active alerting rule*


Is there something I should understand to consider?

Best regards,
Touko
--------------------------------------------------------------

Reply to this message by replying to this email -or- go to the discussion on Zenoss Community
[http://community.zenoss.org/message/68709#68709]

Start a new discussion in zenoss-users by email
[discussions-community-forums-zenoss--***@community.zenoss.org] -or- at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
jcurry
2012-09-26 19:55:36 UTC
Permalink
jcurry [http://community.zenoss.org/people/jcurry] created the discussion

"Re: Alerts rules with active periods"

To view the discussion, visit: http://community.zenoss.org/message/68752#68752

--------------------------------------------------------------
Not quite sure I understand you here.  From your second scenario with Alerting Rule enabled, you just set up one schedule  for when you want the rule to be active.  You enable the rule and the schedule.  You do NOT set up a schedule for the inactive period - just a window for the active period.

You should then see that the overall rule is active during the period you have defined, and the rule is automatically disabled the rest of the time.

Cheers,
Jane
--------------------------------------------------------------

Reply to this message by replying to this email -or- go to the discussion on Zenoss Community
[http://community.zenoss.org/message/68752#68752]

Start a new discussion in zenoss-users by email
[discussions-community-forums-zenoss--***@community.zenoss.org] -or- at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
Touko Vainio-Kaila
2012-09-27 07:40:37 UTC
Permalink
Touko Vainio-Kaila [http://community.zenoss.org/people/touko] created the discussion

"Re: Alerts rules with active periods"

To view the discussion, visit: http://community.zenoss.org/message/68737#68737

--------------------------------------------------------------
Hi,

I have a feeling that I've tried this already but I'll give it another try. So, your suggestion is
* Alerting rule itself : enabled
* Active period for the alerting rule :  enabled
* -> So the alerting rule will first be enabled (and send emails) should be disabled when the active period ends, right?

You're talking about enabling the schedule, this might be a version mismatch (I'm using 2.5.1)? At least, I haven't yet discovered how to "enable/disable a schedule"?

For the Alerting rule, I got the following tabs:
* Edit (with Enabled state for the whole alerting rule)
* Message
* Schedule with list of Active Periods (in some parts of GUI referred to as "Rule Window")* Active periods have Enabled state


Is there something I have missed? (I'll try this new active period setup anyway)

Best regards,
Touko
--------------------------------------------------------------

Reply to this message by replying to this email -or- go to the discussion on Zenoss Community
[http://community.zenoss.org/message/68737#68737]

Start a new discussion in zenoss-users by email
[discussions-community-forums-zenoss--***@community.zenoss.org] -or- at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
chitambira
2012-09-27 09:07:13 UTC
Permalink
chitambira [http://community.zenoss.org/people/chitambira] created the discussion

"Re: Alerts rules with active periods"

To view the discussion, visit: http://community.zenoss.org/message/68755#68755

--------------------------------------------------------------
Post by Touko Vainio-Kaila
You're talking about enabling the schedule, this might be a version mismatch (I'm using 2.5.1)? At least, I haven't yet discovered how to "enable/disable a schedule"?
In the Schedule Tab, if you click on the schedule name listed there, it should take you to the properties of that schedule where you can change 'Enabled' from False to True.
--------------------------------------------------------------

Reply to this message by replying to this email -or- go to the discussion on Zenoss Community
[http://community.zenoss.org/message/68755#68755]

Start a new discussion in zenoss-users by email
[discussions-community-forums-zenoss--***@community.zenoss.org] -or- at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
Touko Vainio-Kaila
2012-09-27 12:00:23 UTC
Permalink
Touko Vainio-Kaila [http://community.zenoss.org/people/touko] created the discussion

"Re: Alerts rules with active periods"

To view the discussion, visit: http://community.zenoss.org/message/68771#68771

--------------------------------------------------------------
Hi,

this might be a version mismatch or then I'm still missing something?
Loading Image... Loading Image...
Best regards,
Touko
--------------------------------------------------------------

Reply to this message by replying to this email -or- go to the discussion on Zenoss Community
[http://community.zenoss.org/message/68771#68771]

Start a new discussion in zenoss-users by email
[discussions-community-forums-zenoss--***@community.zenoss.org] -or- at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
joanypony
2013-04-11 09:32:58 UTC
Permalink
joanypony [http://community.zenoss.org/people/joanypony] created the discussion

"Re: Alerts rules with active periods"

To view the discussion, visit: http://community.zenoss.org/message/72784#72784

--------------------------------------------------------------
Hi,

I know this is an old post, but I was having issues with schedules yesterday and was going crazy. I've finally figured it out, so I thought I'd let you know.

Your alerting rule must be enabled.
Your schedule must be enabled.

Say it is 9am now. You have just created your schedule,  and your schedule says the alerting rule is only to alert between 10am and 11am every day.
At this exact moment, it will not work as you expect. You will receive alerts.

If you wait, at 10am, the schedule will start to work as it should. At 11am, zenoss will set the status of the alerting rule to disabled. Then tomorrow, at 10am, it will set the status of the alerting rule to enabled.

I hope that helps. The difficulty in troubleshooting during the setup, is that Zenoss doesn't seem to behave as expected until the start time of the schedule has passed.

Regards,
Joan
--------------------------------------------------------------

Reply to this message by replying to this email -or- go to the discussion on Zenoss Community
[http://community.zenoss.org/message/72784#72784]

Start a new discussion in zenoss-users at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
Loading...