grafana / grafana-zabbix

Zabbix plugin for Grafana dashboard
http://play.grafana-zabbix.org
Apache License 2.0
2.06k stars 458 forks source link

Operational data display issue in Zabbix problems panel #1832

Open dvaltmoli opened 4 months ago

dvaltmoli commented 4 months ago

Describe the bug When using the {ITEM.VALUE} macro in operational data and multiple event generation, Grafana displays the latest item value in the operational data inside the event detail, rather than the value that originally created the problem event. This behavior is different from Zabbix, where the operational data correctly reflects the value that triggered the problem event.

Steps to Reproduce

latest_data

grafana_problems

In Zabbix, the operational data column works as expected, showing the value that triggered the problem event. Grafana, however, displays the latest item value in the operational data, which may not accurately represent the problem.

Upon inspecting the API calls in the browser's developer mode, I noticed that the calls being made are 'trigger.get' and 'problem.get'. The first one obtains the operational data correctly, but the second one obtains only the last value of the item. I suppose that's the problem, use the last value of the item obtained with the problem.get method instead the operational data obtained with the trigger.get call.

grafana_problem get

grafana_trigger get

Note: If you enable the operational data column in the Zabbix problems panel, it will correctly display the operational data.

grafana_opdata_column

Software versions

Grafana Zabbix Grafana-Zabbix Plugin
10.0.1 5.0.30 4.3.1
10.1.4 5.0.30 4.4.1
10.1.4 5.0.42 4.4.9
11.0 5.0.42 4.4.9
11.0 6.0.30 4.4.9
msantpine commented 4 months ago

+1

jjffall commented 4 months ago

+1

atelleira commented 4 months ago

+1

real-t0mg commented 4 months ago

I'm getting the same error with operational data with a similar trigger configuration:

rtarditi commented 4 months ago

+1

Geekul commented 3 months ago

+1

josemfh commented 3 months ago

+1