grafana-zabbix
grafana-zabbix copied to clipboard
Triggers: acknowledged filter doesn't work
Describe the bug In the query editor (Triggers mode), Acknowledged filter doesn't change anything(I know that 20 from 23 problems are acknowleged).
Expected behavior Only acknowledged or unacknowledged triggers.
Screenshots

Software versions
| Grafana | Zabbix | Grafana-Zabbix Plugin |
|---|---|---|
| 7.0.1 | 5.0.0 | 3.12.2 |
My guess is that it incorrectly queries Zabbix. For unacknowledged alerts, the query should include "Acknowledged=0", for acknowledged -- "Acknowledged=1", and for all triggers - nothing.
You can see this at the demo dashboard https://play.grafana-zabbix.org/d/000000024/problems?orgId=2
The v3.12.2 query editor (Triggers mode) does not save the proper parameter value to the dashboard.

If I manually fix the dashboard JSON model, it will show the real all triggers / acknowledged / unacknowledged values.
Dashboard JSON model:
- wrong: the value is always 2 within the actual panel block -> "targets" -> "triggers" -> "acknowledged" section

- wrong: it is updating only the panel -> "targets" -> "options" -> "acknowledged" section, but it is also not saved properly in every case and it is not relevant in my case.
This was working with the editor in v3.11.0 (but that version has other mission critical bugs in our use cases). Until (at least) this is not fixed, we do not have a fully working plugin for Grafana v6 and v7.
Software versions
| Grafana | Zabbix | Grafana-Zabbix Plugin |
|---|---|---|
| 6.7.4 | 4.0.21 | 3.12.2 |
| 7.0.3 | 4.0.21 | 3.12.2 |
HI! Can you check this issue in latest plugin version?
Hello @alexanderzobnin!
There is no difference.
Software versions
| Grafana | Zabbix | Grafana-Zabbix Plugin |
|---|---|---|
| 7.0.3 | 4.0.21 | 4.0.1 |
| 7.1.5 | 4.0.21 | 4.0.1 |
Issue seems to be present also on Problems query. The Unacknowledged filter behaves just like no filter (shows unacknowledged and acknowledged). It's possible to filter for Acknowledged only, though.

| Grafana | Zabbix | Grafana-Zabbix Plugin |
|---|---|---|
| 7.0.3 | 4.0.21 | 4.0.1 |
| 7.1.5 | 4.0.21 | 4.0.1 |
| 7.3.1 | 4.4.10 | 4.0.1 |
Yes, confirmed: this bug still present.
I've found a workaround that makes me to think about deprecating Triggers editor mode. With new Transform feature it's possible to use Problems mode instead of Triggers to count problems, just use Series to rows with count transformation:


In this mode filters work as expected.
Something I noticed recently: I was considering the filled chat bubble as an acknowledged problem and the clear one as unacknowledged. Turns out the filled/unfilled only tells you the problem has COMMENTS in it, not necessarily the "Acknowledge" checkbox was checked.
This assumptions came from the fact in previous version there were not such checkbox. A comment was an acknowledge. But today we have the option to just add a comment without acknowledging it and even change problem severity.
Maybe there is room for UI improvement here (with different icons for ack/comments and ack checkbox defaults to checked) but I can confirm the filter is working properly for ack'ed/unack'ed problems.
Hi,
For Grafana 8.3.7 and plugin 4.2.5 I haved the same issue. After looking in the code,
I edited line 351 in query.editor.html ng-model="ctrl.target.options.acknowledged" --> ng-model="ctrl.target.triggers.acknowledged"
And added line acknowledged?: '1' | '0'; in interface ZBXTrigger in type.ts file
After rebuild plugin, filter works again.
Regards
Hi @alexanderzobnin, can you put into next release correction on query.editor.html file --> replace ng-model="ctrl.target.options.acknowledged" by ng-model="ctrl.target.triggers.acknowledged" and add line acknowledged?: '1' | '0'; in interface ZBXTrigger in type.ts file?
Thanks in advance!
any help or suggest for this case ? i'm still can't to display number of counting problem each severity using filter acknowledge or unacknowledge. use the stats panel or table same issue. hope any help this case thankyou
I think I fixed it during the refactoring, so let's check how it works after release.