grafana / grafana-zabbix

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

Variables: filter out only enabled hosts #1120

Open Froggy13 opened 3 years ago

Froggy13 commented 3 years ago

I would to filter the Hosts who are enabled in Zabbix.

I have two plateformes Grafana with the same version 7.3.5 and same plugin Zabbix 4.0.2 I would like to know how to display the option "Legacy Query" in Variables menu and the query to filter on the enabled Host inZabbix

Source Zabbix image

Source Grafana : image

image

Kind regards !
David

Software versions

Grafana Zabbix Grafana-Zabbix Plugin
7.3.5 4.2.x 4.0.2
alexanderzobnin commented 3 years ago

Legacy query is only shown when you change variable that was created in the previous version of the plugin. Why do you need this editor? New editor has the same capabilities. I think it's possible to add "enabled" toggle to the new variable query.

Froggy13 commented 3 years ago

In fact, my target is to filter only selected host enabled.(right side picture) Do you know how to do it in the variable menu with a Zabbix source ?

image

alexanderzobnin commented 3 years ago

It's not possible now, but looks like a good feature request.

Froggy13 commented 3 years ago

Thank you !
I whish you a Merry Christmas to you and your family!

ironbishop commented 3 years ago

is this the spot? https://github.com/alexanderzobnin/grafana-zabbix/blob/83618178f0d541f662548727a6793b07402610c6/pkg/datasource/zabbix.go#L344-L349

Froggy13 commented 3 years ago

I'dont know !!! I don't see the parameter "host enabled"

rike50 commented 1 year ago

Hi @alexanderzobnin , is this feature request possible now ?