Skip to content

Commit

Permalink
Azure Update Management monitoring with Fame - extrapolation
Browse files Browse the repository at this point in the history
  • Loading branch information
BzSpi committed Jun 16, 2023
1 parent 5eb7429 commit 347de19
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ signals:
signal:
metric: fame.azure.automation_update.updates_status
filter: filter('status', 'failed')
extrapolation: zero

rules:
major:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ signals:
signal:
metric: fame.azure.automation_update.missing_updates
filter: filter('classification', 'security', 'critical')
extrapolation: zero

rules:
major:
Expand Down
4 changes: 2 additions & 2 deletions modules/fame_azure-automation-updates/detectors-gen.tf
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ resource "signalfx_detector" "failed_updates" {
tags = compact(concat(local.common_tags, local.tags, var.extra_tags))

program_text = <<-EOF
signal = data('fame.azure.automation_update.updates_status', filter=filter('status', 'failed') and ${module.filtering.signalflow})${var.failed_updates_aggregation_function}${var.failed_updates_transformation_function}.publish('signal')
signal = data('fame.azure.automation_update.updates_status', filter=filter('status', 'failed') and ${module.filtering.signalflow}, extrapolation='zero')${var.failed_updates_aggregation_function}${var.failed_updates_transformation_function}.publish('signal')
detect(when(signal > ${var.failed_updates_threshold_major}, lasting=%{if var.failed_updates_lasting_duration_major == null}None%{else}'${var.failed_updates_lasting_duration_major}'%{endif}, at_least=${var.failed_updates_at_least_percentage_major})).publish('MAJOR')
EOF

Expand All @@ -33,7 +33,7 @@ resource "signalfx_detector" "missing_updates" {
tags = compact(concat(local.common_tags, local.tags, var.extra_tags))

program_text = <<-EOF
signal = data('fame.azure.automation_update.missing_updates', filter=filter('classification', 'security', 'critical') and ${module.filtering.signalflow})${var.missing_updates_aggregation_function}${var.missing_updates_transformation_function}.publish('signal')
signal = data('fame.azure.automation_update.missing_updates', filter=filter('classification', 'security', 'critical') and ${module.filtering.signalflow}, extrapolation='zero')${var.missing_updates_aggregation_function}${var.missing_updates_transformation_function}.publish('signal')
detect(when(signal > ${var.missing_updates_threshold_major}, lasting=%{if var.missing_updates_lasting_duration_major == null}None%{else}'${var.missing_updates_lasting_duration_major}'%{endif}, at_least=${var.missing_updates_at_least_percentage_major})).publish('MAJOR')
EOF

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ signals:
signal:
metric: fame.azure.update_center.updates_status
filter: filter('status', 'failed')
extrapolation: zero

rules:
major:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ signals:
signal:
metric: fame.azure.update_center.missing_updates
filter: filter('classification', 'security', 'critical')
extrapolation: zero

rules:
major:
Expand Down
4 changes: 2 additions & 2 deletions modules/fame_azure-update-center/detectors-gen.tf
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ resource "signalfx_detector" "failed_updates" {
tags = compact(concat(local.common_tags, local.tags, var.extra_tags))

program_text = <<-EOF
signal = data('fame.azure.update_center.updates_status', filter=filter('status', 'failed') and ${module.filtering.signalflow})${var.failed_updates_aggregation_function}${var.failed_updates_transformation_function}.publish('signal')
signal = data('fame.azure.update_center.updates_status', filter=filter('status', 'failed') and ${module.filtering.signalflow}, extrapolation='zero')${var.failed_updates_aggregation_function}${var.failed_updates_transformation_function}.publish('signal')
detect(when(signal > ${var.failed_updates_threshold_major}, lasting=%{if var.failed_updates_lasting_duration_major == null}None%{else}'${var.failed_updates_lasting_duration_major}'%{endif}, at_least=${var.failed_updates_at_least_percentage_major})).publish('MAJOR')
EOF

Expand All @@ -33,7 +33,7 @@ resource "signalfx_detector" "missing_updates" {
tags = compact(concat(local.common_tags, local.tags, var.extra_tags))

program_text = <<-EOF
signal = data('fame.azure.update_center.missing_updates', filter=filter('classification', 'security', 'critical') and ${module.filtering.signalflow})${var.missing_updates_aggregation_function}${var.missing_updates_transformation_function}.publish('signal')
signal = data('fame.azure.update_center.missing_updates', filter=filter('classification', 'security', 'critical') and ${module.filtering.signalflow}, extrapolation='zero')${var.missing_updates_aggregation_function}${var.missing_updates_transformation_function}.publish('signal')
detect(when(signal > ${var.missing_updates_threshold_major}, lasting=%{if var.missing_updates_lasting_duration_major == null}None%{else}'${var.missing_updates_lasting_duration_major}'%{endif}, at_least=${var.missing_updates_at_least_percentage_major})).publish('MAJOR')
EOF

Expand Down

0 comments on commit 347de19

Please sign in to comment.