v1

latestOpenAPI 3.0.02026-07-142351,1971.3 MB
Monitors

Get a monitor's details

Get details about the specified monitor from your organization.

get/api/v1/monitor/{monitor_id}

Path parameters

monitor_idinteger required
Example:666486743

The ID of the monitor

Query parameters

group_statesstring

When specified, shows additional information about the group states. Choose one or more from all, alert, warn, and no data.

with_downtimesboolean

If this argument is set to true, then the returned data includes all current active downtimes for the monitor.

with_assetsboolean

If this argument is set to true, the returned data includes all assets tied to this monitor.

Response

OK

createdstring date-time

Timestamp of the monitor creation.

deletedstring date-time nullable

Whether or not the monitor is deleted. (Always null)

draft_status'draft' | 'published'

Indicates whether the monitor is in a draft or published state.

draft: The monitor appears as Draft and does not send notifications. published: The monitor is active and evaluates conditions and notify as configured.

This field is in preview. The draft value is only available to customers with the feature enabled.

idinteger

ID of this monitor.

messagestring

A message to include with notifications for this monitor.

modifiedstring date-time

Last timestamp when the monitor was edited.

multiboolean

Whether or not the monitor is broken down on different groups.

namestring

The monitor name.

overall_state'Alert' | 'Ignored' | 'No Data' | 'OK' | 'Skipped' | 'Unknown' | 'Warn'

The different states your monitor can be in.

priorityinteger nullable

Integer from 1 (high) to 5 (low) indicating alert severity.

querystring required

The monitor query.

restricted_rolesstring[] nullable

A list of unique role identifiers to define which roles are allowed to edit the monitor. The unique identifiers for all roles can be pulled from the Roles API and are located in the data.id field. Editing a monitor includes any updates to the monitor configuration, monitor deletion, and muting of the monitor for any amount of time. You can use the Restriction Policies API to manage write authorization for individual monitors by teams and users, in addition to roles.

tagsstring[]

Tags associated to your monitor.

type'composite' | 'event alert' | 'log alert' | 'metric alert' | 'process alert' | 'query alert' | 'rum alert' | 'service check' | 'synthetics alert' | 'trace-analytics alert' | 'slo alert' | 'event-v2 alert' | 'audit alert' | 'ci-pipelines alert' | 'ci-tests alert' | 'error-tracking alert' | 'database-monitoring alert' | 'network-performance alert' | 'cost alert' | 'data-quality alert' | 'network-path alert' | 'data-jobs alert' required

The type of the monitor. For more information about type, see the monitor options docs.

Example response

{
  "assets": [
    {
      "category": "runbook",
      "name": "Monitor Runbook",
      "resource_key": "12345",
      "url": "/notebooks/12345"
    }
  ],
  "matching_downtimes": [
    {
      "end": 1412792983,
      "id": 1625,
      "scope": [
        "env:staging"
      ],
      "start": 1412792983
    }
  ],
  "name": "My monitor",
  "options": {
    "aggregation": {
      "group_by": "host",
      "metric": "metrics.name",
      "type": "count"
    },
    "scheduling_options": {
      "custom_schedule": {
        "recurrences": [
          {
            "rrule": "FREQ=WEEKLY;BYDAY=MO,TU,WE,TH,FR",
            "start": "2023-08-31T16:30:00",
            "timezone": "Europe/Paris"
          }
        ]
      },
      "evaluation_window": {
        "day_starts": "04:00",
        "month_starts": 1,
        "timezone": "Europe/Paris"
      }
    },
    "thresholds": {
      "critical_query": "formula(\"2 * query1\").rollup(\"avg\").last(\"6mo\")",
      "critical_recovery_query": "formula(\"1.5 * query1\").rollup(\"avg\").last(\"3mo\")"
    },
    "variables": [
      {
        "compute": {
          "aggregation": "avg",
          "interval": 60000,
          "metric": "@duration",
          "name": "compute_result",
          "source": "filter_query"
        },
        "data_source": "rum",
        "group_by": [
          {
            "facet": "status",
            "limit": 10,
            "sort": {
              "aggregation": "avg",
              "order": "asc"
            },
            "source": "filter_query"
          }
        ],
        "indexes": [
          "days-3",
          "days-7"
        ],
        "name": "query_errors",
        "search": {
          "query": "service:query"
        }
      }
    ]
  },
  "query": "avg(last_5m):sum:system.net.bytes_rcvd{host:host0} > 100",
  "type": "query alert"
}