[ZBX-10178] action sends e-mails while host is in maintenance Created: 2015 Dec 18  Updated: 2017 May 30  Resolved: 2015 Dec 21

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Server (S)
Affects Version/s: 2.4.5
Fix Version/s: None

Type: Incident report Priority: Trivial
Reporter: itcbsops Assignee: Unassigned
Resolution: Won't fix Votes: 0
Labels: conditions, duration, escalations, maintenance, step
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Production, Linux


Issue Links:
Duplicate
duplicates ZBXNEXT-1565 maintenance windows or changes to esc... Closed

 Description   

Here is what is going on.

1) trigger value switched to "Problem" at 2015-12-18 08:57:21, generating an event (ID = 734038)
2) action sent an email as expected
3) maintenance period was activated for that host (after the problem started)

What I have noticed is :

A) escalation step continues to increment and emails to be sent, and yet there is a condition "maintenance status is not in maintenance". The condition is ignored, probably because the action "loop" started before the host was set to maintenance. That behaviour is odd.

B) a change in the step duration is effective only after the initial step duration is elapsed. ie. If I switch the step duration from 3600 seconds to 60 seconds, it takes 1 hour before the step duration switches to 60 seconds...

C) the step increment stops if I disable the host and enable it again after a few minutes. In other words, the strange behaviour described in (A) is fixed by disabling / enabling the host : the action's condition "maintenance" is now effective



 Comments   
Comment by Aleksandrs Saveljevs [ 2015 Dec 18 ]

Indeed, function check_escalation() in src/zabbix_server/escalator/escalator.c does not recheck whether host is in maintenance and neither does it check other action conditions like "Trigger severity", etc.:

/******************************************************************************
 *                                                                            *
 * Function: check_escalation                                                 *
 *                                                                            *
 * Purpose: check whether the escalation is still relevant (items, triggers,  *
 *          hosts, and actions are still present and were not disabled)       *
 ...

We shall discuss whether this is by design or not.

Comment by richlv [ 2015 Dec 18 ]

that is by design. "maintenance does not stop active escalations", citing from the zabbix training

Comment by Aleksandrs Saveljevs [ 2015 Dec 21 ]

Thanks, richlv! Indeed, it is already documented at https://www.zabbix.com/documentation/2.4/manual/config/notifications/action/escalations .

Comment by itcbsops [ 2016 Feb 05 ]

Hi,

Thanks very much for the answer.
Now we have a few months of zabbix usage and we have acquired a fairly good expertise.
Still, the way manteinance is handled in regards to how the actions are evaluated, is annoying.

Last night again, we had the following :

  • Trigger switched to Problem
  • Action sent an e-mail
  • Then the maintenance started (it was the end of the working day, maintenance is setup everyday from 7:00pm to 7:30am with no data collection)
  • all night long, the action escalation step incremented and sent e-mails <-- during maintenance period, the trigger has no value (it isn't Problem, or OK), so it doesn't make any sense to continue escalation. Besides, there is a condition "maintenance is not mainenance" in the action, which isn't respected when the host is in maintenance

When you setup a maintenance, you don't want the action to continue sending e-mails.

Would it be possible to upgrade this case to feature/improvement request ?

Comment by Aleksandrs Saveljevs [ 2016 Feb 08 ]

There is another similar request at ZBXNEXT-1565. Maybe we can consider this issue as a duplicate of that.

Comment by itcbsops [ 2016 Feb 15 ]

I agree, the case seems similar.
I will follow-up with the other case.

Generated at Thu Jun 26 08:07:28 EEST 2025 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.