Strip string values to float

I have ‘systemFreeMem’ values stored in InfluxDB as a string “7858.8 MB”.
How can I conver that to float in order to graph data ?

It really is best to store numbers as numbers in influx, not as strings. That is what influx is for.
As for whether what you are looking for can be done, I don’t know. Unless it has been added recently to the influx query language then it cannot be done in the query. I don’t know whether it can be done in Grafana.

that string was a direct response from SNMP that I was scraping with telegraf.

  name = "systemTotalMem"
  oid = "NAS-MIB::systemTotalMem.0"

Not sure if I can do much during on this stage either. So Now I’m trying to find out how to clean it up.

You should convert it to a number before writing to influx.

To clean it up you could write a script to read all the existing data and write it to a new field as a number.