fix inputs values
This commit is contained in:
parent
6d82a378cc
commit
b0ccd4e892
13
inputs.tf
13
inputs.tf
@ -24,6 +24,7 @@ variable "dd_custom_cpu" {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## RDS
|
## RDS
|
||||||
variable "dd_aws_rds" {
|
variable "dd_aws_rds" {
|
||||||
default = "disabled"
|
default = "disabled"
|
||||||
@ -49,6 +50,7 @@ variable "rds_mem_threshold" {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
## ELB
|
## ELB
|
||||||
variable "dd_aws_elb" {
|
variable "dd_aws_elb" {
|
||||||
default = "disable"
|
default = "disable"
|
||||||
@ -78,3 +80,14 @@ variable "elb_backend_latency" {
|
|||||||
critical = 5000
|
critical = 5000
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
##apache nginx php
|
||||||
|
variable "dd_apache_basics" {
|
||||||
|
default = "disabled"
|
||||||
|
}
|
||||||
|
variable "dd_nginx_basics" {
|
||||||
|
default = "disabled"
|
||||||
|
}
|
||||||
|
variable "dd_php_basics" {
|
||||||
|
default = "disabled"
|
||||||
|
}
|
||||||
26
monitors-nginx-basics.tf
Normal file
26
monitors-nginx-basics.tf
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
resource "datadog_monitor" "Nginx_process" {
|
||||||
|
name = "Nginx process is down on {{host.name}}"
|
||||||
|
message = "{{#is_alert}}\n${var.hno_escalation_group} \n{{/is_alert}} \n{{#is_recovery}}\n${var.hno_escalation_group}\n{{/is_recovery}}\n{{#is_warning}}\n${var.ho_escalation_group} \n{{/is_warning}} \n{{#is_warning_recovery}}\n${var.ho_escalation_group}\n{{/is_warning_recovery}}"
|
||||||
|
|
||||||
|
|
||||||
|
type = "service check"
|
||||||
|
query = "\"process.up\".over(\"dd_monitoring:enabled"\,\"process:nginx\").exclude(\"dd_custom_nginx:enabled\").last(4).count_by_status()"
|
||||||
|
count = "${var.dd_nginx_basics == "true" ? 1 : 0 }"
|
||||||
|
|
||||||
|
thresholds = {
|
||||||
|
ok = 1
|
||||||
|
warning = 2
|
||||||
|
critical = 4
|
||||||
|
}
|
||||||
|
|
||||||
|
notify_no_data = false
|
||||||
|
notify_audit = false
|
||||||
|
timeout_h = 0
|
||||||
|
include_tags = true
|
||||||
|
locked = false
|
||||||
|
require_full_window = true
|
||||||
|
new_host_delay = 300
|
||||||
|
notify_no_data = false
|
||||||
|
renotify_interval = 0
|
||||||
|
no_data_timeframe = 20
|
||||||
|
}
|
||||||
27
monitors-php-basics.tf
Normal file
27
monitors-php-basics.tf
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
resource "datadog_monitor" "php-fpm_process_idle" {
|
||||||
|
name = "php_fpm busy worker > 99% on {{host.name}}"
|
||||||
|
message = "{{#is_alert}}\n${var.hno_escalation_group} \n{{/is_alert}} \n{{#is_recovery}}\n${var.hno_escalation_group}\n{{/is_recovery}}\n{{#is_warning}}\n${var.ho_escalation_group} \n{{/is_warning}} \n{{#is_warning_recovery}}\n${var.ho_escalation_group}\n{{/is_warning_recovery}}"
|
||||||
|
|
||||||
|
|
||||||
|
type = "service check"
|
||||||
|
query = "avg(last_10m):avg:php_fpm.processes.active{\"dd_monitoring:enabled\",\"dd_php_basics:enabled\",\"!dd_custom_php:enabled\"} by {host} / ( avg:php_fpm.processes.idle{\"dd_monitoring:enabled\",\"dd_php_basics:enabled\",\"!dd_custom_php:enabled\"} by {host} + avg:php_fpm.processes.active{\"dd_monitoring:enabled\",\"dd_php_basics:enabled\",\"!dd_custom_php:enabled\"} by {host} ) > 0.99"
|
||||||
|
count = "${var.dd_php_basics == "true" ? 1 : 0 }"
|
||||||
|
|
||||||
|
thresholds {
|
||||||
|
warning = 0.95
|
||||||
|
critical = 0.99
|
||||||
|
}
|
||||||
|
|
||||||
|
notify_no_data = false
|
||||||
|
renotify_interval = 60
|
||||||
|
notify_audit = false
|
||||||
|
timeout_h = 0
|
||||||
|
include_tags = true
|
||||||
|
locked = false
|
||||||
|
require_full_window = true
|
||||||
|
new_host_delay = 300
|
||||||
|
renotify_interval = 0
|
||||||
|
no_data_timeframe = 20
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
Loading…
x
Reference in New Issue
Block a user