How to store whole JSON object (detailed data) into Prometheus Timeseries database

AS per studying Prometheus database, we can store numeric value against time series. My requirement is "I wants to store whole JSON object w.r.t Timeseries and while plot the graph I can get one of the dimension from JSON object and plot against time.

Can you please help how to achieve this.

2 answers

  • answered 2018-05-16 06:48 Yunlong

    You can't store the JSON object in prometheus. But you can try covert your JSON Object to Prometheus metrics.

    <metric name>{<label name>=<label value>, ...}
    

    https://prometheus.io/docs/concepts/data_model/

  • answered 2018-05-16 10:28 Yarix

    As already mentioned, you can't store the JSON in prometheus. I don't recommend to convert the JSON to labels since you may end up with lots of time series rows in the DB. each unique combination of labels is a new series.