Aggregation rules consolidate the averaged values of many metrics into one, allowing for speedy graph rendering and visualization. Managing aggregation rules can be done easily with Hosted Graphite. Learn more about what our aggregation rules do, and how to use our Aggregation Feature here.
POST /v1/aggregates/
Request format:
{
"pattern": "string",
"output": "string"
}
Parameters:
Responses:
Curl Example:
curl -H "Content-Type: application/json" -X POST -d \
'{"pattern": "servers.*.requests.<response_code>", "output": "servers.all.requests.<response_code>"}' \
"https://YOUR-API-KEY@api.hostedgraphite.com/v1/aggregates/"
Creates an aggregation with the pattern: servers.*.requests.<response_code> and the output servers.all.requests.<response_code>. Metrics which look like servers.server-0001.requests.200 and servers.server-0002.requests.200 would appear in your account as aggregates.servers.all.requests.200. Metrics which look like servers.server-0001.requests.404 and servers.server-0002.requests.404 would appear in your account as aggregates.servers.all.requests.404.
GET /v1/aggregates/
Responses:
GET /v1/aggregates/<aggregation_id>/
Responses:
Curl Example:
curl "https://YOUR-API-KEY@api.hostedgraphite.com/v1/aggregates/<optional_id>/"
Lists your aggregations or individual aggregation if optional ID is passed.
DELETE /v1/aggregates/<aggregate_id>/
Responses:
Curl Example:
curl -X DELETE "https://YOUR-API-KEY@api.hostedgraphite.com/v1/aggregates/<aggregate_id>/"
Delete aggregation rule with passed id.
To edit an aggregation rule, you can do this through the Hosted Graphite UI. Additionally, aggregation rules have no state, so it is safe to delete and re-create them. Learn more about our Aggregate Rules Feature.