-
Type:
Problem report
-
Resolution: Unresolved
-
Priority:
Trivial
-
None
-
Affects Version/s: 7.0.32
-
Component/s: Frontend (F)
-
None
-
Environment:Zabbix 7.0.32 (server + frontend), Ubuntu, Apache
The Problem hosts widget counts problems of triggers that depend (directly or through a dependency chain) on another trigger in PROBLEM state. The Problems and Problems by severity widgets hide those problems, because they fetch triggers with 'skipDependent' => true (see getSystemStatusData() in ui/include/blocks.inc.php). ui/widgets/problemhosts/actions/WidgetView.php does not use this option, so the widgets show different results for the same host.
Related: ZBX-26719 (closed as Cannot Reproduce because it focused on severity; the real cause is the dependency chain).
Steps to reproduce:
- On one host, create trigger A (root cause), trigger C depending on A, and trigger B depending on C.
- Make A and B go to PROBLEM, keeping C in OK.
- Open the Problems and Problems by severity widgets: only A is shown.
- Open the Problem hosts widget: the host is counted with A and B.
- (Real case) Change the severity of A's problem to Not classified and exclude Not classified in all three widgets.
Result:
Problems and Problems by severity show nothing. Problem hosts still shows the host, with a Disaster problem (B, a dependent trigger). See screenshots.
Expected:
Problem hosts applies the same dependency rule as the other problem widgets and does not count dependent problems.
Proposed fix:
Add 'skipDependent' => true to the API::Trigger()->get() call in ui/widgets/problemhosts/actions/WidgetView.php. See attached patched file.
Tested locally on 7.0.32