Combine two queries into one

Grafana v6.0.1 (0c44a04)

Hello and good evening!

I am currently trying to combine two queries into one where

Query 1: Shows the RAM USAGE for localhost:port
Query 2: Given label name of which localhost:port

and what I am trying to do is that I want to use the given label name that is in localhost:port in query 1.

This is what I have done now:

and what I want to do is that the localhost:8004 should be amazonse instead. So I wonder how I can combine it?

Bumping the thread :slight_smile:

Bumping again hopingbfor a hero!

Bumping again hoping for a hero!

It looks like you are using Prometheus, which I have zero experience with. You are also using a fairly old version of Grafana, so I would suggest you upgrade to the latest version.

Once you do, you will have the ability to do a variety of transformations. It sounds like one of the many transformations will do exactly what you want. From the docs:

Transformations process the result set of a query before it’s passed on for visualization. They allow you to rename fields, join separate time series together, do math across queries, and more. For users, with numerous dashboards or with a large volume of queries, the ability to reuse the query result from one panel in another panel can be a huge performance gain.

The transformations feature is accessible from the Transform tab of the Grafana panel editor.

Transformations sometimes result in data that cannot be graphed. When that happens, click the Table view toggle above the visualization to switch to a table view of the data. This can help you understand the final result of your transformations.

Ohhh I see! Interesting. Yeah im using Grafana 6.0 due to I am using HTML which did not work very well with Grafana 8. So I kept it on 6 as it worked as I wanted but it seems like I would need to either change to Grafana 8 or idk… :stuck_out_tongue_winking_eye: But thanks for the information!

This topic was automatically closed after 365 days. New replies are no longer allowed.