grafana / grafana-zabbix

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

Variables: option to only return enabled Zabbix hosts #362

Open Rickkwa opened 7 years ago

Rickkwa commented 7 years ago

I'm submitting a ...

Hello, Right now when you create a template variable and your query, for example, is simply *.* then it will return all hosts. Even the hosts that are in disabled state are returned. I think an option to return only enabled hosts would be nice to have.

Thanks.

alexanderzobnin commented 7 years ago

Sorry, but I can't add this option because datasource hasn't control over template variable editor. May be I can add it as data source option, but it will affect all variables belonging to given datasource.

Rickkwa commented 7 years ago

I think even if it affects all variables in the datasource, it is a nice option to have. Thanks.

Perlovka commented 7 years ago

Maybe it could be implemented in metrics, like "Show disabled items" one?

alexanderzobnin commented 7 years ago

But why do you need to hide disabled hosts? Because by default only enabled Items will be shown.

ptempier commented 6 years ago

Hi

I think it still shows if at the template/host level the item is disabled , but the host itself is active

I get server versions as a table in grafana, but for disabled servers, i would get an empty line in grafana.

I also get an empty line for server with an unsupported items or one where the scripts bug parsing the version and return empty data. In that case i need to fix my script or whatever.

But if i disabled the host in zabbix, this means i don't want/care about that data anymore and just want to keep the archived data for future reference.

To me it would seems fair to allow for a filter at the datasource level , if this can not be done as a grafana metric option.(at worst we could create a datasource for all hosts and one for active only hosts)

urusha commented 5 years ago

But why do you need to hide disabled hosts? Because by default only enabled Items will be shown.

Because if there are many disabled hosts, filtering by hosts is really inconvenient, since you have to scroll down again and again.

alexanderzobnin commented 5 years ago

@urusha you could just start to type hostname and reduce the list of suggested hosts.

urusha commented 5 years ago

@alexanderzobnin I could, but is it convenient? If I see 5 hosts with different names [a-z] instead of 100, I could easily mark them in a few secs without any typing... More over, if I get no data after choosing the particular host, I can not even determine if the host is enabled or not, or if the item is enabled or not (disabled / unsupported / has no values). That would be great if we could use filter parameter in the api queries somehow (status in this case).

polak785 commented 3 years ago

Indeed, like other ones, when we have many servers and the old ones are only deactivated and not deleted on Zabbix, this is very annoying to scroll down on Grafana on dashbords that display metrics with repetitive panels based on hosts.

Will it be supported in the future?

skaboy007 commented 3 years ago

ye this one is actually extremely important

github-actions[bot] commented 1 month ago

This issue has been automatically marked as stale because it has not had activity in the last 2 years. It will be closed in 60 days if no further activity occurs. Please feel free to leave a comment if you believe the issue is still relevant. Thank you for your contributions!