Using Value Mappings to Change String Value fails

  • What Grafana version and what operating system are you using?
    V10.4.0

  • What are you trying to achieve?
    Create a dashboard that displays colored success or failure messages based on logs ingested by Loki.

  • How are you trying to achieve it?
    The logs have specific begin, Success, And Failure lines in them. I query for those and then have a line Field that show the line.

  • What happened?
    When I attempt to use Value Mappings to Change the value for the Line Field, it doesn’t work. Regex or Exact Value. Neither change it. I’ve displayed it as a Stat and as a Table. The text stays as the original value the query brought in.

  • What did you expect to happen?
    The value would change from what the query brought in, to what I put in replace.

  • Can you copy/paste the configuration(s) that you are having problems with?

  • Did you receive any errors in the Grafana UI or in related logs? If so, please tell us exactly what they were. None.

  • Did you follow any online instructions? If so, what is the URL? Just what was in the Grafana Documentation.

can you try a convert filed type transform to convert the field to a string, then the value mappings should work

Already did. The value is actually already a string going from the type icon, but I tried converting it anyway.

Nevermind. I got it. Seems there was a carriage return sneaking in from the query I didn’t see. Worked once I tweak the Regex. Thanks for helping!