You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
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
The text was updated successfully, but these errors were encountered:
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
The text was updated successfully, but these errors were encountered: