Vonage / Grafana_Status_panel

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

Support for boolean and null in thresholds #37

Open kbiernat opened 7 years ago

kbiernat commented 7 years ago

Hello, We have a case where we'd like to monitor boolean value from influx. Ideally, we'd like to have for example green status for boolean true, warning for boolean false, and probably critical for data missing. Currently Warning and Critical boxes don't support anything except [0-9,.+-]

tomer-amir-vonage commented 7 years ago

Hello @kbiernat, We are considering to add string thresholds which will change the color of the panel by string matching. Will that do?

We just added support recently for turning the panel gray when there is no data. will that also work for you?

melroy89 commented 6 years ago

@TomerAmirV @YehonatanVonage No string matching won't work in this case. Since a boolean is NOT a string (makes sense, it's not the same type). I tried to use your Status Panel Plugin, but I can't get it working :cry: ...

Here you can see my Influx query (on Telegraf S.M.A.R.T. disk healthy data). To go not in too much into details; you can see this query returns a boolean (false in this case). I would expect I can use a true/false value to switch between "OK" (=true) or "Critical" (=false):

status_panel_boolean

Again, in this case my query returns 'false'. Still The Status Panel plugin shows green background (OK), despite my string matching... :sos: (I guess, since again a boolean is not a string):

still_green_cirtual_false

What now? Also the built-in Grafana plugin (like Singlestat) can't handle booleans.. https://github.com/grafana/grafana/issues/8152

NOTE: It's even dangerous, since people could configure this setup without any user interface warning, thinking they configure it correctly. Where as the system can go bad (ico healthy flag becomes false --> DISK FAILURE), your plugin will report green/ok.

araisch commented 6 years ago

+1 With raising use of Grafana in IoT this will be more and more important. All the PLC send tons of booleans as status variables.