diff --git a/database/elasticsearch/detectors-elasticsearch.tf b/database/elasticsearch/detectors-elasticsearch.tf index 3137b95b7..85403c62c 100644 --- a/database/elasticsearch/detectors-elasticsearch.tf +++ b/database/elasticsearch/detectors-elasticsearch.tf @@ -547,66 +547,6 @@ EOF } } -resource "signalfx_detector" "query_cache_evictions_change" { - name = format("%s %s", local.detector_name_prefix, "Elasticsearch query cache evictions rate of change") - - program_text = <<-EOF - signal = data('elasticsearch.indices.query-cache.evictions', filter=filter('plugin', 'elasticsearch') and filter('node_name', '*') and ${module.filter-tags.filter_custom}, extrapolation='zero', rollup='delta').rateofchange()${var.query_cache_evictions_change_aggregation_function}${var.query_cache_evictions_change_transformation_function}.publish('signal') - detect(when(signal > ${var.query_cache_evictions_change_threshold_major})).publish('MAJOR') - detect(when(signal > ${var.query_cache_evictions_change_threshold_minor}) and when(signal <= ${var.query_cache_evictions_change_threshold_major})).publish('MINOR') -EOF - - rule { - description = "is too high > ${var.query_cache_evictions_change_threshold_major}" - severity = "Major" - detect_label = "MAJOR" - disabled = coalesce(var.query_cache_evictions_change_disabled_major, var.query_cache_evictions_change_disabled, var.detectors_disabled) - notifications = coalescelist(lookup(var.query_cache_evictions_change_notifications, "major", []), var.notifications.major) - parameterized_subject = local.rule_subject - parameterized_body = local.rule_body - } - - rule { - description = "is too high > ${var.query_cache_evictions_change_threshold_minor}" - severity = "Minor" - detect_label = "MINOR" - disabled = coalesce(var.query_cache_evictions_change_disabled_minor, var.query_cache_evictions_change_disabled, var.detectors_disabled) - notifications = coalescelist(lookup(var.query_cache_evictions_change_notifications, "minor", []), var.notifications.minor) - parameterized_subject = local.rule_subject - parameterized_body = local.rule_body - } -} - -resource "signalfx_detector" "request_cache_evictions_change" { - name = format("%s %s", local.detector_name_prefix, "Elasticsearch request cache evictions rate of change") - - program_text = <<-EOF - signal = data('elasticsearch.indices.request-cache.evictions', filter=filter('plugin', 'elasticsearch') and filter('node_name', '*') and ${module.filter-tags.filter_custom}, extrapolation='zero', rollup='delta').rateofchange()${var.request_cache_evictions_change_aggregation_function}${var.request_cache_evictions_change_transformation_function}.publish('signal') - detect(when(signal > ${var.request_cache_evictions_change_threshold_major})).publish('MAJOR') - detect(when(signal > ${var.request_cache_evictions_change_threshold_minor}) and when(signal <= ${var.request_cache_evictions_change_threshold_major})).publish('MINOR') -EOF - - rule { - description = "is too high > ${var.request_cache_evictions_change_threshold_major}" - severity = "Major" - detect_label = "MAJOR" - disabled = coalesce(var.request_cache_evictions_change_disabled_major, var.request_cache_evictions_change_disabled, var.detectors_disabled) - notifications = coalescelist(lookup(var.request_cache_evictions_change_notifications, "major", []), var.notifications.major) - parameterized_subject = local.rule_subject - parameterized_body = local.rule_body - } - - rule { - description = "is too high > ${var.request_cache_evictions_change_threshold_minor}" - severity = "Minor" - detect_label = "MINOR" - disabled = coalesce(var.request_cache_evictions_change_disabled_minor, var.request_cache_evictions_change_disabled, var.detectors_disabled) - notifications = coalescelist(lookup(var.request_cache_evictions_change_notifications, "minor", []), var.notifications.minor) - parameterized_subject = local.rule_subject - parameterized_body = local.rule_body - } -} - resource "signalfx_detector" "task_time_in_queue_change" { name = format("%s %s", local.detector_name_prefix, "Elasticsearch max time spent by task in queue rate of change") diff --git a/database/elasticsearch/outputs.tf b/database/elasticsearch/outputs.tf index 7e477e701..3ccfbe78c 100644 --- a/database/elasticsearch/outputs.tf +++ b/database/elasticsearch/outputs.tf @@ -83,16 +83,6 @@ output "pending_tasks" { value = signalfx_detector.pending_tasks } -output "query_cache_evictions_change" { - description = "Detector resource for query_cache_evictions_change" - value = signalfx_detector.query_cache_evictions_change -} - -output "request_cache_evictions_change" { - description = "Detector resource for request_cache_evictions_change" - value = signalfx_detector.request_cache_evictions_change -} - output "search_latency" { description = "Detector resource for search_latency" value = signalfx_detector.search_latency diff --git a/database/elasticsearch/variables.tf b/database/elasticsearch/variables.tf index 5d75955c3..123ef412e 100644 --- a/database/elasticsearch/variables.tf +++ b/database/elasticsearch/variables.tf @@ -864,106 +864,6 @@ variable "field_data_evictions_change_threshold_minor" { default = 60 } -# Query_cache_evictions_change detector - -variable "query_cache_evictions_change_disabled" { - description = "Disable all alerting rules for query_cache_evictions_change detector" - type = bool - default = null -} - -variable "query_cache_evictions_change_disabled_major" { - description = "Disable major alerting rule for query_cache_evictions_change detector" - type = bool - default = null -} - -variable "query_cache_evictions_change_disabled_minor" { - description = "Disable minor alerting rule for query_cache_evictions_change detector" - type = bool - default = null -} - -variable "query_cache_evictions_change_notifications" { - description = "Notification recipients list per severity overridden for query_cache_evictions_change detector" - type = map(list(string)) - default = {} -} - -variable "query_cache_evictions_change_aggregation_function" { - description = "Aggregation function and group by for query_cache_evictions_change detector (i.e. \".mean(by=['host'])\")" - type = string - default = "" -} - -variable "query_cache_evictions_change_transformation_function" { - description = "Transformation function for query_cache_evictions_change detector (i.e. \".mean(over='5m')\")" - type = string - default = ".mean(over='15m')" -} - -variable "query_cache_evictions_change_threshold_major" { - description = "major threshold for query_cache_evictions_change detector" - type = number - default = 120 -} - -variable "query_cache_evictions_change_threshold_minor" { - description = "minor threshold for query_cache_evictions_change detector" - type = number - default = 60 -} - -# Request_cache_evictions_change detector - -variable "request_cache_evictions_change_disabled" { - description = "Disable all alerting rules for request_cache_evictions_change detector" - type = bool - default = null -} - -variable "request_cache_evictions_change_disabled_major" { - description = "Disable major alerting rule for request_cache_evictions_change detector" - type = bool - default = null -} - -variable "request_cache_evictions_change_disabled_minor" { - description = "Disable minor alerting rule for request_cache_evictions_change detector" - type = bool - default = null -} - -variable "request_cache_evictions_change_notifications" { - description = "Notification recipients list per severity overridden for request_cache_evictions_change detector" - type = map(list(string)) - default = {} -} - -variable "request_cache_evictions_change_aggregation_function" { - description = "Aggregation function and group by for request_cache_evictions_change detector (i.e. \".mean(by=['host'])\")" - type = string - default = "" -} - -variable "request_cache_evictions_change_transformation_function" { - description = "Transformation function for request_cache_evictions_change detector (i.e. \".mean(over='5m')\")" - type = string - default = ".mean(over='15m')" -} - -variable "request_cache_evictions_change_threshold_major" { - description = "major threshold for request_cache_evictions_change detector" - type = number - default = 120 -} - -variable "request_cache_evictions_change_threshold_minor" { - description = "minor threshold for request_cache_evictions_change detector" - type = number - default = 60 -} - # Task_time_in_queue_change detector variable "task_time_in_queue_change_disabled" {