CloudWatch Metric Filter

CloudWatch Metric Filter

  1. Return to CloudWatch interface
  • Select Log groups
  • Select /ec2/linux/var/log/messages
  • Select Actions
  • Select Create metric filter

CloudWatch

  1. For Filter pattern, enter ERROR

CloudWatch

  1. 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*"]
  • Select Next

CloudWatch

  1. 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

CloudWatch

  1. Review and select Create metric filter

CloudWatch

CloudWatch

CloudWatch