datadog_monitor

    0

    0

    lucycodes42

    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

    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
       }
    }
    Codiga Logo
    Codiga Hub
    • Rulesets
    • Playground
    • Snippets
    • Cookbooks
    Legal
    • Security
    • Privacy Policy
    • Code Privacy
    • Terms of Service
    soc-2 icon

    We are SOC-2 Compliance Certified

    G2 high performer medal

    Codiga – All rights reserved 2022.