How to enrich metric data using external sources?
Asked Answered
M

1

9

Example

I am getting a series for a metric with a label called store which contains the storeId. Now I would like to add another label storeName and fill it with external information (API-call/CSV/other Prometheus "metric"/merging from mysql/...). Is this possible? If so, in which ways?

Goal

To show the resulting metric in Grafana graph panels so that it contains names rather than IDs.

Malocclusion answered 14/8, 2018 at 7:43 Comment(2)
Did you find an answer to your question?Graniela
No. The only way I know to achieve this would be something like a decorator service between source and prometheus or between prometheus and grafana - depends on the goal..Malocclusion
T
1

Current versions of Grafana support interpretation of time series as tables. This way those can be join similarly to join of SQL.

In panel editor, under the query: Options > Type: Table. This should be done for both queries if you are joining Prometheus data with another Prometheus data.

Then Transform tab > Join by field: select common filed of your data.

There is a catch though: filed should have same name in both datasets, and only one field allowed for joining.

Toaster answered 15/4, 2023 at 7:10 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.