Policies

policy [hash]

A table of event types mapped to integration types.

policy.{integration} [hash]

A integration policy is a mapping from user-defined event types to integration-defined event types (e.g. PagerDuty or DataDog).

You can define whatever policy names you like (e.g. critical, error, etc), and then map these names to an integration:

---
version: '1.0'

policy:
  datadog:
    critical:    { alert_type: error,   priority: normal }
    error:       { alert_type: error,   priority: normal }
    warning:     { alert_type: warning, priority: normal }
    notice:      { alert_type: info,    priority: normal }
    success:     { alert_type: success, priority: normal }
    performance: { alert_type: warning, priority: normal, tags: [ team:devops ] }

  pagerduty:
    critical: { severity: critical }
    error:    { severity: error }
    warning:  { severity: warning }
    notice:   { severity: info }

targets: []

In the above configuration, a notice event would send an info event with normal priority to DataDog, and an info event to PagerDuty. Each integration has its own policy names. See the documentation on integrations for further details.

If a check generates an event with no matching policy, this is an error and the configuration will be rejected.