Hosted Graphite Docs
Get StartedBook a Demo
  • Welcome to Hosted Graphite
  • Getting Started
  • HG-CLI
  • Sending Metrics
    • Supported Protocols
    • Graphite Tag Support
    • Metric Management
    • Metric APIs
  • Language Guide
    • Metric Libraries
    • .NET
    • Go
    • Java
    • Javascript
    • Node.js
    • PHP
    • Postman
    • Python 2.x
    • Python 3.x
    • Python Pickle
    • Ruby
    • Shell
    • TypeScript
  • Dashboard and Graphs
    • Primary Dashboards
    • Dashboard Library
    • Local Dashboard Integration
    • Worldmap Panel
    • Graphite Dashboard Guide
    • Graphite Graph Menu Reference
    • Other Dashboard Options
  • Alerting Guide
    • Alerting Overview
    • Alerts API
    • Notification Channels API
    • Scheduled Mutes API
    • Using Your Own Alerting
  • Agents Guide
    • The Hosted Graphite Agent
      • Base Metrics
      • System Layout
    • Telegraf
    • K8 Telegraf Daemon
    • OpenTelemetry
    • collectd Agent
    • StatsD Agent
    • Diamond
  • Add-Ons and Integrations Guide
    • AWS CloudWatch
    • Azure Monitor Metrics
    • GCP Metrics
    • Carbon-C-Relay
    • Circle CI
    • Cloudbees
    • Collectd Add Ons
    • GitHub
    • GitLab
    • Heroku
    • Hosted StatsD
    • New Relic
    • Papertrail
    • Pingdom
    • Sentry
    • Sitespeed
    • StatsD Add-on
    • Statuspage
  • Account Management
    • Access Keys
    • Account Diagnostics
    • Account Settings
    • Team Access: Limited Access Groups
    • SAML Authentication
    • Team Access
  • Additional Features
    • Aggregation Rules
    • Data Views
  • API Guides
    • Metrics API
    • Tag API
    • Graphite Render API
    • Render Variables API
    • Dashboard API
    • Annotations and Events API
    • Aggregation Rules API
    • Alerts APIs
  • FAQ
    • General
    • Business
    • Technical
    • Account Metrics and Limiting
    • Customization
    • Troubleshooting
    • Support
    • Changelog
Powered by GitBook
On this page
  • Creating Aggregation Rules
  • Listing Aggregations
  • List Aggregation Rules by ID
  • Deleting Aggregates
  • Editing Your Aggregations

Was this helpful?

  1. API Guides

Aggregation Rules API

PreviousAnnotations and Events APINextAlerts APIs

Last updated 4 months ago

Was this helpful?

Contents

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 .

POST /v1/aggregates/

Path Parameters

Name
Type
Description

pattern*

String

Regex or node pattern to match ingested metrics to.

output*

String

Metric output, when a metric is matched with the pattern, those metrics will be mapped to this output and appear in your account.

OK

(The aggregation rule was created successfully. Returns created aggregation’s ID)

Bad Request Creation failed. Pattern or output is an invalid input (or not provided). Or the aggregation rule creation failed because the pattern is too computationally expensive to match against your metric names.

Forbidden Creation failed, you have reached the limit for your account

Conflict Creation failed, aggregation with this pattern & output already exists.

Internal Server Error Creation failed due to a server error - this shouldn’t happen.

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>.

For example, metrics that 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

OK List of your aggregation rules.

GET /v1/aggregates/<aggregation_id>/

Lists your aggregations or individual aggregation if the optional ID is passed.

OK

Aggregation with passed ID if it exists, empty list otherwise.

Curl Example:

curl "https://YOUR-API-KEY@api.hostedgraphite.com/v1/aggregates/<aggregation_id>/"

DELETE /v1/aggregates/<aggregate_id>/

Delete aggregation rule with passed ID

OK Aggregation was successfully deleted.

Bad Request No aggregation ID passed.

Precondition Failed Aggregation with passed ID does not exist.

Internal Server Error Delete failed, please try again.

Curl Example:

curl -X DELETE "https://YOUR-API-KEY@api.hostedgraphite.com/v1/aggregates/<aggregate_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
Aggregation Rules API
here
Creating Aggregation Rules
Listing Aggregations
List Aggregation Rules by ID
Deleting Aggregates
Editing Your Aggregations
Creating Aggregation Rules
Listing Aggregations
List Aggregation Rules by ID
Deleting Aggregates
Editing Your Aggregations
Aggregate Rules UI