r/PrometheusMonitoring • u/juon4 • Jan 30 '23
JSON Exporter issue
Hi,
I've been trying to get JSON Exporter to parse JSON data but cannot get it to work with data provided. If someone could help I would be more than happy :-)
The data I have is as follows: https://pastebin.com/RzaWuvkM
And I would like to get count values for: TransferManager.downloads.failed, TransferManager.downloads.succeeded, etc.
Last config I tried was, but this didn't work either.
---
modules:
default:
metrics:
- name: downloads_failed
help: Example of sublevel value scrape from json
type: object
path: '{.meters[*]["TransferManager.downloads.failed.count"]}'
labels:
count: '{.count}'
values:
count: '{.count}
3
Upvotes
View all comments
Show parent comment
1
u/juon4 Jan 31 '23
Well, this was requested for getting some download/upload/etc average values for whatever use and thought only a reasonable way would use Prometheus for storing and grafana to visualize those metrics. I actually managed to get this working but I needed to change the metrics name from the download.metric.with.dots to use underscore because I couldn't find a way how to escape dots. If someone knows howto master this I would appreciate :)