Reputation: 2255
I have influx db with a float number. when I sum an influx db query, i want to return the text as described below. Here's the query I have written:
SELECT sum("pressure") FROM "press1"
If the return value is above 50, display the word "press on". If its below display "press off"?
I cant see a way to return the text value
We are also using grafana so there may be a option in there too. The plugin we're using is imageit.
Thanks
Upvotes: 0
Views: 613
Reputation: 28676
No, InfluxDB can't return text value based on the numeric value. But you can do that in the Grafana. Some panels offer value mappings, where you can map range to text.
For example Singlestat Math
panel:
Upvotes: 2