AWS Certified DevOps Engineer Notes
StorageResolution
API parameter):
To send a metric to CloudWatch, we can use the PutMetricData
API
aws cloudwatch put-metric-data --metric-name <metric-name> --namespace <namespace> --value <value> --dimensions InstanceId=1-23456789,Instance-Type=m1.small --profile <profile> --region <region>
GetMetricStatistics
API:
aws cloudwatch get-metric-statistics --namespace <namespace> --metric-name <metric name> --dimensions=<dimensions> --statistics Maximum --start-time 2019-08-10T00:00:00 --end-time <end-time> --period <period> --profile <profile> --region <region>
ERROR
messagesCreateExportTask
statsd
to send information to CloudWatch/var/log/apache/access.log
OK
INSUFFICIENT_DATA
ALARM
In order to test an alarm, we can use the following command:
aws cloudwatch set-alarm-state --alarm-name "name" --state-values ALARM --state-reason "testing"
ADN
or OR
conditions are supported