Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove not relevant query and request cache evictions #173

Merged
merged 1 commit into from
Nov 2, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 0 additions & 60 deletions database/elasticsearch/detectors-elasticsearch.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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")

Expand Down
10 changes: 0 additions & 10 deletions database/elasticsearch/outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
100 changes: 0 additions & 100 deletions database/elasticsearch/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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" {
Expand Down