-
Notifications
You must be signed in to change notification settings - Fork 16
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
Extract all unique Prometheus label names referenced on a given dashboard or all Grafana objects #67
Comments
Dear Alain, thanks for writing in. Let's see what we can do here.
I understand the part "using a Prometheus datasource", which is usually referring to "dashboard" entities, right? What do you mean with "unique label names which are reference across all graphs"? Are you just aiming to discover all panels which use a Prometheus datasource? You can find this snippet within the example invocations listed by
With kind regards, |
Dear Alain, did you have a chance to evaluate my suggestion, and if that would help you already? With kind regards, |
Dear Alain,
I understand now that you are probably referring to labels stored in Prometheus, right? With grafana-toolbox/grafana-client#20, and recent progress in this area through grafana-toolbox/grafana-client#112, grafana-client gains possibilities to inquire the databases linked into Grafana on behalf of datasource items. In this spirit, Would that fit your needs somehow, or can you elaborate what you would like this program to do, beyond what With kind regards, |
Iteration +1We collected a few Grafana Prometheus query expression samples from dashboards at https://play.grafana.org/, and from Prometheus instances run by friends, in order to learn about that the For extracting the label names from a PromQL query expression, we have been successful using the promql-parser package. Iteration +2For inquiring Prometheus about existing label-names and -values, in order to match them against the labels used in Grafana, we discovered corresponding HTTP API endpoints. ThoughtsA corresponding feature of /cc @WalBeh |
Hi was wondering if there's any where we can use this tool to return the list of unique label names which are reference across all graphs which are using a Prometheus datasource? I have a scenario where I'd like to test the possibly far reaching effects of dropping all labels except those matching a given regex and was hoping I could first get the complete list of labels names referenced across all my grafana objects. If this isn't available at this time, is that something that could potentially be added to the functionality?
The text was updated successfully, but these errors were encountered: