Skip to content

Instantly share code, notes, and snippets.

@thiagomgo
Last active June 15, 2019 13:53
Show Gist options
  • Save thiagomgo/06276935ecd54c9e1fbb37441ac8b87c to your computer and use it in GitHub Desktop.
Save thiagomgo/06276935ecd54c9e1fbb37441ac8b87c to your computer and use it in GitHub Desktop.
Cron to put load average values into Cloud Watch
* * * * * 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