-
Notifications
You must be signed in to change notification settings - Fork 32
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
Zookeeper duration #541
base: master
Are you sure you want to change the base?
Zookeeper duration #541
Changes from 15 commits
f538036
b9fa05e
2f0b068
7bb2c6b
f90dfae
a98dd62
2209c16
df37153
ae5b8ee
75e835a
f1b41ec
66b04fd
797bfb9
995a6f8
8808b17
7d2b1c1
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
module: zookeeper | ||
name: server-health | ||
disabled: false | ||
aggregation: false | ||
signals: | ||
signal: | ||
metric: "gauge.zk_service_health" | ||
rules: | ||
major: | ||
threshold: 1 | ||
comparator: "!=" | ||
description: "Zookeeper server is not running" | ||
lasting_duration: "5m" | ||
health_disabled: "false" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. health_disabled variable does not exist, I think this line should be deleted |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
module: zookeeper | ||
name: cluster-health | ||
disabled: false | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not needed, this is the default value |
||
aggregation: ".mean(by=['kubernetes_cluster'])" | ||
signals: | ||
signal: | ||
metric: "gauge.zk_service_health" | ||
rules: | ||
critical: | ||
threshold: 0 | ||
comparator: "==" | ||
description: "Zookeeper cluster is not running" | ||
lasting_duration: "5m" | ||
health_disabled: "false" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. health_disabled variable does not exist, I think this line should be deleted |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
module: zookeeper | ||
name: server-latency | ||
aggregation: false | ||
disabled: false | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not needed, this is the default value |
||
signals: | ||
signal: | ||
metric: "gauge.zk_avg_latency" | ||
rules: | ||
major: | ||
threshold: 250000 | ||
comparator: ">" | ||
description: "Zookeeper server latency is too high" | ||
lasting_duration: "5m" | ||
latency_disabled: "false" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. latency_disabled variable does not exist, I think this line should be deleted |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
module: zookeeper | ||
name: cluster-latency | ||
aggregation: ".mean(by=['kubernetes_cluster'])" | ||
disabled: false | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not needed, this is the default value |
||
signals: | ||
signal: | ||
metric: "gauge.zk_avg_latency" | ||
rules: | ||
critical: | ||
threshold: 300000 | ||
comparator: ">" | ||
description: "Zookeeper cluster latency is too high" | ||
lasting_duration: "5m" | ||
latency_disabled: "false" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. latency_disabled variable does not exist, I think this line should be deleted |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,108 @@ | ||
resource "signalfx_detector" "server-health" { | ||
name = format("%s %s", local.detector_name_prefix, "Zookeeper server-health") | ||
|
||
authorized_writer_teams = var.authorized_writer_teams | ||
teams = try(coalescelist(var.teams, var.authorized_writer_teams), null) | ||
tags = compact(concat(local.common_tags, local.tags, var.extra_tags)) | ||
|
||
program_text = <<-EOF | ||
signal = data('gauge.zk_service_health', filter=${module.filtering.signalflow})${var.server-health_transformation_function}.publish('signal') | ||
detect(when(signal != ${var.server-health_threshold_major}, lasting=%{if var.server-health_lasting_duration_major == null}None%{else}'${var.server-health_lasting_duration_major}'%{endif}, at_least=${var.server-health_at_least_percentage_major})).publish('MAJOR') | ||
EOF | ||
|
||
rule { | ||
description = "Zookeeper server is not running != ${var.server-health_threshold_major}" | ||
severity = "Major" | ||
detect_label = "MAJOR" | ||
disabled = coalesce(var.server-health_disabled, var.detectors_disabled) | ||
notifications = try(coalescelist(lookup(var.server-health_notifications, "major", []), var.notifications.major), null) | ||
runbook_url = try(coalesce(var.server-health_runbook_url, var.runbook_url), "") | ||
tip = var.server-health_tip | ||
parameterized_subject = var.message_subject == "" ? local.rule_subject : var.message_subject | ||
parameterized_body = var.message_body == "" ? local.rule_body : var.message_body | ||
} | ||
|
||
max_delay = var.server-health_max_delay | ||
} | ||
|
||
resource "signalfx_detector" "cluster-health" { | ||
name = format("%s %s", local.detector_name_prefix, "Zookeeper cluster-health") | ||
|
||
authorized_writer_teams = var.authorized_writer_teams | ||
teams = try(coalescelist(var.teams, var.authorized_writer_teams), null) | ||
tags = compact(concat(local.common_tags, local.tags, var.extra_tags)) | ||
|
||
program_text = <<-EOF | ||
signal = data('gauge.zk_service_health', filter=${module.filtering.signalflow})${var.cluster-health_aggregation_function}${var.cluster-health_transformation_function}.publish('signal') | ||
detect(when(signal == ${var.cluster-health_threshold_critical}, lasting=%{if var.cluster-health_lasting_duration_critical == null}None%{else}'${var.cluster-health_lasting_duration_critical}'%{endif}, at_least=${var.cluster-health_at_least_percentage_critical})).publish('CRIT') | ||
EOF | ||
|
||
rule { | ||
description = "Zookeeper cluster is not running == ${var.cluster-health_threshold_critical}" | ||
severity = "Critical" | ||
detect_label = "CRIT" | ||
disabled = coalesce(var.cluster-health_disabled, var.detectors_disabled) | ||
notifications = try(coalescelist(lookup(var.cluster-health_notifications, "critical", []), var.notifications.critical), null) | ||
runbook_url = try(coalesce(var.cluster-health_runbook_url, var.runbook_url), "") | ||
tip = var.cluster-health_tip | ||
parameterized_subject = var.message_subject == "" ? local.rule_subject : var.message_subject | ||
parameterized_body = var.message_body == "" ? local.rule_body : var.message_body | ||
} | ||
|
||
max_delay = var.cluster-health_max_delay | ||
} | ||
|
||
resource "signalfx_detector" "server-latency" { | ||
name = format("%s %s", local.detector_name_prefix, "Zookeeper server-latency") | ||
|
||
authorized_writer_teams = var.authorized_writer_teams | ||
teams = try(coalescelist(var.teams, var.authorized_writer_teams), null) | ||
tags = compact(concat(local.common_tags, local.tags, var.extra_tags)) | ||
|
||
program_text = <<-EOF | ||
signal = data('gauge.zk_avg_latency', filter=${module.filtering.signalflow})${var.server-latency_transformation_function}.publish('signal') | ||
detect(when(signal > ${var.server-latency_threshold_major}, lasting=%{if var.server-latency_lasting_duration_major == null}None%{else}'${var.server-latency_lasting_duration_major}'%{endif}, at_least=${var.server-latency_at_least_percentage_major})).publish('MAJOR') | ||
EOF | ||
|
||
rule { | ||
description = "Zookeeper server latency is too high > ${var.server-latency_threshold_major}" | ||
severity = "Major" | ||
detect_label = "MAJOR" | ||
disabled = coalesce(var.server-latency_disabled, var.detectors_disabled) | ||
notifications = try(coalescelist(lookup(var.server-latency_notifications, "major", []), var.notifications.major), null) | ||
runbook_url = try(coalesce(var.server-latency_runbook_url, var.runbook_url), "") | ||
tip = var.server-latency_tip | ||
parameterized_subject = var.message_subject == "" ? local.rule_subject : var.message_subject | ||
parameterized_body = var.message_body == "" ? local.rule_body : var.message_body | ||
} | ||
|
||
max_delay = var.server-latency_max_delay | ||
} | ||
|
||
resource "signalfx_detector" "cluster-latency" { | ||
name = format("%s %s", local.detector_name_prefix, "Zookeeper cluster-latency") | ||
|
||
authorized_writer_teams = var.authorized_writer_teams | ||
teams = try(coalescelist(var.teams, var.authorized_writer_teams), null) | ||
tags = compact(concat(local.common_tags, local.tags, var.extra_tags)) | ||
|
||
program_text = <<-EOF | ||
signal = data('gauge.zk_avg_latency', filter=${module.filtering.signalflow})${var.cluster-latency_aggregation_function}${var.cluster-latency_transformation_function}.publish('signal') | ||
detect(when(signal > ${var.cluster-latency_threshold_critical}, lasting=%{if var.cluster-latency_lasting_duration_critical == null}None%{else}'${var.cluster-latency_lasting_duration_critical}'%{endif}, at_least=${var.cluster-latency_at_least_percentage_critical})).publish('CRIT') | ||
EOF | ||
|
||
rule { | ||
description = "Zookeeper cluster latency is too high > ${var.cluster-latency_threshold_critical}" | ||
severity = "Critical" | ||
detect_label = "CRIT" | ||
disabled = coalesce(var.cluster-latency_disabled, var.detectors_disabled) | ||
notifications = try(coalescelist(lookup(var.cluster-latency_notifications, "critical", []), var.notifications.critical), null) | ||
runbook_url = try(coalesce(var.cluster-latency_runbook_url, var.runbook_url), "") | ||
tip = var.cluster-latency_tip | ||
parameterized_subject = var.message_subject == "" ? local.rule_subject : var.message_subject | ||
parameterized_body = var.message_body == "" ? local.rule_body : var.message_body | ||
} | ||
|
||
max_delay = var.cluster-latency_max_delay | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not needed, this is the default value