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 scheduled mutes
  • Searching scheduled mutes
  • Obtain information on a single scheduled mute
  • Updating scheduled mutes
  • Deleting scheduled mutes

Was this helpful?

  1. Alerting Guide

Scheduled Mutes API

PreviousNotification Channels APINextUsing Your Own Alerting

Last updated 4 months ago

Was this helpful?

Contents

POST /v2/schedules/

Path Parameters

Name
Type
Description

name*

String

A name that uniquely identifies this scheduled mute.

start_time*

String

A 24-hour time string at which the scheduled mute will begin.

duration*

String

Mute time in minutes.

timezone

String

The timezone string for this scheduled mute’s start time. Valid values are “UTC-12”...”UTC-1”, “UTC”, “UTC+1”...”UTC+14”. Defaults to “UTC” if not specified.

repeat

String

The list of days at which the scheduled mute will repeat on. Becomes a one-time scheduled mute if not specified. Valid values are “mon”, “tue”, “wed”, “thu”, “fri”, “sat” and “sun”.

HTTP/1.1 201 
Content-Type: application/json 
{
  "id": "<scheduled_mute_id>",
  "url": "/v2/schedules/<scheduled_mute_id>"
}

Bad Request Invalid

Conflict Already exists

Request format:

{
   "name": "string",
   "start_time": "14:20",
   "duration": 123,
   "timezone": "UTC-2",
   "repeat": ["mon", "tue", "wed", "thu", "fri", "sat", "sun"]
}

Curl example

curl -H "Content-Type: application/json" -X POST -d \
'{"name": "Mute on weekends", "start_time": "00:00", "duration": 1440, "timezone": "UTC+2", "repeat": ["sat", "sun"]}' \
"https://YOUR-API-KEY@api.hostedgraphite.com/v2/schedules/"

Creates a scheduled mute named “Mute on weekends” that starts at 12 AM in timezone UTC+2, with a mute duration of 24 hours, and repeats every Saturday and Sunday.


GET /v2/schedules/?

Returns a JSON object containing information on scheduled mutes matching the search query. Returns all scheduled mutes if the parameter is left empty.

Path Parameters

Name
Type
Description

name

String

Format: &name=<scheduled_mute_name1>&name=<scheduled_mute_name2>

The scheduled mute name to search for. Can specify multiple scheduled mute names to search for more than 1. Performs an OR operation so a query such as

&name=<scheduled_mute_name1>&name=<scheduled_mute_name2>

will return info on both scheduled_mute_name1 and scheduled_mute_name2.

id

String

Format: &id=<scheduled_mute_id1>&id=<scheduled_mute_id2>

The scheduled mute ID to search for. Can specify multiple scheduled mute IDs to search for more than 1. Performs an OR operation so a query such as

&name=<scheduled_mute_id1>&name=<scheduled_mute_id2>

will return info on both scheduled_mute_id1 and scheduled_mute_id2.

duration

String

Format: &duration=<duration1>&id=<duration2>

Searches for scheduled mutes by their duration. Can specify multiple durations to search for. Performs an OR operation so a query such as

&duration=30&duration=10

will return scheduled mutes with a 10-minute duration or a 30-minute duration.

start_time

String

Format: &start_time=<start_time1>&start_time=<start_time2>

Searches for scheduled mutes by their start time. Can specify multiple start times to search for. Performs an OR operation so a query such as

&start_time=12:00&start_time=20:00

will return scheduled mutes that start at either 12 PM or 8 PM.

timezone

String

Format: &timezone=<timezone1>&timezone=<timezone2>

Searches for scheduled mutes by their timezone. Can specify multiple time zones to search for. Performs an OR operation so a query such as

&timezone=UTC+2&timezone=UTC-14

will return scheduled mutes that have either UTC+2 or UTC-14 time zones.

repeat

String

Format: &repeat=<day1>&repeat=<day2>

Searches for scheduled mutes by their repeat days. Can specify multiple repeat days to search for. Performs an OR operation so a query such as

&repeat=sun&repeat=thu

will return scheduled mutes that repeat on either Sunday or Thursday.

page

String

