Skip to content

Commit

Permalink
fix: don't alarm on get subscribers endpoint (#310)
Browse files Browse the repository at this point in the history
  • Loading branch information
chris13524 authored Jan 21, 2024
1 parent f304db5 commit c553c85
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions terraform/monitoring/panels/app/http_request_latency.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ local targets = grafana.targets;
noDataState = 'no_data',
conditions = [
grafana.alertCondition.new(
evaluatorParams = [ 3000 ],
evaluatorParams = [ 2000 ],
evaluatorType = 'gt',
operatorType = 'or',
queryRefId = 'HttpRequestLatency',
queryRefId = 'FilteredHttpRequestLatency',
queryTimeStart = '5m',
queryTimeEnd = 'now',
reducerType = grafana.alert_reducers.Avg
Expand All @@ -41,4 +41,13 @@ local targets = grafana.targets;
exemplar = false,
refId = 'HttpRequestLatency',
))

.addTarget(targets.prometheus(
datasource = ds.prometheus,
expr = 'sum by (aws_ecs_task_revision, method, endpoint) (rate(http_request_latency_sum{endpoint!="/:project_id/subscribers"}[$__rate_interval])) / sum by (aws_ecs_task_revision, method, endpoint) (rate(http_request_latency_count{endpoint!="/:project_id/subscribers"}[$__rate_interval]))',
legendFormat = '{{method}} {{endpoint}} r{{aws_ecs_task_revision}}',
exemplar = false,
refId = 'FilteredHttpRequestLatency',
hide = true,
))
}

0 comments on commit c553c85

Please sign in to comment.