CloudWatch Metric Filter
CloudWatch Metric Filter
- Return to CloudWatch interface
- Select Log groups
- Select /ec2/linux/var/log/messages
- Select Actions
- Select Create metric filter
- For Filter pattern, enter ERROR
- Select Select log data to test and select Test pattern
- You will see the following information:
[month, day, timestamp, host, appId="logger.runJob:", message="ERROR*"]
- Name is PythonAppErrors
- Set metric namespace to ec2-logs
- For Metric name is /var/log/messages - ERROR
- For Metric value set to 1
- Default is set to 0
- For Unit choose Count
- Select Next
- Review and select Create metric filter