Vonage / Grafana_Status_panel

A panel plugin for Grafana to monitor multiple parameters at once
Other
178 stars 108 forks source link

Template doesn't work #78

Open rangsan opened 6 years ago

rangsan commented 6 years ago

The metric is not shown when using template in query. I forced to show the data but still didn't work. But when I query the server straight from the query everything work fine.

Graphite v. 0.9 Grafana v. 4.5 Status panel v. 1.05

YehonatanVonage commented 6 years ago

Hi @rangsan, Can you provide more details about the problem?

invin12 commented 6 years ago

If I use template variable in metric like this A vbox $host gauge-zk_service_health nothing show

If I change to real host A vbox server1 gauge-zk_service_health everything works ok

Does the Status Panel plugin supports template variables?

YehonatanVonage commented 6 years ago

Hi @invin12,

  1. Where exactly you try to use the template? In the metric tab / in the options tab? At what field?
  2. What data source are you using to fetch your data?
milkfinch commented 6 years ago

Same issue is happening here. Grafana version: 5.2.1 Plugin version: 1.0.8

Steps to produce the error:

  1. Create variable for a parameter (TARGET)
  2. Use this in "General" tab under "Repeat"
  3. Under "Metric" tab select timeserie and the value is "$TARGET"
  4. Select one of the targets in the drop-down-list on the top of the dashboard
  5. Inspector tab shows that I have 5.1. response:Array[1] 0:Object datapoints: Array[1] 0:Array[2,1533044934768] target:"bad_check"
  6. No value is displayed on the panel
  7. Put the same target under "Metric" tab inside the query (change the $TARGET variable or chose one of the available targets)
  8. In inspector I got the result: response:Array[1] 0:Object datapoints:Array[1] 0:Array[2,1533045129224] target:"bad_check" (the same result!!!)
  9. Panel is displaying the correct value

The strange thing that I have the target on the panel but no the values when I use template variable to query. Only the values are not displayed.

milkfinch commented 6 years ago

Update:

It seams that you don't use the template variable when you calculate the result. When I use mock the response the below doesn't work [ { "datapoints": [ [2, 1533045787533] ], "target": "bad_check" } ]

But this works [ { "datapoints": [ [2, 1533045787533] ], "target": "$TARGET" } ]

So I think you use the target which is in the result, but you should use the template variable "$VAR" instead if it is specified.