Differences between revisions 2 and 3
Revision 2 as of 2021-01-25 23:52:41
Size: 493
Editor: PieterSmit
Comment:
Revision 3 as of 2021-11-18 01:21:41
Size: 1489
Editor: PieterSmit
Comment:
Deletions are marked like this. Additions are marked like this.
Line 10: Line 10:


== Datadog Monitor - email from aws tag ==
 * Goal: Send alert email to address in aws tag.
   * e.g. domain test.com and tag "AlertEmailPrefix" {{{
#Datadog - alert
{{#is_alert}}# Alert msg over{{threshold}}%{{/is_alert}}
{{#is_warning}}# Warnign msg over {{warn_threshold}}%{{/is_warning}}
{{#is_recovery}}# Fixed {{warn_threshold}}%{{/is_recovery}}

{{^is_recovery}}## Currently fine {{value}}.{{/is_recovery}}

 - Host: {{host.name}}
 - Device: {{device.name}}
 - value: {{value}} {{#is_match "host.env" ""}}
 - Environment: {{host.env}}
{{#is_match "host.account" ""}}- Account: {{host.account}}{{/is_match}}
{{#is_match "host.region" ""}}- Region: {{host.region}}{{/is_match}}
TEST:
host.name_tag: "{{ host.name_tag }}"
AlertEmailPrefix: "{{host.alertemailprefix}}"

{{#is_match "host.alertemailprefix" ""}}@{{host.alertemailprefix}}@test.com{{/is_match}}{{^is_match "host.alertemailprefix" ""}}#No aws tag "AlertEmailPrefix" to send email to{{/is_match}}

}}}

DataDog/LambdaForwarder

Datadog Monitor - email from aws tag

  • Goal: Send alert email to address in aws tag.
    • e.g. domain test.com and tag "AlertEmailPrefix"

      #Datadog - alert
      {{#is_alert}}# Alert msg over{{threshold}}%{{/is_alert}} 
      {{#is_warning}}# Warnign msg over {{warn_threshold}}%{{/is_warning}}
      {{#is_recovery}}# Fixed {{warn_threshold}}%{{/is_recovery}}
      
      {{^is_recovery}}## Currently fine {{value}}.{{/is_recovery}}
      
       - Host: {{host.name}}
       - Device: {{device.name}}
       - value: {{value}} {{#is_match "host.env" ""}}
       - Environment: {{host.env}}
      {{#is_match "host.account" ""}}- Account: {{host.account}}{{/is_match}}
      {{#is_match "host.region" ""}}- Region: {{host.region}}{{/is_match}}
      TEST:
      host.name_tag: "{{ host.name_tag }}"
      AlertEmailPrefix: "{{host.alertemailprefix}}"
      
      {{#is_match "host.alertemailprefix" ""}}@{{host.alertemailprefix}}@test.com{{/is_match}}{{^is_match "host.alertemailprefix" ""}}#No aws tag "AlertEmailPrefix" to send email to{{/is_match}}

DataDog/LambdaForwarder (last edited 2021-11-18 01:42:38 by PieterSmit)