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