{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://raw.githubusercontent.com/api-evangelist/datadog/refs/heads/main/json-schema/datadog-monitors-monitor-schema.json", "title": "Monitor", "description": "A Datadog monitor that watches a metric or check and alerts when thresholds are exceeded", "type": "object", "properties": { "id": { "type": "integer", "format": "int64", "description": "The unique numeric identifier of the monitor, assigned by Datadog upon creation", "example": 42 }, "type": { "type": "string", "description": "The type of monitor that determines the query language and alerting behavior", "enum": [ "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" ], "example": "composite" }, "query": { "type": "string", "description": "The monitor query expression using Datadog's query language for the specified monitor type", "example": "avg:system.cpu.user{*}" }, "name": { "type": "string", "description": "A descriptive name for the monitor used for identification in dashboards and notifications", "example": "Example Monitor" }, "message": { "type": "string", "description": "The notification message body sent when the monitor triggers, supports template variables and @-mentions", "example": "CPU usage is high on {{host.name}}" }, "tags": { "type": "array", "description": "List of tags to associate with the monitor for filtering and organization", "items": { "type": "string" } }, "options": { "$ref": "#/components/schemas/MonitorOptions" }, "priority": { "type": "integer", "description": "The monitor priority level from 1 (highest) to 5 (lowest), used for sorting and filtering", "minimum": 1, "maximum": 5, "example": 42 }, "state": { "$ref": "#/components/schemas/MonitorState" }, "creator": { "$ref": "#/components/schemas/Creator" }, "created": { "type": "string", "format": "date-time", "description": "ISO 8601 timestamp when the monitor was created", "example": "example_value" }, "modified": { "type": "string", "format": "date-time", "description": "ISO 8601 timestamp when the monitor was last modified", "example": "example_value" }, "deleted": { "type": "string", "format": "date-time", "nullable": true, "description": "ISO 8601 timestamp when the monitor was deleted, or null if not deleted", "example": "example_value" }, "restricted_roles": { "type": "array", "description": "List of role IDs whose members can edit this monitor; empty means all users can edit", "items": { "type": "string" } } }, "required": [ "type", "query", "name", "message" ] }