In this section, we will set up an Alarm for the Error Log Metric that we created in the previous section.
Return to the main screen of CloudWatch.
The metrics window appears, under Custom namespaces, select ec2-logs.
Next, select Metrics with no dimensions, choose /var/log/messages, and click Select metric.
In the Conditions section:
You will see a dashed line indicating that this is the threshold where the Alarm will be triggered => when there are too many errors, something unusual has happened in the application and needs to be checked immediately.
Then click Next to continue.
Now, configure the notification as follows:
Error_logs_reach_10
.Click Next.
PythonApplicationErrorAlarm
and click Next.Result:
Click Confirm subscription.
Okay, now we have completed the alarm setup.