Prom Render API

The Prom Render API is a powerful way to query your prometheus metric data saved in Hosted Graphite. With the Prom Render API you can view raw metric data.

Making Queries

  • Query

Prometheus expression query string.

  • Start/End

Start/end timestamp.

  • Step

Query resolution step width in duration format or float number of seconds. For example, 5m refers to a duration of 5 minutes.

  • Timeout

Evaluation timeout in a duration format (optional).

Examples

Curl Example:

curl -X GET "https://<YOUR_API_KEY>@api.hostedgraphite.com/v2/prometheus/query/query_range?query=scrape_samples_scraped&start=1608275850&end=1608286650&step=30&timeout=1m"

Response:

{
   "status" : "success",
   "data" : {
      "resultType" : "matrix",
      "result" : [
         {
            "metric": {
                "__name__": "scrape_samples_scraped",
                "endpoint": "9402",
                "instance": "10.0.178.71:9402",
                "job": "cert-manager",
                "namespace": "cert-manager",
                "pod": "cert-manager-68d986f65c-lzkd2",
                "prometheus": "cattle-prometheus/cluster-monitoring",
                "prometheus_from": "ara-prod-euw2",
                "prometheus_replica": "prometheus-cluster-monitoring-0",
                "service": "cert-manager"
            },
            "values" : [
                [ 1435781430.781, "1" ],
                [ 1435781445.781, "1" ],
                [ 1435781460.781, "1" ]
            ]
         },
      ]
   }
}
  • 200: Success
  • 400: Bad request
  • 403: Forbidden