Use of templating variables in grafana with ntop datasource
simonemainardi opened this issue · 5 comments
Hi,
I've been triying to use variables to have templating dashboard to be able to visualize ntop graphs for different hosts, but i have notice that i can not use variables in the metrics when configuring the panel graph in grafana with ntop datasource.. so i would like to know if it is possible to use templating variables when using grafana with ntop datasource (create a different graph panel for each host will take me so much time).
Thanks.
Hi,
@simonemainardi i created this variable $ntophost
and then i want to use it in the graph to have the option to choose which host graph i want to see by putting the $ntophots variable in metrics but it doesnt work
Thanks.
Hi,
Is what pocho1987 trying to do possible?
Thanks.
regards,
Hi, Daniel from the Grafana team here.
For the dropdown, you have to allow custom text - the backend looks like it doing template variable substitution already. If custom text is not enabled, then the user is not able to write a template variable ($ntophots in this case) in to the input field.
You just need to add allow-custom="true"
to:
https://github.com/ntop/ntopng-grafana-datasource/blob/master/src/partials/query.editor.html#L13
Here is an example: https://github.com/grafana/azure-monitor-datasource/blob/master/src/partials/query.editor.html#L28
How exactly did you get all these hosts in one diagram?
I can't even see all hosts that are visible in ntopng let alone get all hosts into one diagram :/
Closing as plugin support has been discontinued in favour of https://grafana.com/docs/features/datasources/influxdb/. See the README https://github.com/ntop/ntopng-grafana-datasource.