Overrides + Value Mappings --> RegEx not working

  • What Grafana version and what operating system are you using?
    Grafana v8.2.1 (88622d7f09) on Windows.

  • What are you trying to achieve?
    I am trying to colour a whole column in a table.

  • How are you trying to achieve it?
    Overrides + Fields with name + Value mappings + RegEx
    grafik
    .

  • What happened?
    Nothing, when using “RegEx condition”. No matter what I type in the RegEx field it doesn’t match anything! It doesn’t even match wildcards.
    When doing the same with “Range condition” it is working., but I need RegEx for the next columns.

  • What did you expect to happen?
    That RegEx to be working fine also.

  • Did you receive any errors in the Grafana UI or in related logs?
    No.

Hi,

you can check this:

This helps me out to get my goal…

Regards,
Fadjar Tandabawana

Thank you for the reply, but this is also not working.
It seems that RegEx in Overrides is broken.

Hi,

Try add this in the regex value:

^.*([0-9]).*

then in the Display text just put:


 $1

Regards,
Fadjar Tandabawana

Not working. When using Range condition it works immediately.

I just tested it with a row than only contains letters and no numbers.
RegEx is working there fine.

I think it has something to do with the type of the cell(s)?

EDIT:
The strange thing is that it matches words and letters while using RegEx “[0-9]”!?!?
Why? That doesn’t make any sense at all.

I’m using 7.5.6, and had zero joy using regex to override variables to use y-axis 2. I gave up, I was unclear if it was regex or flaws with the override itself.

So it is not just me?
There is something wrong with RegEx in overrides…

@michaelfilgate to clarify, hopefully, the new regex-based value-mapping feature mentioned above was added 8.2:

Perhaps a bit late to the party, I was having the same issues in Grafana v8.3.6. Ranges were working normally but I was unable to get any responses from the regex value mapping.

Converting the column from numeric values to string solved it for me!

Hello there.

I just converted the cell to string type, and added a override to match any number bigger than 0 in Grafana. Like this:

  1. Convert to string
    image

  2. RegEx to match bigger than 0:
    image

But the RegEx is not working for me…

I’m having the same problem.