I am trying to perform a multistage query in Grafana. The queries are HTTP GET requests. In my first request, I get an output in JSON format, I want each element of this output to form a new GET request and get the results.
I am using the Infinity plugin to perform HTTP GET requests.
Here are example requests/queries.
Output -
{
"test": [
"consumer-ec2-1"
],
"test1": [
"consumer-ec2-1"
]
}
The second-level queries I want to perform should look like this using the above output.
https://api.dev.sample.com/monitoring/v1/kafka/consumerGroupClientMetrics?
consumerGroup=$variable-1&topic=test -u username:password
https://api.dev.sample.com/monitoring/v1/kafka/consumerGroupClientMetrics?
consumerGroup=$variable-1&topic=test1 -u username:password
Here, the last parameters for both queries topic=test and topic=test1 are taken from the output of the first query. The number of second-level queries I want to perform depends on the number of elements in the first query. There can be 100s of such elements, each will form a distinct second-level query.
I will then render the output data in a table for all such queries.
Is this possible? If so how?
Thanks.