aws-alert-monitor is in maintenance mode!
We will continue to provide best effor support for bug fix requests, however new features will not be added.
AWS Alert Monitor listenting to an SQS queue for alarms and sends email via SES based on rules applied in ~/.aws-alert-monitor.yml to those alerts.
gem install aws-alert-monitor
Add ~/.aws-alert-monitor.yml with the following syntax:
app1:
access_key: Key
secret_key: Secret
sqs_endpoint: https://sqs.us-west-1.amazonaws.com/123456789012/app1
proxy_uri: http://my.proxy.com/
events:
'autoscaling:EC2_INSTANCE_LAUNCH':
email:
source: [email protected]
destination: [email protected]
'autoscaling:EC2_INSTANCE_TERMINATE':
email:
source: [email protected]
destination: [email protected]
app2:
access_key: Key
secret_key: Secret
sqs_endpoint: https://sqs.us-west-1.amazonaws.com/123456789012/app2
events:
'autoscaling:EC2_INSTANCE_FAILED_LAUNCH':
email:
source: [email protected]
destination: [email protected]
Currently, this gem supports the following event types:
- autoscaling:EC2_INSTANCE_LAUNCH
- autoscaling:EC2_INSTANCE_LAUNCH_ERROR
- autoscaling:EC2_INSTANCE_TERMINATE
- autoscaling:EC2_INSTANCE_TERMINATE_ERROR
Cloud watch support is somewhat generic. The event pattern is:
cloudwatch:$metric_namespace-$metric_name
For example:
cloudwatch:AWS/SQS-ApproximateNumberOfMessagesVisible
There is basic support for reporting that a process is not running.
The event type for this is process_down
.
The schema for this type of event is:
{
"Subject": "process_down",
"Message": "{ \"body\": \"Your message about process down\", \"created_at\": \"2013-04-03T20:30:36Z\", \"process\": \"httpd\", \"required_count\": 5, \"running_count\": 2, \"environment\": \"dev\", \"host\": \"wwwdev1.example.com\"}"
}
Unfortunately that is JSON inside JSON (as that is what AWS sends in many of their messages).
If a message does not match one of the above types, then it will be classified as unknown.
You can control the notification of these messages with:
unknown
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request