Skip to content

Commit

Permalink
fix: alarm immediately (#213)
Browse files Browse the repository at this point in the history
  • Loading branch information
chris13524 authored Nov 16, 2023
1 parent 171b49d commit 2859fdc
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,10 @@ local targets = grafana.targets;
message = '%(env)s - Failed to process incomming relay message' % { env: vars.environment },
notifications = vars.notifications,
noDataState = 'no_data',
period = '0m',
conditions = [
grafana.alertCondition.new(
evaluatorParams = [ 1 ],
evaluatorParams = [ 0 ],
evaluatorType = 'gt',
operatorType = 'or',
queryRefId = 'RelayIncommingMessagesServerErrors',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,10 @@ local targets = grafana.targets;
message = '%(env)s - Failed to publish message to relay' % { env: vars.environment },
notifications = vars.notifications,
noDataState = 'no_data',
period = '0m',
conditions = [
grafana.alertCondition.new(
evaluatorParams = [ 1 ],
evaluatorParams = [ 0 ],
evaluatorType = 'gt',
operatorType = 'or',
queryRefId = 'RelayOutgoingMessagePermenantFailures',
Expand Down
3 changes: 2 additions & 1 deletion terraform/monitoring/panels/lb/error_5xx.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ local defaults = import '../../grafonnet-lib/defaults.libsonnet';
local panels = grafana.panels;
local targets = grafana.targets;

local threshold = 1;
local threshold = 0;

local _configuration = defaults.configuration.timeseries
.withSoftLimit(
Expand All @@ -23,6 +23,7 @@ local _alert(namespace, env, notifications) = grafana.alert.new(
message = '%(env)s - Notify - 5XX alert' % { env: grafana.utils.strings.capitalize(env) },
notifications = notifications,
noDataState = 'no_data',
period = '0m',
conditions = [
grafana.alertCondition.new(
evaluatorParams = [ threshold ],
Expand Down

0 comments on commit 2859fdc

Please sign in to comment.