Grafana version: 7.2
I am trying to build a dashboard for a bunch of apis giving response time , success rate , no of hits …
The datasource for this dashboard would be elasticsearch.
The only way to differentiate apis would be through a field called as “request” in the logs which gives me the request endpoint.
I am going to have the same set of 7 panels for each api endpoint , so i wanted to have a variable which gives me the endpoints and then i can repeat the panels.
I faced some issues while setting up these variables because they vary a lot .
For eg : some apis are in this format
/name1/name2/id?query params
For this i just used a regex filter to get just /name1/name2/ and then in the query i used $api*
But there are some apis which has a variable id in the middle , for eg
/name1/id/name2?queryparams
I am not sure how i could use a regex to get a generic endpoint and then how i could use that in a query?
One option that would be easy is to a variable which is a regex
For eg : the variable should store values like
/name1/ /name2
/name1/name2/
And then i use this variable which substitutes to a regex in the query , i tried this with custom variables but it didnt work out , is this even possible?? Let me know if you guys can think of any other way of achieving this