Merged in MON-306-use-systemloadnorm5-instead-of-s (pull request #161)
MON-306 use system.load.norm.5 instead of division Approved-by: Quentin Manfroi <quentin.manfroi@yahoo.fr> Approved-by: Alex Lemaresquier <alex+bitbucket@lemaresquier.org> Approved-by: Alexandre Gaillet <alexandre.gaillet@fr.clara.net>
This commit is contained in:
commit
e923270b0b
@ -16,7 +16,7 @@ module "datadog-monitors-system-generic" {
|
|||||||
|
|
||||||
Creates DataDog monitors with the following checks:
|
Creates DataDog monitors with the following checks:
|
||||||
|
|
||||||
- CPU load 5
|
- CPU load 5 ratio
|
||||||
- CPU usage
|
- CPU usage
|
||||||
- Disk Space forecast
|
- Disk Space forecast
|
||||||
- Free disk inodes
|
- Free disk inodes
|
||||||
|
|||||||
@ -32,13 +32,12 @@ resource "datadog_monitor" "datadog_cpu_too_high" {
|
|||||||
|
|
||||||
resource "datadog_monitor" "datadog_load_too_high" {
|
resource "datadog_monitor" "datadog_load_too_high" {
|
||||||
count = "${var.cpu_load_enabled ? 1 : 0}"
|
count = "${var.cpu_load_enabled ? 1 : 0}"
|
||||||
name = "[${var.environment}] CPU load 5 {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}"
|
name = "[${var.environment}] CPU load 5 ratio {{#is_alert}}{{{comparator}}} {{threshold}} ({{value}}){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}} ({{value}}){{/is_warning}}"
|
||||||
message = "${coalesce(var.cpu_load_message, var.message)}"
|
message = "${coalesce(var.cpu_load_message, var.message)}"
|
||||||
|
|
||||||
query = <<EOF
|
query = <<EOF
|
||||||
${var.cpu_load_time_aggregator}(${var.cpu_load_timeframe}): (
|
${var.cpu_load_time_aggregator}(${var.cpu_load_timeframe}): (
|
||||||
avg:system.load.5${module.filter-tags.query_alert} by {region,host} /
|
avg:system.load.norm.5${module.filter-tags.query_alert} by {region,host}
|
||||||
avg:system.core.count${module.filter-tags.query_alert} by {region,host}
|
|
||||||
) > ${var.cpu_load_threshold_critical}
|
) > ${var.cpu_load_threshold_critical}
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user