grafana-zabbix icon indicating copy to clipboard operation
grafana-zabbix copied to clipboard

Triggers: acknowledged filter doesn't work

Open tolstiyman opened this issue 5 years ago • 10 comments

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 all unack ack

Software versions

Grafana Zabbix Grafana-Zabbix Plugin
7.0.1 5.0.0 3.12.2

tolstiyman avatar Jun 10 '20 09:06 tolstiyman

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

heyrod avatar Jun 22 '20 09:06 heyrod

The v3.12.2 query editor (Triggers mode) does not save the proper parameter value to the dashboard. image

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 image
  • 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

sirbavo avatar Jun 24 '20 14:06 sirbavo

HI! Can you check this issue in latest plugin version?

alexanderzobnin avatar Sep 14 '20 06:09 alexanderzobnin

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

sirbavo avatar Sep 14 '20 09:09 sirbavo

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.

Screen Shot 2020-11-11 at 4 38 30 PM

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

Positronico avatar Nov 12 '20 00:11 Positronico

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:

Screenshot from 2020-11-12 13-10-59

Screenshot from 2020-11-12 13-05-27

In this mode filters work as expected.

alexanderzobnin avatar Nov 12 '20 10:11 alexanderzobnin

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.

Positronico avatar Mar 05 '21 15:03 Positronico

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

GauthierSgds avatar Apr 01 '22 08:04 GauthierSgds

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!

GauthierSgds avatar May 20 '22 07:05 GauthierSgds

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

dayatto avatar Jul 07 '22 07:07 dayatto

I think I fixed it during the refactoring, so let's check how it works after release.

alexanderzobnin avatar Dec 15 '22 15:12 alexanderzobnin