Metrics API
Contents
Locate Metrics
GET
GET /api/v1/metric/search?
Path Parameters
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)
HTTP/1.1 200
Content-Type: application/json
{
"results": [
"foo.bar.1",
"foo.bar.2"
],
"metrics_matched": 2,
"total_metrics": 12345,
"next_page": 2
}
Curl examples:
curl -X GET "https://[email protected]/api/v1/metric/search?pattern=foo.bar.*"
Search for metrics that match the pattern foo.bar.*
curl -X GET "https://[email protected]/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
HTTP/1.1 200
Content-Type: application/json
{
"metric": "busy-metric.1",
"pct_ratelimited": 60
}
Curl Example:
curl -X GET "https://[email protected]/api/v1/metric/busy"
Locate Invalid Metrics
GET
/api/v1/metric/invalid
HTTP/1.1 200
Content-Type: application/json
{
"metric": "busy-metric.1",
"pct_ratelimited": 60
}
Curl example:
curl -X GET "https://[email protected]/api/v1/metric/invalid"
Delete Metrics
POST
/api/v1/metric/delete
OK
Curl example:
curl -d "pattern=foo.bar.*" "https://[email protected]/api/v1/metric/delete/"
Delete all metrics that match the pattern foo.bar.*
.
Last updated
Was this helpful?