Format: &page=1

The page number to query. Used if there are more items that can be displayed in a single request (default: 1).

max

String

Format: &max=50

The maximum number of items to display. Limit of 100 (default: 100).

HTTP/1.1 200 
Content-Type: application/json 
{
  "scheduled_mutes": [
    {
      "name": "Maintenance Window",
      "id": "mute_id_1",
      "duration": 60,
      "alerts": ["alert_id1", "alert_id2", "alert_id3"],
      "start_time": "20:20",
      "timezone": "UTC+4",
      "repeat": ["mon", "wed", "fri"]
    },
    {
      "name": "Holiday Quiet Hours",
      "id": "mute_id_2",
      "duration": 120,
      "alerts": ["alert_id4", "alert_id5"],
      "start_time": "18:00",
      "timezone": "UTC+1",
      "repeat": ["sat", "sun"]
    }
  ],
  "next_page": false
}

Bad Request Invalid

Curl example:

curl -X GET "https://YOUR-API-KEY@api.hostedgraphite.com/v2/schedules/?"

Specifying multiple fields performs an OR operation and returns scheduled mutes that match either criterion.


GET /v2/schedules/<scheduled_mute_id>/

Returns information on a single scheduled mute identified by <scheduled_mute_id>.

HTTP/1.1 200 
Content-Type: application/json 
{
  "name": "Maintenance Window",
  "id": "mute_id_1",
  "duration": 123,
  "alerts": ["alert_id1", "alert_id2", "alert_id3"],
  "start_time": "20:20",
  "timezone": "UTC+4",
  "repeat": ["mon", "wed", "fri"]
}

Not Found Scheduled mute doesn’t exist.

Curl example:

curl -X GET "https://YOUR-API-KEY@api.hostedgraphite.com/v2/schedules/123-456-789/"

Obtain information on the scheduled mute identified by the ID 123-456-789.


PUT /v2/schedules/<scheduled_mute_id>/

Updates the attributes of a scheduled mute identified by <scheduled_mute_id>.

Path Parameters

Name
Type
Description

name

String

A name that uniquely identifies this scheduled mute.

start_time

String

A 24-hour time string at which the scheduled mute will begin

duration

String

Mute time in minutes.

timezone

String

The timezone string for this scheduled mute’s start time. Valid values are “UTC-12”...”UTC-1”, “UTC”, “UTC+1”...”UTC+14”. Defaults to “UTC” if not specified.

repeat

String

The list of days at which the scheduled mute will repeat on. Becomes a one-time scheduled mute if not specified. Valid values are “mon”, “tue”, “wed”, “thu”, “fri”, “sat” and “sun”.

{
  "name": "string",
  "start_time": "14:20",
  "duration": 123,
  "timezone": "UTC-2",
  "repeat": [
    "mon",
    "tue",
    "wed",
    "thu",
    "fri",
    "sat",
    "sun"
  ]
}

Bad Request Invalid

Not Found Scheduled mute doesn’t exist.

Conflict Scheduled mute with the updated name already exists.

Curl example:

curl -H "Content-Type: application/json" -X PUT \
-d '{"start_time": "14:50", "timezone": "UTC+12"}' \
"https://YOUR-API-KEY@api.hostedgraphite.com/v2/schedules/123-456-789/"

Updates the start time and timezone of the scheduled mute with the id 123-456-789.

Each field is optional and only the specified fields are updated.


DELETE /v2/schedules/<scheduled_mute_id>/

Deletes a scheduled mute identified by <scheduled_mute_id>.

OK

Not Found Scheduled mute doesn’t exist.

Curl example:

curl -X DELETE "https://YOUR-API-KEY@api.hostedgraphite.com/v2/schedules/123-456-789/"

Delete the scheduled mute identified by the ID 123-456-789.

Scheduled Mutes API
Creating scheduled mutes
Searching scheduled mutes
Obtain information on a single scheduled mute
Updating scheduled mutes
Deleting scheduled mutes
Creating scheduled mutes
Searching scheduled mutes
Obtain information on a single scheduled mute
Updating scheduled mutes
Deleting scheduled mutes