Last active
June 15, 2019 13:53
-
-
Save thiagomgo/06276935ecd54c9e1fbb37441ac8b87c to your computer and use it in GitHub Desktop.
Cron to put load average values into Cloud Watch
This file contains hidden or 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
* * * * * root /bin/aws --region <REGION> cloudwatch put-metric-data --namespace="<NAMESPACE>" --metric-name "CPULoad" --value $(cat /proc/loadavg | awk '{print $1}') --dimensions AutoScalingWebGroup="ASG-NAME" > /tmp/cpuload-lastrun.log 2>&1; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment