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

Support for regex groups in data source variables #76910

Open
gtirloni opened this issue Oct 20, 2023 · 0 comments
Open

Support for regex groups in data source variables #76910

gtirloni opened this issue Oct 20, 2023 · 0 comments

Comments

@gtirloni
Copy link

Why is this needed:

Our data sources are named "env1 Prometheus", "env2 Prometheus", "envN Prometheus" because we also have "env1 Loki", "env2 Loki", etc and the data source cannot have the same name, even if they are of different types.

In our dashboards, we have a environment data source variable that selects all data sources of a given type.

The variable shows these suffixes that are not really part of the environment name. We would like to show only the proper environment name to reduce user confusion (e.g. "env1" instead of "env1 Prometheus"). Some users are very non-technical and get confused with names like data sources, Prometheus, Loki, etc.

What would you like to be added:

By supporting regular expression groups, it would be possible to display the extracted values.

There needs to be a way to template the display value while still retaining the actual value, so the correct data source is used.

This is similar to #1032 but not quite.

Who is this feature for?

Grafana administrators and dashboard editors.

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

1 participant