This question is regarding the object below, which can be seen in the Query Inspector.
"result": [
{
"metric": {
"environment": "myenv",
"instance": "172.1.1.1:8000",
"instance_id": "i-1234abcdef5678",
"job": "my-job-name",
"microservice": "microservice-name",
"pid": "12345"
},
"value": [
1582449029,
"1"
]
}
I am using a SingleStat panel to display the status of a running process.
I have labelled each metric with both the PID (process ID which is unique per process) and the instance ID. I am repeating the panel per PID but I would also like to include the instance ID in the panel title.
I would like to reference the instance_id label in the query object above, in the panel title, for example: {{instance_id}}. Is there a way to do this?
I’ve tried all sorts of templating combinations but I run into trouble trying to tie multiple templated labels together. I end up referencing an instance ID variable in my PID variable label_values query which causes problems when I try to select ‘All’ in the instance ID variable. What I want doesn’t seem like it should require a templated instance_id variable. The PID variable is for the templating, I simple want to display another label for each templated panel instance, in the title.
Is there any way to reference the metric object in the query object in my panel title, as opposed to creating a variable?
Thanks in advance.