-
What Grafana version and what operating system are you using?
Grafana v11.1.0-69950 (a4bb4c8400) -
What are you trying to achieve?
I have a graphite time series data like this:
device=DEVICENAME1;chamber=10;customer=ABC
device=DEVICENAME1;chamber=20;customer=DEF
and a postgres data source like this:
SELECT
name AS device,
temp_max_celsius AS max_temp_c
FROM
device_specs
I want to do this:
- Get the max value for the given time range on a visualization from the graphite data source, join that table with the postgres results when
name
from postgres matchesdevice
from the graphite datasource. If no value for a given device name is in the postgres database, then I don’t need to worry about it and can leave blank or ignore. - If the max value from the time series is greater than the max_temp_c from the postgres datasource for a given device, do an alert.
-
How are you trying to achieve it?
I tried making a panel with these 2 datasources queries, then using transforms. I tried toreduce
the timeseries tomax
but cannot get it tojoin
ormerge
with the postgres data. -
What happened?
The timeseries data and postgres data end up both getting the reduce transformation, even though I filter the query to the timeseries data (I confirm in the JSON that if I select the postgres datasource query, it does only use that. If I select the other graphite datasource query, it removes the filter entirely, weird), and the rows and columns do not match up at all. join and merge transformations do not have intended effect. -
What did you expect to happen?
I expect to reduce the timeseries data to a table basically with columns device, chamber, customer, and max_value. I expect to be able to then join this data with the postgres datasource on the device/name field, which will add a max_temp_c column. After that I think I could configure an alarm if max_value is greater than the corresponding max_temp_c. -
Can you copy/paste the configuration(s) that you are having problems with?
-
Did you receive any errors in the Grafana UI or in related logs? If so, please tell us exactly what they were.
-
Did you follow any online instructions? If so, what is the URL?