[ZBX-16337] Incorrect debug log output when actions are suppressed while maintenance period Created: 2019 Jul 04  Updated: 2024 Apr 10  Resolved: 2019 Jul 23

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Server (S)
Affects Version/s: 4.0.10, 4.2.4
Fix Version/s: 4.0.11rc1, 4.2.5rc1, 4.4.0alpha1, 4.4 (plan)

Type: Problem report Priority: Major
Reporter: Kotaro Miyashita Assignee: Viktors Tjarve
Resolution: Fixed Votes: 0
Labels: maintenance
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: File zabbix-fix-check_escalation_result_string.patch    
Team: Team A
Sprint: Sprint 54 (Jul 2019)
Story Points: 0.125

 Description   

Not suitable log with DebugLevel=4 appears when actions are suppressed in when a maintenance period.
Because the case of ZBX_ESCALATION_SUPPRESS is not implemented in check_escalation_result_string().
Please see the attached patch.

Steps to reproduce:

1. Set DebugLeve=4
2. Create a maintenance period with data collection.
3. Create a series of item,trigger and  action with option "Pause operations for suppressed problems" enabled.
4. Make an event which executes the action while the maintenance period.
5. Find out the log.

Result:
 30152:20190702:174302.811 In check_escalation() escalationid:34
status:sleep
 30152:20190702:174302.811 End of check_escalation():unknown error:''

 Expected:
 14053:20190703:145402.846 In check_escalation() escalationid:1
status:sleep
 14053:20190703:145402.846 End of check_escalation():suppress error:''

 



 Comments   
Comment by Viktors Tjarve [ 2019 Jul 18 ]

Released in:

Comment by Glebs Ivanovskis [ 2019 Jul 18 ]

If ZBX_ESCALATION_* were a proper enum type instead of a bunch of #define‍s, compiler would be able to warn that certain enum values are not handled in switch. Just saying...

Generated at Fri Apr 26 20:24:53 EEST 2024 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.