From ac49d3f894622d85cdc4487e0eeb476d69440994 Mon Sep 17 00:00:00 2001 From: Quentin Manfroi Date: Tue, 21 Aug 2018 09:44:51 +0200 Subject: [PATCH 1/3] MON-290 update php busy worker monitor --- middleware/php-fpm/inputs.tf | 4 ++-- middleware/php-fpm/monitors-fpm.tf | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/middleware/php-fpm/inputs.tf b/middleware/php-fpm/inputs.tf index 0650e83..9fbeb84 100644 --- a/middleware/php-fpm/inputs.tf +++ b/middleware/php-fpm/inputs.tf @@ -69,12 +69,12 @@ variable "php_fpm_busy_timeframe" { variable "php_fpm_busy_threshold_warning" { description = "php fpm busy warning threshold" - default = 0.8 + default = 80 } variable "php_fpm_busy_threshold_critical" { description = "php fpm busy critical threshold" - default = 0.9 + default = 90 } variable "php_fpm_connect_silenced" { diff --git a/middleware/php-fpm/monitors-fpm.tf b/middleware/php-fpm/monitors-fpm.tf index 0b1e0a1..7ac50c4 100644 --- a/middleware/php-fpm/monitors-fpm.tf +++ b/middleware/php-fpm/monitors-fpm.tf @@ -7,10 +7,10 @@ resource "datadog_monitor" "datadog_php_fpm_connect_idle" { query = < ${var.php_fpm_busy_threshold_critical} + avg:php_fpm.processes.active${module.filter-tags.query_alert} by {region, host, pool} / + ( avg:php_fpm.processes.idle${module.filter-tags.query_alert} by {region, host, pool} + + avg:php_fpm.processes.active${module.filter-tags.query_alert} by {region, host, pool} ) + ) * 100 > ${var.php_fpm_busy_threshold_critical} EOF thresholds { @@ -18,7 +18,7 @@ resource "datadog_monitor" "datadog_php_fpm_connect_idle" { critical = "${var.php_fpm_busy_threshold_critical}" } - notify_no_data = true + notify_no_data = false evaluation_delay = "${var.evaluation_delay}" new_host_delay = "${var.new_host_delay}" notify_audit = false From de091432b9565160f2a9686016b48397ff7f1927 Mon Sep 17 00:00:00 2001 From: Quentin Manfroi Date: Tue, 21 Aug 2018 09:47:38 +0200 Subject: [PATCH 2/3] MON-290 update readme --- middleware/php-fpm/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/middleware/php-fpm/README.md b/middleware/php-fpm/README.md index d280c84..fbf269b 100644 --- a/middleware/php-fpm/README.md +++ b/middleware/php-fpm/README.md @@ -33,8 +33,8 @@ Creates DataDog monitors with the following checks: | php_fpm_busy_extra_tags | Extra tags for PHP FPM busy worker monitor | list | `` | no | | php_fpm_busy_message | Custom message for PHP FPM busy worker monitor | string | `` | no | | php_fpm_busy_silenced | Groups to mute for PHP FPM busy worker monitor | map | `` | no | -| php_fpm_busy_threshold_critical | php fpm busy critical threshold | string | `0.9` | no | -| php_fpm_busy_threshold_warning | php fpm busy warning threshold | string | `0.8` | no | +| php_fpm_busy_threshold_critical | php fpm busy critical threshold | string | `90` | no | +| php_fpm_busy_threshold_warning | php fpm busy warning threshold | string | `80` | no | | php_fpm_busy_time_aggregator | Monitor aggregator for PHP FPM busy worker [available values: min, max or avg] | string | `avg` | no | | php_fpm_busy_timeframe | Monitor timeframe for PHP FPM busy worker [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | `last_10m` | no | | php_fpm_connect_enabled | Flag to enable PHP FPM process monitor | string | `true` | no | From b954b79b86c241d03369bef1170f45ecc45cff08 Mon Sep 17 00:00:00 2001 From: Quentin Manfroi Date: Tue, 21 Aug 2018 11:19:21 +0200 Subject: [PATCH 3/3] MON-290 remove region from grouping --- middleware/php-fpm/monitors-fpm.tf | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/middleware/php-fpm/monitors-fpm.tf b/middleware/php-fpm/monitors-fpm.tf index 7ac50c4..cb74a08 100644 --- a/middleware/php-fpm/monitors-fpm.tf +++ b/middleware/php-fpm/monitors-fpm.tf @@ -7,9 +7,9 @@ resource "datadog_monitor" "datadog_php_fpm_connect_idle" { query = < ${var.php_fpm_busy_threshold_critical} EOF