Parsing JSON string data as a numeric value

I think either I’m uber confused, through my efforts, or this simply isn’t possible yet, however;

There is a service that I wish to monitor, whose only data source that I can realistically monitor is an HTTP endpoint that returns a text response like so:

....this then carries on for many, many fields..

The config I started with looks like this:

  interval = "1m"
  urls = [""]
  data_format = "json"

So far so good. However, I don’t want all the fields, so I’ve narrowed them down…

fieldpass = ["", ""]

That’s ok, but now I want them named differently…

    order = 1
      field = ""
          dest = "bunnies"

      field = ""
          dest = "flowers"

That should be ok, right?

The problem, however, is that the data-producing system has output all its values as strings. My approach then was to add the following:

json_string_fields = ["", ""]

…which seemed to then fix my issue of data not being stored. Data was being collected and I could see that it was being stored.

24 hours later, I decide to actually show it on Grafana. Oddly, none of the values actually “displayed”, but graphs are definitely visible, so I didn’t worry about it too much. Until I ran a math operation on a field. At that point, it refuses to doso… because the type is - of course - string…

So the question is…

How do I attempt to store these “string” values as numeric data in the first place? I hope I’ve overlooked the answer to this, but there doesn’t seem to be some basic parsing of string to a numeric type anywhere. I find that hard to believe, though?


You can follow up your rename processor with the converter processor, make sure to set order = 2 to enforce the correct ordering.