I am using Grafana and Prometheus. How do we exclude N/A or None from the list of values of a variable? The data will be something like
N/A
ABC-100
XYZ-200
123ABC
None
456-DGZ
I need just need to display all values other than N/A
and None
i.e. display only
ABC-100
XYZ-200
123ABC
I looked at Regexp & Grafana: exclusions and string cut
I tried ^(?!N\/A).*
enter image description here
It did not work.
This situation can be approached from two directions:
my_label
from metric my_metric
, you can use querymy_metric{my_label!="N/A", my_label!="None"}
Demo of similar query here.
/^(?!None$|N\/A$).+/
will filter out values None
and N/A
leaving all others as is.