How to add instance from another job

Grafana v6.0.1 (0c44a04)

Hello people!

Im currently trying to figure out how I can combine two queries into one. I have currently done something like this:

I have created a variable called $args and that has a value called prometheus_port which returns e.g. localhost:8006 - With that value I want to use localhost:8006 inside the instance (process_resident_memory_bytes{job="node", instance="USE prometheus_port value in here"} ) without needing to manually enter in that.

Is that possible to do?

So basically that would be the same as doing

process_resident_memory_bytes{job=“node”, instance=“prometheus_port from scraper_script_name_total{store=”$args"}"}

Is that possible with Grafana?

It sounds like you want to use chained variables. Here are some useful starting points and example dashboards in our public sandbox. I would note that version 6.0.1 is seriously old, and if your Grafana instance is brand new, I would highly recommend upgrading to the other side of version 8.0, which included huge improvements and a few breaking changes :+1: