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

Single host items contain the hostname in the legend

Open osas1111 opened this issue 4 years ago • 3 comments

Describe the bug Since 4.2.0 version of Grafana plugin I facing a problem with legend presentation. For single host items hostname is present the same as for multi-host graph/time_series. These changes was not present in change logs so I want to make sure before changing my dashboards for new version

Expected behavior No hostname in legend for single host graph/time_series

Screenshots expected: image

current: image

Software versions

Grafana Zabbix Grafana-Zabbix Plugin
8.1.4 5.4.4 4.2.4

osas1111 avatar Oct 22 '21 08:10 osas1111

I've managed to remediate this using setAlias and replaceAlias... But still, it would be better not to show hostname by default as it was in earlier versions.

Phobos-7 avatar Nov 10 '21 21:11 Phobos-7

Same problem here Grafana 8.4.2, Zabbix 5.2.7, Grafana-Zabbix 4.2.5

rike50 avatar Mar 18 '22 13:03 rike50

Got same on my testing instalation: Grafana: 8.2.6 Zabbix-plugin: 4.2.5 Zabbix: 5.0.19

stvolinko avatar Apr 08 '22 11:04 stvolinko

There's a workaround - you can use setAlias($__zbx_item_name) to force plugin use only item name.

alexanderzobnin avatar Aug 01 '23 09:08 alexanderzobnin

There's a workaround - you can use setAlias($__zbx_item_name) to force plugin use only item name.

This is not a good option for existing environments - it requires to edit hundreds existing dashboards

vryzhevsky avatar Aug 01 '23 12:08 vryzhevsky

@vryzhevsky Yes, I agree, that's why I called it a workaround. I'm looking into this issue, seems, it's not that straightforward since plugin now uses data frame format for response, but I hope I can find out a solution.

alexanderzobnin avatar Aug 01 '23 13:08 alexanderzobnin

Hi, new version 4.1.1 did not fix the issue

vryzhevsky avatar Sep 18 '23 11:09 vryzhevsky

You should use replaceAlias function to remove the hostname part. look at the steps on this video: https://youtu.be/-dT8Yu0Upk4?list=PLTAdaA8clXXK9A9rPjBKqxho4AGSTb6un&t=352

isaqueprofeta avatar Nov 06 '23 18:11 isaqueprofeta

When using "Direct DB Connection" on version 4.4.3 , still not fixed

onanok avatar Nov 13 '23 02:11 onanok