- What Grafana version and what operating system are you using?
Grafana 9.3.1, open source, Linux OS unknown version (not an admin there).
- What are you trying to achieve?
Due to scale issues, the VictoriaMetrics database is only keeping one label of interest, basically an asset ID, along with the metrics collected (there are a few more labels, but none that matter here). Everything else (product type, account information, …) is now kept in a separate Postgres database. Idea being, if we have the asset ID, we can look that asset ID up in Postgres to determine its product type, account information, etc. So far so good. But because this information isn’t a label any more, things like count (by label) don’t work. So I was hoping to get the values from the VictoriaMetrics query, take the asset label from that query and then do counts on the other fields now in Postgres (product type, account, …), and graph those counts (or sums, or…). Applies to any metric.
- How are you trying to achieve it?
Was hoping this would be obvious from a mixed panel configuration, with query A being Prometheus to get the metric data along with asset label and query B being Postgres to do the other lookups, act on (count, sum, …) those other lookups, and graph those results.
Something like:
Query A/VictoriaMetrics:
(metric){}[24h])
to return a list of results with the ‘asset ID’ label.
Query B/Postgres:
select name from table where asset_id in [query A results]
or do counts, etc. But I’m still trying to figure out how to specify the query A results in the query B syntax.
- What happened?
Nothing yet, not seeing how to have mixed queries from different data sources interact with each other.
- What did you expect to happen?
A nice easy UI to just click here and there and have it make sense?
- Can you copy/paste the configuration(s) that you are having problems with?
No.
- Did you receive any errors in the Grafana UI or in related logs? If so, please tell us exactly what they were.
No errors, trying to figure out how to make this work still.
- Did you follow any online instructions? If so, what is the URL?
Looked at related questions here. Not sure how URL variables will help, doesn’t look like the Merge transform will work either.