diff --git a/aws/eks/cloudwatch_queries.tf b/aws/eks/cloudwatch_queries.tf index 2b3ea4fac..76cbd9046 100644 --- a/aws/eks/cloudwatch_queries.tf +++ b/aws/eks/cloudwatch_queries.tf @@ -220,6 +220,22 @@ fields @timestamp, log, kubernetes.container_name as app, kubernetes.pod_name as QUERY } +resource "aws_cloudwatch_query_definition" "api-gunicorn-total-time" { + count = var.cloudwatch_enabled ? 1 : 0 + name = "API / GUnicorn total running time" + + log_group_names = [ + local.eks_application_log_group + ] + + query_string = <.*?) seconds/ +| order by @timestamp asc +| display @timestamp, @gunicorn_time +QUERY +} + resource "aws_cloudwatch_query_definition" "bounce-rate-critical" { count = var.cloudwatch_enabled ? 1 : 0 name = "Bounces / Critical bounces"