Skip to content

Commit

Permalink
make pod filter more explicit
Browse files Browse the repository at this point in the history
  • Loading branch information
sastels committed Oct 18, 2024
1 parent f611a47 commit 34edee5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions aws/eks/cloudwatch_queries.tf
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ resource "aws_cloudwatch_query_definition" "bounce-rate-critical" {

query_string = <<QUERY
fields @timestamp, log, kubernetes.container_name as app, kubernetes.pod_name as pod_name, @logStream
| filter kubernetes.container_name like /celery-email/
| filter kubernetes.container_name like /^celery-email-send-*/
| filter @message like "critical bounce rate threshold of 10"
| sort @timestamp desc
| limit 20
Expand All @@ -247,7 +247,7 @@ resource "aws_cloudwatch_query_definition" "bounce-rate-warning" {

query_string = <<QUERY
fields @timestamp, log, kubernetes.container_name as app, kubernetes.pod_name as pod_name, @logStream
| filter kubernetes.container_name like /celery-email/
| filter kubernetes.container_name like /^celery-email-send-*/
| filter @message like "warning bounce rate threshold of 5"
| sort @timestamp desc
| limit 20
Expand All @@ -264,7 +264,7 @@ resource "aws_cloudwatch_query_definition" "bounce-rate-warnings-and-criticals"

query_string = <<QUERY
fields @timestamp, @service_id, @bounce_type
| filter kubernetes.container_name like /^celery-email/
| filter kubernetes.container_name like /^celery-email-send-*/
| filter @message like /bounce rate threshold of/
| parse @message "Service: * has met or exceeded a * bounce rate" as @service_id, @bounce_type
| stats count(*) by @service_id, @bounce_type
Expand Down

0 comments on commit 34edee5

Please sign in to comment.