Guardian Alarm Tags
With the latest Guardian version and the latest Guardian Bearse feature, tags can be applied to Cloudwatch alarms created by guardian. The tags are applied after the Guardian stack is created/updated in the codepipeline using the AWS SDK as Cloudformation doesn’t support alarm tags.
Default Guardian Tags
Guardian will add the following default tags to each alarm
guardian:resource:id
guardian:resource:group
guardian:alarm:name
guardian:alarm:metric
guardian:alarm:severity
Custom Tags
Additional tags can added through the alarms yaml configuration file. They can be applied globally to all alarms, to all alarms in a resource group or a specific alarm.
Global Tags
Global tags are applied to every alarm created by guardian. Add the GlobalTags
key at the top level of the alarms yaml config with key:value pairs.
GlobalTags:
key: value
env: production
Resource Group Tags
Resource group tags are applied to every alarm in a guardian resource group using the Templates
section to add the tags.
Templates:
Ec2Instance:
GroupOverrides:
Tags:
key: value
env: production
Specific Alarm Tags
To add tags to a specific guardian alarm you can apply the tags in the Templates
section of the alarms yaml config.
Templates:
Ec2Instance:
CPUUtilizationHigh:
Tags:
key: value
alarm-action: restart ec2 instance