Hi all,
I usually don’t ask for help but now i got to a point of agony. i use a telegraf script to get via snmp 3rd party mibs and i get the CPU temperature as a string. I use value mapping with regex to extract the CPU temperature but i cannot seem to transform that string to a number so my gauge actually displays the usage. So i get an unusable gauge…see picture.
I need to allow all values to be displayed otherwise it doesn’t display anything, see:
and this is the value mapping I use:
Please help me out here.
Thank you in advance!
Cheers,
voroske
Did you try to do such number extraction / string parsing on Telegraf side using processors? Because it doesn’t look like a Grafana’s job to perform that…
Grafana can convert type from string to number using Convert field type transformation if that would be necessary:
But this transformation can’t be applied after Value mappings which are typically the final step
Hi @ebabeshko! Thank you for your reply. In the end a colleague helped me out and now we extract and convert the string to int inside the query which uses regex end strings modules.
this is the query:
censored the vendor…
And the gauge is working now