Problem description: Let's say there is a parent service, that goes in problem status if one of its child services is in status problem. At least 2 of its child services, that are based on triggers, are in problem status, one of which was set in this status by an event with future timestamp (corresponding problem has negative duration). If all child services change their status to OK except for the one with the future dated event, the problem with negative duration is not considered in calculation of the child service SLA, but still is considered in calculation of parent service SLA.
ZBX-14592, Problems with negative duration should not affect SLA calculations.
Steps to reproduce:
- Create a host with 2 trapper items
- Create a trigger for each item, all triggers should have different severities (Warning, Average)
- Create a Parent service: set "Start calculation algorithm" to "Problem, if at least one child has a problem" and set the "Calculate SLA" option.
- Create 2 child services with same setup, specify 1 previously created trigger for each service.
- Set the trigger with lower priority (and the corresponding child service) to status "Problem" by a problem events with current timestamp - make sure that the parent service is now also in status "Problem".
- Set the 2nd trigger with higher priority (and the corresponding child service) to status "Problem" by a future dated event. Verify that a problem with negative duration is produced.
- Set the 1st triggers with lower priority (and the corresponding child services) to status OK and check SLA for all 3 services.
Result: SLA of both child services is not decreasing (as one is in status ok, but the problem for the other is triggered by an event with future timestamp), but the SLA of the parent service continues to decrease.
Expected: problems with negative duration should not influence SLA calculations