diff --git a/modules/integration_aws-efs/conf/01-used-space.yaml b/modules/integration_aws-efs/conf/01-used-space.yaml index 3f0d1f417..b1453ff46 100644 --- a/modules/integration_aws-efs/conf/01-used-space.yaml +++ b/modules/integration_aws-efs/conf/01-used-space.yaml @@ -1,7 +1,7 @@ module: "AWS EFS" name: "Used Space" filtering: "filter('namespace', 'AWS/EFS')" -value_unit: "Gigibyte" +value_unit: "Gibibyte" transformation: ".max(over='15m')" signals: used_space: diff --git a/modules/integration_aws-efs/detectors-gen.tf b/modules/integration_aws-efs/detectors-gen.tf index 93d3ca283..8c6ef553e 100644 --- a/modules/integration_aws-efs/detectors-gen.tf +++ b/modules/integration_aws-efs/detectors-gen.tf @@ -7,7 +7,7 @@ resource "signalfx_detector" "used_space" { viz_options { label = "signal" - value_unit = "Gigibyte" + value_unit = "Gibibyte" } program_text = <<-EOF @@ -19,7 +19,7 @@ resource "signalfx_detector" "used_space" { EOF rule { - description = "is too high > ${var.used_space_threshold_critical}Gigibyte" + description = "is too high > ${var.used_space_threshold_critical}Gibibyte" severity = "Critical" detect_label = "CRIT" disabled = coalesce(var.used_space_disabled_critical, var.used_space_disabled, var.detectors_disabled) @@ -31,7 +31,7 @@ EOF } rule { - description = "is too high > ${var.used_space_threshold_major}Gigibyte" + description = "is too high > ${var.used_space_threshold_major}Gibibyte" severity = "Major" detect_label = "MAJOR" disabled = coalesce(var.used_space_disabled_major, var.used_space_disabled, var.detectors_disabled) diff --git a/modules/integration_aws-efs/variables-gen.tf b/modules/integration_aws-efs/variables-gen.tf index 1def92d50..f52d0a029 100644 --- a/modules/integration_aws-efs/variables-gen.tf +++ b/modules/integration_aws-efs/variables-gen.tf @@ -55,7 +55,7 @@ variable "used_space_disabled_major" { } variable "used_space_threshold_critical" { - description = "Critical threshold for used_space detector in Gigibyte" + description = "Critical threshold for used_space detector in Gibibyte" type = number } @@ -71,7 +71,7 @@ variable "used_space_at_least_percentage_critical" { default = 1 } variable "used_space_threshold_major" { - description = "Major threshold for used_space detector in Gigibyte" + description = "Major threshold for used_space detector in Gibibyte" type = number } diff --git a/modules/integration_aws-elasticsearch/detectors-elasticsearch.tf b/modules/integration_aws-elasticsearch/detectors-elasticsearch.tf index 30b1243ee..a19d711a2 100644 --- a/modules/integration_aws-elasticsearch/detectors-elasticsearch.tf +++ b/modules/integration_aws-elasticsearch/detectors-elasticsearch.tf @@ -76,7 +76,7 @@ resource "signalfx_detector" "free_space" { viz_options { label = "signal" - value_unit = "Gigibyte" + value_unit = "Gibibyte" } program_text = <<-EOF @@ -121,7 +121,7 @@ resource "signalfx_detector" "ultrawarm_free_space" { viz_options { label = "signal" - value_unit = "Gigibyte" + value_unit = "Gibibyte" } program_text = <<-EOF diff --git a/modules/integration_aws-rds-common/detectors-rds-common.tf b/modules/integration_aws-rds-common/detectors-rds-common.tf index bb202b307..efc517ba7 100644 --- a/modules/integration_aws-rds-common/detectors-rds-common.tf +++ b/modules/integration_aws-rds-common/detectors-rds-common.tf @@ -75,12 +75,12 @@ resource "signalfx_detector" "free_space_low" { viz_options { label = "signal" - value_unit = "Gigibyte" + value_unit = "Gibibyte" } program_text = <<-EOF free = data('FreeStorageSpace', filter=filter('namespace', 'AWS/RDS') and filter('stat', 'mean') and filter('DBInstanceIdentifier', '*') and ${module.filtering.signalflow})${var.free_space_low_aggregation_function}${var.free_space_low_transformation_function} - signal = free.scale(1/1024**3).publish('signal') # Bytes to Gigibytes + signal = free.scale(1/1024**3).publish('signal') # Bytes to Gibibytes detect(when(signal < ${var.free_space_low_threshold_critical})).publish('CRIT') detect(when(signal < ${var.free_space_low_threshold_major}) and (not when(signal < ${var.free_space_low_threshold_critical}))).publish('MAJOR') EOF diff --git a/modules/smart-agent_system-common/detectors-system.tf b/modules/smart-agent_system-common/detectors-system.tf index 96c0cabf9..3627d58b4 100644 --- a/modules/smart-agent_system-common/detectors-system.tf +++ b/modules/smart-agent_system-common/detectors-system.tf @@ -11,6 +11,11 @@ resource "signalfx_detector" "disk_running_out" { countdown.hours_left_stream_incr_detector(stream=signal, maximum_capacity=${var.disk_running_out_maximum_capacity}, lower_threshold=${var.disk_running_out_hours_till_full}, fire_lasting=lasting('${var.disk_running_out_fire_lasting_time}', ${var.disk_running_out_fire_lasting_time_percent}), clear_threshold=${var.disk_running_out_clear_hours_remaining}, clear_lasting=lasting('${var.disk_running_out_clear_lasting_time}', ${var.disk_running_out_clear_lasting_time_percent}), use_double_ewma=${var.disk_running_out_use_ewma}).publish('MAJOR') EOF + viz_options { + label = "signal" + value_unit = "Gibibyte" + } + rule { description = "in ${var.disk_running_out_hours_till_full}" severity = "Major" diff --git a/scripts/templates/detector.tf.j2 b/scripts/templates/detector.tf.j2 index b188484bf..e0dcaa28c 100644 --- a/scripts/templates/detector.tf.j2 +++ b/scripts/templates/detector.tf.j2 @@ -26,7 +26,7 @@ resource "signalfx_detector" "{{ id }}" { {%- if value_unit is defined %} viz_options { - {%- if value_unit in ['Bit', 'Kilobit', 'Megabit', 'Gigabit', 'Terabit', 'Petabit', 'Exabit', 'Zettabit', 'Yottabit', 'Byte', 'Kibibyte','Mebibyte', 'Gigibyte', 'Tebibyte', 'Pebibyte', 'Exbibyte', 'Zebibyte', 'Yobibyte', 'Nanosecond', 'Microsecond', 'Millisecond', 'Second','Minute', 'Hour', 'Day', 'Week'] %} + {%- if value_unit in ['Bit', 'Kilobit', 'Megabit', 'Gigabit', 'Terabit', 'Petabit', 'Exabit', 'Zettabit', 'Yottabit', 'Byte', 'Kibibyte','Mebibyte', 'Gibibyte', 'Tebibyte', 'Pebibyte', 'Exbibyte', 'Zebibyte', 'Yobibyte', 'Nanosecond', 'Microsecond', 'Millisecond', 'Second','Minute', 'Hour', 'Day', 'Week'] %} label = "{{ key }}" value_unit = "{{ value_unit }}" {%- else %}