v8

latestOpenAPI 3.0.0Apache 2.0raw.githubusercontent.com2025-10-165266542.4 MB
DigitalOcean-public.v2-new_Monitoring

Create Alert Policy

To create a new alert, send a POST request to /v2/monitoring/alerts.

post/v2/monitoring/alerts

Request body

compare'GreaterThan' | 'LessThan' required
descriptionstring required
enabledboolean required
entitiesstring[] required
tagsstring[] required
type'v1/insights/droplet/load_1' | 'v1/insights/droplet/load_5' | 'v1/insights/droplet/load_15' | 'v1/insights/droplet/memory_utilization_percent' | 'v1/insights/droplet/disk_utilization_percent' | 'v1/insights/droplet/cpu' | 'v1/insights/droplet/disk_read' | 'v1/insights/droplet/disk_write' | 'v1/insights/droplet/public_outbound_bandwidth' | 'v1/insights/droplet/public_inbound_bandwidth' | 'v1/insights/droplet/private_outbound_bandwidth' | 'v1/insights/droplet/private_inbound_bandwidth' | 'v1/insights/lbaas/avg_cpu_utilization_percent' | 'v1/insights/lbaas/connection_utilization_percent' | 'v1/insights/lbaas/droplet_health' | 'v1/insights/lbaas/tls_connections_per_second_utilization_percent' | 'v1/insights/lbaas/increase_in_http_error_rate_percentage_5xx' | 'v1/insights/lbaas/increase_in_http_error_rate_percentage_4xx' | 'v1/insights/lbaas/increase_in_http_error_rate_count_5xx' | 'v1/insights/lbaas/increase_in_http_error_rate_count_4xx' | 'v1/insights/lbaas/high_http_request_response_time' | 'v1/insights/lbaas/high_http_request_response_time_50p' | 'v1/insights/lbaas/high_http_request_response_time_95p' | 'v1/insights/lbaas/high_http_request_response_time_99p' | 'v1/dbaas/alerts/load_15_alerts' | 'v1/dbaas/alerts/memory_utilization_alerts' | 'v1/dbaas/alerts/disk_utilization_alerts' | 'v1/dbaas/alerts/cpu_alerts' | 'v1/droplet/autoscale_alerts/current_instances' | 'v1/droplet/autoscale_alerts/target_instances' | 'v1/droplet/autoscale_alerts/current_cpu_utilization' | 'v1/droplet/autoscale_alerts/target_cpu_utilization' | 'v1/droplet/autoscale_alerts/current_memory_utilization' | 'v1/droplet/autoscale_alerts/target_memory_utilization' | 'v1/droplet/autoscale_alerts/scale_up' | 'v1/droplet/autoscale_alerts/scale_down' required
valuenumber float required
window'5m' | '10m' | '30m' | '1h' required

Example request

{
  "alerts": {
    "email": [
      "bob@exmaple.com"
    ],
    "slack": [
      {
        "channel": "Production Alerts",
        "url": "https://hooks.slack.com/services/T1234567/AAAAAAAA/ZZZZZZ"
      }
    ]
  },
  "compare": "GreaterThan",
  "description": "CPU Alert",
  "enabled": true,
  "entities": [
    "192018292"
  ],
  "tags": [
    "droplet_tag"
  ],
  "type": "v1/insights/droplet/cpu",
  "value": 80,
  "window": "5m"
}

Response

An alert policy.

Example response

{
  "policy": {
    "alerts": {
      "email": [
        "bob@exmaple.com"
      ],
      "slack": [
        {
          "channel": "Production Alerts",
          "url": "https://hooks.slack.com/services/T1234567/AAAAAAAA/ZZZZZZ"
        }
      ]
    },
    "compare": "GreaterThan",
    "description": "CPU Alert",
    "enabled": true,
    "entities": [
      "192018292"
    ],
    "tags": [
      "droplet_tag"
    ],
    "type": "v1/insights/droplet/cpu",
    "uuid": "78b3da62-27e5-49ba-ac70-5db0b5935c64",
    "value": 80,
    "window": "5m"
  }
}