I’m trying to create a simple visualization that displays either the word “Success” or “Failure”. I’m using value mappings in a stat panel. When the value is 0, it properly displays the text “Success”. For the 2nd mapping, I would like “not equal zero” to catch any other value and display text “Failure”. Instead, displays the numeric value.
I’m likely missing something obvious. Any/all help is appreciated.
Peace.
What Grafana version and what operating system are you using?
Version 11.4.0
Ubuntu 22.04
What are you trying to achieve?
A a “stat” visualization with value-mapping where:
Value 0 Success
Value !=0 Failure
How are you trying to achieve it?
I have tried value mappings of:
Value !=0
Regex [^0]+
Regex *
What happened?
It displays the number of the value, not the display text setting of “Failure”. My mapping for “Value = 0” does display the text “Success”.
What did you expect to happen?
Display either the text “Success” or “Failure”
Can you copy/paste the configuration(s) that you are having problems with?
See photos above
I saw “range”, and that could work absent the real logic I’m hoping for. “From 1 to infinity” is not the same as “not equal zero”. What if the value ends up being nonsense? Or non-numeric garbage?
It is also possible that I’m an old BOFH, and should just let this go