Can query use data from another query?

Hello everyone, I am a newbie in Grafana and just started to use and learn Grafana. The following are the problems I encountered. I hoping to get some point or advice.

  • What Grafana version and what operating system are you using?
    I’m running Grafana on Docker, and Grafana’s version is 10.3.3.

  • What are you trying to achieve?
    I have several data save in Redis. The keys on Redis are like Process:01, Process:02, … These keys contain a JSON structured string, like: {"Info": "Some Process Info", "Start": "2024-03-04 01:00:00", "End": "2024-03-04 02:00:00"}.
    At the same time, I also have some data save in InfluxDB, such as the counter or power consumption to each process.
    I want to calculate the change in InfluxDB’s data for each process, such as how much the counter has increased.
    Then, through panel repeat function, display the detailed information and counter changes of each process in tables or charts.

  • How are you trying to achieve it?

  1. Set a ProcessKey in dashboard variables. It will execute KEYS Process:* in Redis to obtain all need keys.
  2. Create a panel. This panel will execute Redis GET based on ProcessKey for the detailed information of each process. And display information by table.
  3. Let this panel repeat based on ProcessKey
  4. [Stuck here] In the same panel, I hope to set the InfluxDB query based on Start and End in Redis Process:01 data and repeat on 02, 03 …

Part of IndluxDB query for example:

from(bucket: "myBucket")
  |> range(start: Process:01.Info.Start, stop: Process:01.Info.End)
  • What did you expect to happen?
    In my expectation, I want to be able to display one or more tables (best in one table and several rows).
    This table will display the data of all Processes in Redis, and use the start and end times saved in Redis, to get the data of the corresponding time range from InfluxDB and calculate it. After the calculation is completed, it will be merged into the same table and displayed together.

So the influx has process list and time ranges?

In my environment, InfluxDB save prodcess id as InfluxDB measurement, data label (like counter and powerConsumption) as InfluxDB tag, and no time range in InfluxDB.
So I am expecting to get Start and End time from Redis Process:[id] data and use it for IndluxDB query.

Please post sample data of each

Csv for influx

Json for elastic




Key: Process:01

  "Info": "Some Process Info",
  "Start": "2024-03-05 01:30:00",
  "End": "2024-03-05 01:40:00"

Expect Table

Process ID Info Start End Counter
01 Some Process Info 2024-03-05 01:30:00 2024-03-05 01:40:00 4
1 Like