Skip to content

Commit

Permalink
fix: connection state
Browse files Browse the repository at this point in the history
  • Loading branch information
jlsclaranet committed Oct 9, 2024
1 parent f8f2f0e commit a2973b6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ value_unit: "state"
signals:
signal:
metric: ConnectionState
filter: "filter('stat', 'maximum')"
filter: "filter('stat', 'sum')"

rules:
critical:
Expand Down
2 changes: 1 addition & 1 deletion modules/integration_aws-direct-connect/detectors-gen.tf
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ resource "signalfx_detector" "connection_state" {

program_text = <<-EOF
base_filtering = filter('namespace', 'AWS/DX')
signal = data('ConnectionState', filter=base_filtering and filter('stat', 'maximum') and ${module.filtering.signalflow})${var.connection_state_aggregation_function}${var.connection_state_transformation_function}.publish('signal')
signal = data('ConnectionState', filter=base_filtering and filter('stat', 'sum') and ${module.filtering.signalflow})${var.connection_state_aggregation_function}${var.connection_state_transformation_function}.publish('signal')
detect(when(signal == ${var.connection_state_threshold_critical}%{if var.connection_state_lasting_duration_critical != null}, lasting='${var.connection_state_lasting_duration_critical}', at_least=${var.connection_state_at_least_percentage_critical}%{endif})).publish('CRIT')
EOF

Expand Down

0 comments on commit a2973b6

Please sign in to comment.