Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Alias as Item Name on all queries #1399

Closed
cdaher78 opened this issue Feb 23, 2022 · 5 comments
Closed

Alias as Item Name on all queries #1399

cdaher78 opened this issue Feb 23, 2022 · 5 comments

Comments

@cdaher78
Copy link

Describe the bug
Alias from Stats, Gauge, Time Series and every plugin brings "Host":"Item" names

Expected behavior
Only show "Item" name as on v7.5

Screenshots
If applicable, add screenshots to help explain your problem.

Software versions

Grafana Zabbix Grafana-Zabbix Plugin
8.4.1 5.0.20 4.2.5

I'd like to have all my queries (stats, gauge, time series graphics, etc) to show aliases with "Item" name.
I have several dashboards with lot of querries and I can't just use a setalias($__zbx_item_name) for each one. It will take so much time.
Is there such a script or a fix to make this version compatible in this regard?

Thanks in advance.

@cdaher78 cdaher78 changed the title Alias as Item Name on all panels Alias as Item Name on all queries Feb 23, 2022
@cdaher78
Copy link
Author

cdaher78 commented Mar 9, 2022

The best regex I found to set the correct alias name is [^\:]+\:.(.+)

So I'd like a tip to how could I set this regex on every dashboard / panels I have.

Thanks

@alexanderzobnin
Copy link
Collaborator

Hi! In latest Grafana versions there's a labels string in a metric name. So since plugin includes host as a label, maybe it makes sense to remove default host prefix.

@alexanderzobnin
Copy link
Collaborator

I think it's the same reason as #1444. So fixed and will be available in the next release.

@cdaher78
Copy link
Author

cdaher78 commented May 6, 2022

Great news and great job!

@rrz
Copy link

rrz commented Sep 22, 2022

Hi!
I updated grafana 7.3.6 to grafana 8.5.13 and zbx plugin 4.2.10
but now every zabbix item has host prefix
before
image

now
image

and that breaks many overrides, transforms and etc. And I have more than 1000 dashboards
Issue seems to me still actual, and if not, can you please tell what to do to get expected behavior without manually puting setAlias($__zbx_item) on every zbx panel?

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants