not sure this will work… it also relies heavily on Grafana transformations:
Get two separate values (with two different queries, you may need to use the manual editor)
1.1 Query to get amount of false values SELECT count ("reachable") AS "Offline" FROM "hostalive" WHERE "reachable" = 0 AND {....}
1.2 Query to get amount of true values SELECT count("reachable") AS "Online" FROM "hostalive" WHERE "reachable" = 1 AND {....}
Apply the merge Transform to obtain one single series (teh timestamp must coincide, is the “join” key
use the add column from calculation transform (multiple times)
3.1 Calculate the total of the interval (Online + Offline)
3.2 Calculate the two percentages
Plot the values
Note that if you are creating a pie chart or KPI there is no need to group by time, as there is no time axis… just ensure the “time” column of both queries has the same value so the merge can work, without time grouping it should be the 0 date (1970-01-01 …)
hello if we the counting false value, no satisfied situation, we get "no result " in grafana, normally we should get “0” in this case, we can not show the percentage as your method, do you know how to solve this, really appreciated.