Metrics API

Contents

Locate Metrics

GET GET /api/v1/metric/search?

Path Parameters

NameTypeDescription

pattern*

[required] metric pattern to search for

only_updated_after

String

To limit search results for metrics that only received data points in the last n hours

only_updated_before

String

To limit search results for metrics that have not received data points in the last n month

with_times

String

To return the first (“created_at”) and last (“last_updated”) seen timestamp for that metric

page

String

Return the nth page of results, for searches that return more than the maximum page size (default maximum size: 100)

Curl examples:

curl -X GET "https://YOUR-API-KEY-HERE@api.hostedgraphite.com/api/v1/metric/search?pattern=foo.bar.*"

Search for metrics that match the pattern foo.bar.*

curl -X GET "https://YOUR-API-KEY-HERE@api.hostedgraphite.com/api/v1/metric/search?pattern=*&only_updated_before=30d"

Search for all (*) metrics that have not received data for 30d

Response format for: &with_times=true:

HTTP/1.1 200
Content-Type: application/json

{
  "results": ["foo.bar.1", "foo.bar.2"],
  "metrics_matched": 2,
  "total_metrics": 12345,
  "times": {
    "foo.bar.1": {
      "created_at": 1234567890,
      "last_updated": 1234567890
    },
    "foo.bar.2": {
      "created_at": 1234567890,
      "last_updated": 1234567890
    }
  }
}

Locate Busy Metrics

GET /api/v1/metric/busy

Curl Example:

curl -X GET "https://YOUR-API-KEY-HERE@api.hostedgraphite.com/api/v1/metric/busy"

Locate Invalid Metrics

GET /api/v1/metric/invalid

Curl example:

curl -X GET "https://YOUR-API-KEY-HERE@api.hostedgraphite.com/api/v1/metric/invalid"

Delete Metrics

POST /api/v1/metric/delete

Curl example:

curl -d "pattern=foo.bar.*" "https://YOUR-API-KEY-HERE@api.hostedgraphite.com/api/v1/metric/delete/"

Delete all metrics that match the pattern foo.bar.*.

Last updated