0
votes

I am new to prometheus and a little confused as to how I might be able to get the following metrics inserted into prometheus so I might be able to display them to grafana. The idea is to poll every a rest api from a service I have that returns info every 5 minutes.

The result of the post request looks like the following:

{
  "items" : [ {
    "name" : "1VLj4-XPRRqbl3sXyv6d9w",
    "earliestTimestamp" : 1612796264194,
    "cursor" : {
      "@class" : ".IngestionOffsetCursor",
      "ingestionTime" : 1613401054408,
      "offset" : 1
    },
    "metrics" : {
      "http2xx.sum" : [ [ 1613401060000, 211716.0 ] ],
      "http4xx.sum" : [ [ 1613401060000, 45.0 ] ],
      "http5xx.sum" : [ [ 1613401060000, 6.0 ] ]
    }
  } ],
  "canLoadMore" : false,
  "totalHits" : 1,
  "totalRepresentedItemCount" : 1
}

Could someone point me in the right direction as to how I might go about this.

1

1 Answers