- What Grafana version and what operating system are you using?
v10.1.1
-
What are you trying to achieve?
I am trying to convert the value of the following metric to a version string:
{pg_settings_server_version_num{container=~"postgres.*", postgres_partition=~"$tenant.*", cluster=~"$cluster"}
This returns150012
, which corresponds to version15.12
.
Data source is thanos. -
How are you trying to achieve it?
I tried to use a regex value mapping like this:
( \d\d)\d\d(\d\d)
=>$1.$2
-
What happened?
Nothing, it doesn’t work. I suspect because the value is an integer, not a number. -
What did you expect to happen?
I assumed, that grafana would automatically convert a value to string if the user applies a regex mapping. Otherwise the option should not be available. -
Did you receive any errors in the Grafana UI or in related logs?
Nope.