To deploy a Datadog monitor, you can use the Datadog Operator and DatadogMonitor custom resource definition (CRD).

Prerequisites

Setup

  1. Create a file with the spec of your DatadogMonitor deployment configuration.

    Example:

    The following example spec creates a metric monitor that alerts on the query avg(last_10m):avg:system.disk.in_use{*} by {host} > 0.5.

    datadog-metric-monitor.yaml

       apiVersion: datadoghq.com/v1alpha1
       kind: DatadogMonitor
       metadata:
         name: datadog-monitor-test
         namespace: datadog
       spec:
         query: "avg(last_10m):avg:system.disk.in_use{*} by {host} > 0.5"
         type: "metric alert"
         name: "Test monitor made from DatadogMonitor"
         message: "1-2-3 testing"
         tags:
           - "test:datadog"
         priority: 5
         options:
           evaluationDelay: 300
           includeTags: true
           locked: false
           newGroupDelay: 300
           notifyNoData: true
           noDataTimeframe: 30
           renotifyInterval: 1440
           thresholds:
             critical: "0.5"
             warning: "0.28"
       

    For all available configuration options, see the Create a new monitor API reference.

  2. Deploy your DatadogMonitor:

    kubectl apply -f /path/to/your/datadog-metric-monitor.yaml
    

Additional examples

Metric monitors

Other monitors

PREVIEWING: brett.blue/embedded-collector-release