You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 30, 2021. It is now read-only.
Hi,
I am not sure it is an issue or if the system is working as intended so take it as is.
I installed grafana /kairos/cassandra on different nodes. Played with it and so far so good; except for a small issue.
I am reporting metrics through collectd and added a template variable called host which I expected would help me filter my dashboard by host. Basically doing that in grafana :
$host tag_values(collectd.cpu.percent.active.value,host)
After I added this, the dashboard displayed a nice dropdown to help me select my hosts.
Now, coming to the graph itself, I expected to be able to specify this :
Metric collectd.cpu.percent.active.value
Tags host = ["$host"]
Group By tags: host
and it did not work as tracking down the plugin js I noticed that grafana is sending an array with only one index containing all expanded values.
Let's say I have 3 hosts, h1,h2,h3
it ended up with passing query.tags['host'][0]="{h1,h2,h3}" (datasource.js:340) which kairos could not evaluate. It should pass query.tags['host'][0]="h1",query.tags['host'][1]="h2"...
I just dirty patched it to make it work as I expected and now can select my hosts from the dropdown and get the selection working :
In my opinion returning an object or array should be supported by Grafana's templateSrv, not the plugins itself. I've created a feature request in Grafana repository (grafana/grafana#5532)
Hi,
I am not sure it is an issue or if the system is working as intended so take it as is.
I installed grafana /kairos/cassandra on different nodes. Played with it and so far so good; except for a small issue.
I am reporting metrics through collectd and added a template variable called host which I expected would help me filter my dashboard by host. Basically doing that in grafana :
$host tag_values(collectd.cpu.percent.active.value,host)
After I added this, the dashboard displayed a nice dropdown to help me select my hosts.
Now, coming to the graph itself, I expected to be able to specify this :
Metric collectd.cpu.percent.active.value
Tags host = ["$host"]
Group By tags: host
and it did not work as tracking down the plugin js I noticed that grafana is sending an array with only one index containing all expanded values.
Let's say I have 3 hosts, h1,h2,h3
it ended up with passing query.tags['host'][0]="{h1,h2,h3}" (datasource.js:340) which kairos could not evaluate. It should pass query.tags['host'][0]="h1",query.tags['host'][1]="h2"...
I just dirty patched it to make it work as I expected and now can select my hosts from the dropdown and get the selection working :
datasource.js:337
The text was updated successfully, but these errors were encountered: