[SOLVED] Repeating Singelstat with filecount

Hi all,
using Grafana 5.2.3 I am not able to get repeating Singlestats working.
I have a variable defined with folders, which I use in filecount-plugin (telegraf).
Displaying them individually is possible, but I have a lot of folders I want to display and it is too much work for generating a panel for each. So I tried using variable and “repeat” for each value of that variable.
Grafana now creates a panel for each folder, but I am not able to display the right value.
I tried selecting only values, where “directory ~= /^variableX/” - I don’t get a valid value. If I specify a directory in the directory tag it works. but not when I use the variable.

Any ideas?

regards,
andre

Your syntax is wrong, try:

directory =~ /^$variable$/

excuse, i made a typo here. the syntax is correct, i used grafana gui for chosing the values.
but nevertheless i

here is the code from query inspector:

{
“xhrStatus”: “complete”,
“request”: {
“method”: “GET”,
“url”: “http://xx.xxx.xxx.xxx:8086/query”,
“params”: {
“db”: “d3”,
“q”: “SELECT last(“count”) FROM “filecount” WHERE (“directory” =~ /^“X:\/ab\/defghijkl\/mnopqr\/stuvw\/xyz”$/) AND time >= now() - 1h GROUP BY time(30s) fill(null)”,
“epoch”: “ms”
},
“data”: null,
“precision”: “ms”
},
“response”: {
“results”: [
{
“statement_id”: 0
}
]
}
}

I don’t like a double quotes in your regexp:

/^“X:\/ab\/defghijkl\/mnopqr\/stuvw\/xyz”$/

Do you have double quotes saved in the directory tag values?

You may need advanced variable formatting for your use case: http://docs.grafana.org/reference/templating/#advanced-formatting-options

Tried it with changed variables and it works. I don’t need to use any quotes in variable definition!
thx a lot!
regards,
andre