resource "datadog_monitor" "${myResourceName}" {
         name = "my-${myResourceName}"
         description = "my-description-${myResourceName}"
         type = "metric alert"
         message = "Monitor triggered. Notify: @hipchat-channel"
         escalation_message = "Escalation message @pagerduty"
      
         query = "avg(last_1h):avg:aws.ec2.cpu{environment:foo,host:foo} by {host} > 2"
      
         thresholds {
             ok = 0
             warning = 1
             critical = 2
         }
      
         notify_no_data = false
         renotify_interval = 60
      
         notify_audit = false
         timeout_h = 60
         include_tags = true
      
         silenced {
             "*" = 0
         }
      }

      Terraform language logo
      datadog_monitor

      Terraform snippets

      The following code is a Monitor definition for Datadog.

      name: my-name

      description: My monitoring description

      type: metric alert

      message: Monitor triggered.

      Shortcut: tf_datadog_monitor

      0 Comments

        Add Comment

        Log in to add a comment

        Codiga - All rights reserved 2022.