Last active
August 29, 2015 14:24
-
-
Save LewisMcMahon/9ece67274e1f941ffc6f to your computer and use it in GitHub Desktop.
AWS Cloudwatch metric for sendmail queue length
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
aws cloudwatch put-metric-data --metric-name "sendmail queue" --dimensions InstanceId=$(ec2metadata --instance-id) --namespace "EC2" --value $(mailq | grep -Po "(?<=Total requests\: )([0-9]+)"| paste -sd+ | bc) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
requires cloud-utils and aws cli