neuralfraud / grafana-prtg

A PRTG Datasource plugin for Grafana
179 stars 75 forks source link

Alias instead of channel name? #117

Open nickf84 opened 5 years ago

nickf84 commented 5 years ago

In older versions of Grafana I was able to set an alias which would override the channel name displayed on the graph in Grafana.

Like this for example: "targets": [ { "alias": "Equinix: Traffic In", "channel": { "name": "Traffic In",

In this case "Equinix: Traffic In" would display in Grafana instead of "Traffic In"

With all newer versions this no longer works. The JSON is accepted but still only the channel name displays on the graph. It would not be practical or make sense for me to change all of the channel names in PRTG.

I'm currently running Grafana 4.3.2 with PRTG plugin 3.1.0. I've been testing every once in a while with new Graphana/PRTG pluin versions and am always having this issue. Today I tested with Grafana 5.2.4 and PRTG plugin version 4.0.3. Not sure if this is now a limitation with Grafana or if it's something with the PRTG plugin.

Thanks in advance for your help!

Yakelixir commented 5 years ago

You could import a value into a variable and then assign that to wherever you need. This would be less flexible if you are repeating tables on variable values. Also the use of sensor factories for reassignment would be a thought up stream in PRTG. Last idea, much more work needed, would be changes to the plugins to allow a user to specify changes to keys.

neuralfraud commented 4 years ago

Aliases are dynamically generated depending on the options you selected in the query. Thus if something changes in PRTG, the alias reflects that change.