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
  • Searching Metrics
  • Locate Metrics
  • Busy Metrics
  • Locate Busy Metrics
  • Invalid Metrics
  • Locate Invalid Metrics
  • Deleting Metrics
  • Delete Metrics

Was this helpful?

  1. API Guides

Metrics API

PreviousAPI GuidesNextTag API

Last updated 4 months ago

Was this helpful?

Contents

Locate Metrics

GET GET /api/v1/metric/search?

Path Parameters

Name
Type
Description

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
}

Bad Request Invalid request

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

HTTP/1.1 200
Content-Type: application/json
{
  "metric": "busy-metric.1",
  "pct_ratelimited": 60
}

Bad Request Invalid request

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

HTTP/1.1 200
Content-Type: application/json
{
  "metric": "busy-metric.1",
  "pct_ratelimited": 60
}

Bad Request Invalid request

Curl example:

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

Delete Metrics

POST /api/v1/metric/delete

OK

Bad Request Invalid request

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

Metrics API
Searching Metrics
Busy Metrics
Invalid Metrics
Deleting Metrics
Searching Metrics
Busy Metrics
Invalid Metrics
Deleting Metrics