Open
Description
Hello
I got a json response like this : {"System":{"state":"GREEN","memory-usage":{"used":"28 %","total":"8192 MB"}}}
I am trying to extract the 'used' value. My config.xml looks like
modules:
default:
headers:
X-Dummy: My-Json-Test
metrics:
- name: memory_used
path: "{$.System.memory-usage}"
type: object
values:
used: "{.used}"
help: Memory used
when I load this into json_exporter I get a parse exception that the value cannot be parsed to float64, which makes sense, because it contains a '%'.
I tried several ways to get a substring from the used field but nothing was working.
Is there a way in json_exporter or jsonpath that I can substring a value?
Thanks a lot
Metadata
Metadata
Assignees
Labels
No labels