Merge branch 'MON-360_fix_enabled_feature' into 'master'
MON-360 fix enabled feature Closes MON-360 See merge request claranet/pt-monitoring/projects/datadog/terraform/monitors!49
This commit is contained in:
commit
84df039053
@ -1,5 +1,5 @@
|
||||
resource "datadog_monitor" "ark_schedules_monitor" {
|
||||
count = "${var.ark_schedules_enabled ? 1 : 0}"
|
||||
count = "${var.ark_schedules_enabled == "true" ? 1 : 0}"
|
||||
name = "[${var.environment}] Ark backup failed"
|
||||
type = "metric alert"
|
||||
message = "${coalesce(var.ark_schedules_monitor_message, var.message)}"
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
resource "datadog_monitor" "nginx_ingress_too_many_5xx" {
|
||||
count = "${var.ingress_5xx_enabled ? 1 : 0}"
|
||||
count = "${var.ingress_5xx_enabled == "true" ? 1 : 0}"
|
||||
name = "[${var.environment}] Nginx Ingress 5xx errors {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}"
|
||||
message = "${coalesce(var.ingress_5xx_message, var.message)}"
|
||||
|
||||
@ -33,7 +33,7 @@ resource "datadog_monitor" "nginx_ingress_too_many_5xx" {
|
||||
}
|
||||
|
||||
resource "datadog_monitor" "nginx_ingress_too_many_4xx" {
|
||||
count = "${var.ingress_4xx_enabled ? 1 : 0}"
|
||||
count = "${var.ingress_4xx_enabled == "true" ? 1 : 0}"
|
||||
name = "[${var.environment}] Nginx Ingress 4xx errors {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}"
|
||||
message = "${coalesce(var.ingress_4xx_message, var.message)}"
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
resource "datadog_monitor" "ALB_no_healthy_instances" {
|
||||
count = "${var.alb_no_healthy_instances_enabled ? 1 : 0}"
|
||||
count = "${var.alb_no_healthy_instances_enabled == "true" ? 1 : 0}"
|
||||
name = "[${var.environment}] ALB healthy instances {{#is_alert}}is at 0{{/is_alert}}{{#is_warning}}is at {{value}}%{{/is_warning}}"
|
||||
type = "metric alert"
|
||||
message = "${coalesce(var.alb_no_healthy_instances_message, var.message)}"
|
||||
@ -32,7 +32,7 @@ resource "datadog_monitor" "ALB_no_healthy_instances" {
|
||||
}
|
||||
|
||||
resource "datadog_monitor" "ALB_latency" {
|
||||
count = "${var.latency_enabled ? 1 : 0}"
|
||||
count = "${var.latency_enabled == "true" ? 1 : 0}"
|
||||
name = "[${var.environment}] ALB latency {{#is_alert}}{{{comparator}}} {{threshold}}s ({{value}}s){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}s ({{value}}s){{/is_warning}}"
|
||||
type = "metric alert"
|
||||
message = "${coalesce(var.latency_message, var.message)}"
|
||||
@ -63,7 +63,7 @@ resource "datadog_monitor" "ALB_latency" {
|
||||
}
|
||||
|
||||
resource "datadog_monitor" "ALB_httpcode_5xx" {
|
||||
count = "${var.httpcode_alb_5xx_enabled ? 1 : 0}"
|
||||
count = "${var.httpcode_alb_5xx_enabled == "true" ? 1 : 0}"
|
||||
name = "[${var.environment}] ALB HTTP code 5xx {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}"
|
||||
type = "metric alert"
|
||||
message = "${coalesce(var.httpcode_alb_5xx_message, var.message)}"
|
||||
@ -95,7 +95,7 @@ resource "datadog_monitor" "ALB_httpcode_5xx" {
|
||||
}
|
||||
|
||||
resource "datadog_monitor" "ALB_httpcode_4xx" {
|
||||
count = "${var.httpcode_alb_4xx_enabled ? 1 : 0}"
|
||||
count = "${var.httpcode_alb_4xx_enabled == "true" ? 1 : 0}"
|
||||
name = "[${var.environment}] ALB HTTP code 4xx {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}"
|
||||
type = "metric alert"
|
||||
message = "${coalesce(var.httpcode_alb_4xx_message, var.message)}"
|
||||
@ -127,7 +127,7 @@ resource "datadog_monitor" "ALB_httpcode_4xx" {
|
||||
}
|
||||
|
||||
resource "datadog_monitor" "ALB_httpcode_target_5xx" {
|
||||
count = "${var.httpcode_target_5xx_enabled ? 1 : 0}"
|
||||
count = "${var.httpcode_target_5xx_enabled == "true" ? 1 : 0}"
|
||||
name = "[${var.environment}] ALB target HTTP code 5xx {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}"
|
||||
type = "metric alert"
|
||||
message = "${coalesce(var.httpcode_target_5xx_message, var.message)}"
|
||||
@ -159,7 +159,7 @@ resource "datadog_monitor" "ALB_httpcode_target_5xx" {
|
||||
}
|
||||
|
||||
resource "datadog_monitor" "ALB_httpcode_target_4xx" {
|
||||
count = "${var.httpcode_target_4xx_enabled ? 1 : 0}"
|
||||
count = "${var.httpcode_target_4xx_enabled == "true" ? 1 : 0}"
|
||||
name = "[${var.environment}] ALB target HTTP code 4xx {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}"
|
||||
type = "metric alert"
|
||||
message = "${coalesce(var.httpcode_target_4xx_message, var.message)}"
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
# Monitoring Api Gateway latency
|
||||
resource "datadog_monitor" "API_Gateway_latency" {
|
||||
count = "${var.latency_enabled ? 1 : 0}"
|
||||
count = "${var.latency_enabled == "true" ? 1 : 0}"
|
||||
name = "[${var.environment}] API Gateway latency {{#is_alert}}{{{comparator}}} {{threshold}}ms ({{value}}ms){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}ms ({{value}}ms){{/is_warning}}"
|
||||
type = "metric alert"
|
||||
message = "${coalesce(var.latency_message, var.message)}"
|
||||
@ -32,7 +32,7 @@ resource "datadog_monitor" "API_Gateway_latency" {
|
||||
|
||||
# Monitoring API Gateway 5xx errors percent
|
||||
resource "datadog_monitor" "API_http_5xx_errors_count" {
|
||||
count = "${var.http_5xx_requests_enabled ? 1 : 0}"
|
||||
count = "${var.http_5xx_requests_enabled == "true" ? 1 : 0}"
|
||||
name = "[${var.environment}] API Gateway HTTP 5xx errors {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}"
|
||||
type = "metric alert"
|
||||
message = "${coalesce(var.http_5xx_requests_message, var.message)}"
|
||||
@ -65,7 +65,7 @@ resource "datadog_monitor" "API_http_5xx_errors_count" {
|
||||
|
||||
# Monitoring API Gateway 4xx errors percent
|
||||
resource "datadog_monitor" "API_http_4xx_errors_count" {
|
||||
count = "${var.http_4xx_requests_enabled ? 1 : 0}"
|
||||
count = "${var.http_4xx_requests_enabled == "true" ? 1 : 0}"
|
||||
name = "[${var.environment}] API Gateway HTTP 4xx errors {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}"
|
||||
type = "metric alert"
|
||||
message = "${coalesce(var.http_4xx_requests_message, var.message)}"
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
resource "datadog_monitor" "elasticache_eviction" {
|
||||
count = "${var.eviction_enabled ? 1 : 0}"
|
||||
count = "${var.eviction_enabled == "true" ? 1 : 0}"
|
||||
name = "[${var.environment}] Elasticache eviction {{#is_alert}}{{{comparator}}} {{threshold}} ({{value}}){{/is_alert}}"
|
||||
message = "${coalesce(var.eviction_message, var.message)}"
|
||||
|
||||
@ -32,7 +32,7 @@ resource "datadog_monitor" "elasticache_eviction" {
|
||||
}
|
||||
|
||||
resource "datadog_monitor" "elasticache_max_connection" {
|
||||
count = "${var.max_connection_enabled ? 1 : 0}"
|
||||
count = "${var.max_connection_enabled == "true" ? 1 : 0}"
|
||||
name = "[${var.environment}] Elasticache max connections reached {{#is_alert}}{{{comparator}}} {{threshold}} {{/is_alert}}"
|
||||
message = "${coalesce(var.max_connection_message, var.message)}"
|
||||
|
||||
@ -60,7 +60,7 @@ resource "datadog_monitor" "elasticache_max_connection" {
|
||||
}
|
||||
|
||||
resource "datadog_monitor" "elasticache_no_connection" {
|
||||
count = "${var.no_connection_enabled ? 1 : 0}"
|
||||
count = "${var.no_connection_enabled == "true" ? 1 : 0}"
|
||||
name = "[${var.environment}] Elasticache connections {{#is_alert}}{{{comparator}}} {{threshold}} {{/is_alert}}"
|
||||
message = "${coalesce(var.no_connection_message, var.message)}"
|
||||
|
||||
@ -88,7 +88,7 @@ resource "datadog_monitor" "elasticache_no_connection" {
|
||||
}
|
||||
|
||||
resource "datadog_monitor" "elasticache_swap" {
|
||||
count = "${var.swap_enabled ? 1 : 0}"
|
||||
count = "${var.swap_enabled == "true" ? 1 : 0}"
|
||||
name = "[${var.environment}] Elasticache swap {{#is_alert}}{{{comparator}}} {{threshold}}MB ({{value}}MB){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}MB ({{value}}MB){{/is_warning}}"
|
||||
message = "${coalesce(var.swap_message, var.message)}"
|
||||
|
||||
@ -121,7 +121,7 @@ resource "datadog_monitor" "elasticache_swap" {
|
||||
}
|
||||
|
||||
resource "datadog_monitor" "elasticache_free_memory" {
|
||||
count = "${var.free_memory_enabled ? 1 : 0}"
|
||||
count = "${var.free_memory_enabled == "true" ? 1 : 0}"
|
||||
name = "[${var.environment}] Elasticache free memory {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}"
|
||||
message = "${coalesce(var.free_memory_message, var.message)}"
|
||||
|
||||
@ -154,7 +154,7 @@ resource "datadog_monitor" "elasticache_free_memory" {
|
||||
}
|
||||
|
||||
resource "datadog_monitor" "elasticache_eviction_growing" {
|
||||
count = "${var.eviction_growing_enabled ? 1 : 0}"
|
||||
count = "${var.eviction_growing_enabled == "true" ? 1 : 0}"
|
||||
name = "[${var.environment}] Elasticache evictions is growing {{#is_alert}}{{{comparator}}} {{threshold}} ({{value}}){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}} ({{value}}){{/is_warning}}"
|
||||
message = "${coalesce(var.eviction_growing_message, var.message)}"
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
resource "datadog_monitor" "memcached_get_hits" {
|
||||
count = "${var.get_hits_enabled ? 1 : 0}"
|
||||
count = "${var.get_hits_enabled == "true" ? 1 : 0}"
|
||||
name = "[${var.environment}] Elasticache memcached cache hit ratio {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}"
|
||||
message = "${coalesce(var.get_hits_message, var.message)}"
|
||||
|
||||
@ -34,7 +34,7 @@ resource "datadog_monitor" "memcached_get_hits" {
|
||||
}
|
||||
|
||||
resource "datadog_monitor" "memcached_cpu_high" {
|
||||
count = "${var.cpu_high_enabled ? 1 : 0}"
|
||||
count = "${var.cpu_high_enabled == "true" ? 1 : 0}"
|
||||
name = "[${var.environment}] Elasticache memcached CPU {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}"
|
||||
message = "${coalesce(var.cpu_high_message, var.message)}"
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
resource "datadog_monitor" "redis_cache_hits" {
|
||||
count = "${var.cache_hits_enabled ? 1 : 0}"
|
||||
count = "${var.cache_hits_enabled == "true" ? 1 : 0}"
|
||||
name = "[${var.environment}] Elasticache redis cache hit ratio {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}"
|
||||
message = "${coalesce(var.cache_hits_message, var.message)}"
|
||||
|
||||
@ -34,7 +34,7 @@ resource "datadog_monitor" "redis_cache_hits" {
|
||||
}
|
||||
|
||||
resource "datadog_monitor" "redis_cpu_high" {
|
||||
count = "${var.cpu_high_enabled ? 1 : 0}"
|
||||
count = "${var.cpu_high_enabled == "true" ? 1 : 0}"
|
||||
name = "[${var.environment}] Elasticache redis CPU {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}"
|
||||
message = "${coalesce(var.cpu_high_message, var.message)}"
|
||||
|
||||
@ -62,7 +62,7 @@ resource "datadog_monitor" "redis_cpu_high" {
|
||||
}
|
||||
|
||||
resource "datadog_monitor" "redis_replication_lag" {
|
||||
count = "${var.replication_lag_enabled ? 1 : 0}"
|
||||
count = "${var.replication_lag_enabled == "true" ? 1 : 0}"
|
||||
name = "[${var.environment}] Elasticache redis replication lag {{#is_alert}}{{{comparator}}} {{threshold}}s ({{value}}s){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}s ({{value}}s){{/is_warning}}"
|
||||
message = "${coalesce(var.replication_lag_message, var.message)}"
|
||||
|
||||
@ -95,7 +95,7 @@ resource "datadog_monitor" "redis_replication_lag" {
|
||||
}
|
||||
|
||||
resource "datadog_monitor" "redis_commands" {
|
||||
count = "${var.commands_enabled ? 1 : 0}"
|
||||
count = "${var.commands_enabled == "true" ? 1 : 0}"
|
||||
name = "[${var.environment}] Elasticache redis is receiving no commands"
|
||||
message = "${coalesce(var.commands_message, var.message)}"
|
||||
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
- If aws.es.cluster_statusyellow is 1 --> 1 < query value (=1.1) < 2 : warning
|
||||
Workaround : in the query, we add "0.1" to the result and we use the comparator ">=". No alert was triggered without that. */
|
||||
resource "datadog_monitor" "es_cluster_status" {
|
||||
count = "${var.es_cluster_status_enabled ? 1 : 0}"
|
||||
count = "${var.es_cluster_status_enabled == "true" ? 1 : 0}"
|
||||
name = "[${var.environment}] ElasticSearch cluster status is not green"
|
||||
message = "${coalesce(var.es_cluster_status_message, var.message)}"
|
||||
|
||||
@ -39,7 +39,7 @@ EOF
|
||||
|
||||
### Elasticsearch cluster free storage space monitor ###
|
||||
resource "datadog_monitor" "es_free_space_low" {
|
||||
count = "${var.diskspace_enabled ? 1 : 0}"
|
||||
count = "${var.diskspace_enabled == "true" ? 1 : 0}"
|
||||
name = "[${var.environment}] ElasticSearch cluster free storage space {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}"
|
||||
message = "${coalesce(var.diskspace_message, var.message)}"
|
||||
|
||||
@ -74,7 +74,7 @@ EOF
|
||||
|
||||
### Elasticsearch cluster CPU monitor ###
|
||||
resource "datadog_monitor" "es_cpu_90_15min" {
|
||||
count = "${var.cpu_enabled ? 1 : 0}"
|
||||
count = "${var.cpu_enabled == "true" ? 1 : 0}"
|
||||
name = "[${var.environment}] ElasticSearch cluster CPU high {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}"
|
||||
message = "${coalesce(var.cpu_message, var.message)}"
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
resource "datadog_monitor" "ELB_no_healthy_instances" {
|
||||
count = "${var.elb_no_healthy_instance_enabled ? 1 : 0}"
|
||||
count = "${var.elb_no_healthy_instance_enabled == "true" ? 1 : 0}"
|
||||
name = "[${var.environment}] ELB healthy instances {{#is_alert}}is at 0{{/is_alert}}{{#is_warning}}is at {{value}}%{{/is_warning}}"
|
||||
message = "${coalesce(var.elb_no_healthy_instance_message, var.message)}"
|
||||
|
||||
@ -34,7 +34,7 @@ resource "datadog_monitor" "ELB_no_healthy_instances" {
|
||||
}
|
||||
|
||||
resource "datadog_monitor" "ELB_too_much_4xx" {
|
||||
count = "${var.elb_4xx_enabled ? 1 : 0}"
|
||||
count = "${var.elb_4xx_enabled == "true" ? 1 : 0}"
|
||||
name = "[${var.environment}] ELB 4xx errors too high {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}"
|
||||
message = "${coalesce(var.elb_4xx_message, var.message)}"
|
||||
|
||||
@ -68,7 +68,7 @@ resource "datadog_monitor" "ELB_too_much_4xx" {
|
||||
}
|
||||
|
||||
resource "datadog_monitor" "ELB_too_much_5xx" {
|
||||
count = "${var.elb_5xx_enabled ? 1 : 0}"
|
||||
count = "${var.elb_5xx_enabled == "true" ? 1 : 0}"
|
||||
name = "[${var.environment}] ELB 5xx errors too high {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}"
|
||||
message = "${coalesce(var.elb_5xx_message, var.message)}"
|
||||
|
||||
@ -102,7 +102,7 @@ resource "datadog_monitor" "ELB_too_much_5xx" {
|
||||
}
|
||||
|
||||
resource "datadog_monitor" "ELB_too_much_4xx_backend" {
|
||||
count = "${var.elb_backend_4xx_enabled ? 1 : 0}"
|
||||
count = "${var.elb_backend_4xx_enabled == "true" ? 1 : 0}"
|
||||
name = "[${var.environment}] ELB backend 4xx errors too high {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}"
|
||||
message = "${coalesce(var.elb_backend_4xx_message, var.message)}"
|
||||
|
||||
@ -136,7 +136,7 @@ resource "datadog_monitor" "ELB_too_much_4xx_backend" {
|
||||
}
|
||||
|
||||
resource "datadog_monitor" "ELB_too_much_5xx_backend" {
|
||||
count = "${var.elb_backend_5xx_enabled ? 1 : 0}"
|
||||
count = "${var.elb_backend_5xx_enabled == "true" ? 1 : 0}"
|
||||
name = "[${var.environment}] ELB backend 5xx errors too high {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}"
|
||||
message = "${coalesce(var.elb_backend_5xx_message, var.message)}"
|
||||
|
||||
@ -170,7 +170,7 @@ resource "datadog_monitor" "ELB_too_much_5xx_backend" {
|
||||
}
|
||||
|
||||
resource "datadog_monitor" "ELB_backend_latency" {
|
||||
count = "${var.elb_backend_latency_enabled ? 1 : 0}"
|
||||
count = "${var.elb_backend_latency_enabled == "true" ? 1 : 0}"
|
||||
name = "[${var.environment}] ELB latency too high {{#is_alert}}{{{comparator}}} {{threshold}}s ({{value}}s){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}s ({{value}}s){{/is_warning}}"
|
||||
message = "${coalesce(var.elb_backend_latency_message, var.message)}"
|
||||
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
### Kinesis Firehose Incoming records ###
|
||||
resource "datadog_monitor" "firehose_incoming_records" {
|
||||
count = "${var.incoming_records_enabled ? 1 : 0}"
|
||||
count = "${var.incoming_records_enabled == "true" ? 1 : 0}"
|
||||
name = "[${var.environment}] Kinesis Firehose No incoming records"
|
||||
message = "${coalesce(var.incoming_records_message, var.message)}"
|
||||
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
### RDS Aurora Mysql Replica Lag monitor ###
|
||||
resource "datadog_monitor" "rds_aurora_mysql_replica_lag" {
|
||||
count = "${var.aurora_replicalag_enabled ? 1 : 0}"
|
||||
count = "${var.aurora_replicalag_enabled == "true" ? 1 : 0}"
|
||||
name = "[${var.environment}] RDS Aurora Mysql replica lag {{#is_alert}}{{{comparator}}} {{threshold}} ms ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}} ms ({{value}}%){{/is_warning}}"
|
||||
message = "${coalesce(var.aurora_replicalag_message, var.message)}"
|
||||
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
### RDS Aurora Postgresql Replica Lag monitor ###
|
||||
resource "datadog_monitor" "rds_aurora_postgresql_replica_lag" {
|
||||
count = "${var.aurora_replicalag_enabled ? 1 : 0}"
|
||||
count = "${var.aurora_replicalag_enabled == "true" ? 1 : 0}"
|
||||
name = "[${var.environment}] RDS Aurora PostgreSQL replica lag {{#is_alert}}{{{comparator}}} {{threshold}} ms ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}} ms ({{value}}%){{/is_warning}}"
|
||||
message = "${coalesce(var.aurora_replicalag_message, var.message)}"
|
||||
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
### RDS instance CPU monitor ###
|
||||
resource "datadog_monitor" "rds_cpu_90_15min" {
|
||||
count = "${var.cpu_enabled ? 1 : 0}"
|
||||
count = "${var.cpu_enabled == "true" ? 1 : 0}"
|
||||
name = "[${var.environment}] RDS instance CPU high {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}"
|
||||
message = "${coalesce(var.cpu_message, var.message)}"
|
||||
|
||||
@ -33,7 +33,7 @@ EOF
|
||||
|
||||
### RDS instance free space monitor ###
|
||||
resource "datadog_monitor" "rds_free_space_low" {
|
||||
count = "${var.diskspace_enabled ? 1 : 0}"
|
||||
count = "${var.diskspace_enabled == "true" ? 1 : 0}"
|
||||
name = "[${var.environment}] RDS instance free space {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}"
|
||||
message = "${coalesce(var.diskspace_message, var.message)}"
|
||||
|
||||
@ -67,7 +67,7 @@ EOF
|
||||
|
||||
### RDS Replica Lag monitor ###
|
||||
resource "datadog_monitor" "rds_replica_lag" {
|
||||
count = "${var.replicalag_enabled ? 1 : 0}"
|
||||
count = "${var.replicalag_enabled == "true" ? 1 : 0}"
|
||||
name = "[${var.environment}] RDS replica lag {{#is_alert}}{{{comparator}}} {{threshold}} ms ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}} ms ({{value}}%){{/is_warning}}"
|
||||
message = "${coalesce(var.replicalag_message, var.message)}"
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
resource "datadog_monitor" "VPN_status" {
|
||||
count = "${var.vpn_status_enabled ? 1 : 0}"
|
||||
count = "${var.vpn_status_enabled == "true" ? 1 : 0}"
|
||||
name = "[${var.environment}] VPN tunnel down"
|
||||
message = "${coalesce(var.vpn_status_message, var.message)}"
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
resource "datadog_monitor" "apimgt_status" {
|
||||
count = "${var.status_enabled ? 1 : 0}"
|
||||
count = "${var.status_enabled == "true" ? 1 : 0}"
|
||||
name = "[${var.environment}] API Management is down"
|
||||
message = "${coalesce(var.status_message, var.message)}"
|
||||
|
||||
@ -29,7 +29,7 @@ resource "datadog_monitor" "apimgt_status" {
|
||||
}
|
||||
|
||||
resource "datadog_monitor" "apimgt_failed_requests" {
|
||||
count = "${var.failed_requests_enabled ? 1 : 0}"
|
||||
count = "${var.failed_requests_enabled == "true" ? 1 : 0}"
|
||||
name = "[${var.environment}] API Management too many failed requests {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}"
|
||||
message = "${coalesce(var.failed_requests_message, var.message)}"
|
||||
|
||||
@ -62,7 +62,7 @@ resource "datadog_monitor" "apimgt_failed_requests" {
|
||||
}
|
||||
|
||||
resource "datadog_monitor" "apimgt_other_requests" {
|
||||
count = "${var.other_requests_enabled ? 1 : 0}"
|
||||
count = "${var.other_requests_enabled == "true" ? 1 : 0}"
|
||||
name = "[${var.environment}] API Management too many other requests {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}"
|
||||
message = "${coalesce(var.other_requests_message, var.message)}"
|
||||
|
||||
@ -95,7 +95,7 @@ resource "datadog_monitor" "apimgt_other_requests" {
|
||||
}
|
||||
|
||||
resource "datadog_monitor" "apimgt_unauthorized_requests" {
|
||||
count = "${var.unauthorized_requests_enabled ? 1 : 0}"
|
||||
count = "${var.unauthorized_requests_enabled == "true" ? 1 : 0}"
|
||||
name = "[${var.environment}] API Management too many unauthorized requests {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}"
|
||||
message = "${coalesce(var.unauthorized_requests_message, var.message)}"
|
||||
|
||||
@ -128,7 +128,7 @@ resource "datadog_monitor" "apimgt_unauthorized_requests" {
|
||||
}
|
||||
|
||||
resource "datadog_monitor" "apimgt_successful_requests" {
|
||||
count = "${var.successful_requests_enabled ? 1 : 0}"
|
||||
count = "${var.successful_requests_enabled == "true" ? 1 : 0}"
|
||||
name = "[${var.environment}] API Management successful requests rate too low {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}"
|
||||
message = "${coalesce(var.successful_requests_message, var.message)}"
|
||||
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
# Monitoring App Services response time
|
||||
resource "datadog_monitor" "appservices_response_time" {
|
||||
count = "${var.response_time_enabled ? 1 : 0}"
|
||||
count = "${var.response_time_enabled == "true" ? 1 : 0}"
|
||||
name = "[${var.environment}] App Services response time too high {{#is_alert}}{{{comparator}}} {{threshold}}s ({{value}}s){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}s ({{value}}s){{/is_warning}}"
|
||||
type = "metric alert"
|
||||
message = "${coalesce(var.response_time_message, var.message)}"
|
||||
@ -32,7 +32,7 @@ resource "datadog_monitor" "appservices_response_time" {
|
||||
|
||||
# Monitoring App Services memory usage
|
||||
resource "datadog_monitor" "appservices_memory_usage_count" {
|
||||
count = "${var.memory_usage_enabled ? 1 : 0}"
|
||||
count = "${var.memory_usage_enabled == "true" ? 1 : 0}"
|
||||
name = "[${var.environment}] App Services memory usage {{#is_alert}}{{{comparator}}} {{threshold}} ({{value}}){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}} ({{value}}){{/is_warning}}"
|
||||
type = "metric alert"
|
||||
message = "${coalesce(var.memory_usage_message, var.message)}"
|
||||
@ -64,7 +64,7 @@ resource "datadog_monitor" "appservices_memory_usage_count" {
|
||||
|
||||
# Monitoring App Services 5xx errors percent
|
||||
resource "datadog_monitor" "appservices_http_5xx_errors_count" {
|
||||
count = "${var.http_5xx_requests_enabled ? 1 : 0}"
|
||||
count = "${var.http_5xx_requests_enabled == "true" ? 1 : 0}"
|
||||
name = "[${var.environment}] App Services HTTP 5xx errors too high {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}"
|
||||
type = "metric alert"
|
||||
message = "${coalesce(var.http_5xx_requests_message, var.message)}"
|
||||
@ -97,7 +97,7 @@ resource "datadog_monitor" "appservices_http_5xx_errors_count" {
|
||||
|
||||
# Monitoring App Services 4xx errors percent
|
||||
resource "datadog_monitor" "appservices_http_4xx_errors_count" {
|
||||
count = "${var.http_4xx_requests_enabled ? 1 : 0}"
|
||||
count = "${var.http_4xx_requests_enabled == "true" ? 1 : 0}"
|
||||
name = "[${var.environment}] App Services HTTP 4xx errors too high {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}"
|
||||
type = "metric alert"
|
||||
message = "${coalesce(var.http_4xx_requests_message, var.message)}"
|
||||
@ -130,7 +130,7 @@ resource "datadog_monitor" "appservices_http_4xx_errors_count" {
|
||||
|
||||
# Monitoring App Services HTTP 2xx & 3xx status pages percent
|
||||
resource "datadog_monitor" "appservices_http_success_status_rate" {
|
||||
count = "${var.http_successful_requests_enabled ? 1 : 0}"
|
||||
count = "${var.http_successful_requests_enabled == "true" ? 1 : 0}"
|
||||
name = "[${var.environment}] App Services HTTP successful responses too low {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}"
|
||||
type = "metric alert"
|
||||
message = "${coalesce(var.http_successful_requests_message, var.message)}"
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
# Monitoring Azure Search latency
|
||||
resource "datadog_monitor" "azure_search_latency" {
|
||||
count = "${var.latency_enabled ? 1 : 0}"
|
||||
count = "${var.latency_enabled == "true" ? 1 : 0}"
|
||||
name = "[${var.environment}] Azure Search latency too high {{#is_alert}}{{{comparator}}} {{threshold}}s ({{value}}s){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}s ({{value}}s){{/is_warning}}"
|
||||
type = "metric alert"
|
||||
message = "${coalesce(var.latency_message, var.message)}"
|
||||
@ -32,7 +32,7 @@ resource "datadog_monitor" "azure_search_latency" {
|
||||
|
||||
# Monitoring Azure Search throttled queries
|
||||
resource "datadog_monitor" "azure_search_throttled_queries_rate" {
|
||||
count = "${var.throttled_queries_rate_enabled ? 1 : 0}"
|
||||
count = "${var.throttled_queries_rate_enabled == "true" ? 1 : 0}"
|
||||
name = "[${var.environment}] Azure Search throttled queries rate is too high {{#is_alert}}{{{comparator}}} {{threshold}}s ({{value}}s){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}s ({{value}}s){{/is_warning}}"
|
||||
type = "metric alert"
|
||||
message = "${coalesce(var.throttled_queries_rate_message, var.message)}"
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
resource "datadog_monitor" "cosmos_db_status" {
|
||||
count = "${var.status_enabled ? 1 : 0}"
|
||||
count = "${var.status_enabled == "true" ? 1 : 0}"
|
||||
|
||||
name = "[${var.environment}] Cosmos DB is down"
|
||||
message = "${coalesce(var.status_message, var.message)}"
|
||||
@ -32,7 +32,7 @@ resource "datadog_monitor" "cosmos_db_status" {
|
||||
}
|
||||
|
||||
resource "datadog_monitor" "cosmos_db_4xx_requests" {
|
||||
count = "${var.cosmos_db_4xx_requests_enabled ? 1 : 0}"
|
||||
count = "${var.cosmos_db_4xx_requests_enabled == "true" ? 1 : 0}"
|
||||
|
||||
name = "[${var.environment}] Cosmos DB 4xx requests rate is high {{#is_alert}}{{comparator}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{comparator}} {{warn_threshold}}% ({{value}}%){{/is_warning}}"
|
||||
message = "${coalesce(var.cosmos_db_4xx_requests_message, var.message)}"
|
||||
@ -77,7 +77,7 @@ resource "datadog_monitor" "cosmos_db_4xx_requests" {
|
||||
}
|
||||
|
||||
resource "datadog_monitor" "cosmos_db_5xx_requests" {
|
||||
count = "${var.cosmos_db_5xx_requests_enabled ? 1 : 0}"
|
||||
count = "${var.cosmos_db_5xx_requests_enabled == "true" ? 1 : 0}"
|
||||
|
||||
name = "[${var.environment}] Cosmos DB 5xx requests rate is high {{#is_alert}}{{comparator}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{comparator}} {{warn_threshold}}% ({{value}}%){{/is_warning}}"
|
||||
message = "${coalesce(var.cosmos_db_5xx_requests_message, var.message)}"
|
||||
@ -113,7 +113,7 @@ resource "datadog_monitor" "cosmos_db_5xx_requests" {
|
||||
}
|
||||
|
||||
resource "datadog_monitor" "cosmos_db_scaling" {
|
||||
count = "${var.cosmos_db_scaling_enabled ? 1 : 0}"
|
||||
count = "${var.cosmos_db_scaling_enabled == "true" ? 1 : 0}"
|
||||
|
||||
name = "[${var.environment}] Cosmos DB max scaling reached for collection {{#is_alert}}{{comparator}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{comparator}} {{warn_threshold}}% ({{value}}%){{/is_warning}}"
|
||||
message = "${coalesce(var.cosmos_db_scaling_message, var.message)}"
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
resource "datadog_monitor" "datalakestore_status" {
|
||||
count = "${var.status_enabled ? 1 : 0}"
|
||||
count = "${var.status_enabled == "true" ? 1 : 0}"
|
||||
|
||||
name = "[${var.environment}] Datalake Store is down"
|
||||
message = "${coalesce(var.status_message, var.message)}"
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
resource "datadog_monitor" "eventgrid_no_successful_message" {
|
||||
count = "${var.no_successful_message_rate_enabled ? 1 : 0}"
|
||||
count = "${var.no_successful_message_rate_enabled == "true" ? 1 : 0}"
|
||||
name = "[${var.environment}] Event Grid no successful message {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}"
|
||||
message = "${coalesce(var.no_successful_message_rate_message, var.message)}"
|
||||
|
||||
@ -27,7 +27,7 @@ resource "datadog_monitor" "eventgrid_no_successful_message" {
|
||||
}
|
||||
|
||||
resource "datadog_monitor" "eventgrid_failed_messages" {
|
||||
count = "${var.failed_messages_rate_enabled ? 1 : 0}"
|
||||
count = "${var.failed_messages_rate_enabled == "true" ? 1 : 0}"
|
||||
name = "[${var.environment}] Event Grid too many failed messages {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}"
|
||||
message = "${coalesce(var.failed_messages_rate_message, var.message)}"
|
||||
|
||||
@ -64,7 +64,7 @@ resource "datadog_monitor" "eventgrid_failed_messages" {
|
||||
}
|
||||
|
||||
resource "datadog_monitor" "eventgrid_unmatched_events" {
|
||||
count = "${var.unmatched_events_rate_enabled ? 1 : 0}"
|
||||
count = "${var.unmatched_events_rate_enabled == "true" ? 1 : 0}"
|
||||
name = "[${var.environment}] Event Grid too many unmatched events {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}"
|
||||
message = "${coalesce(var.unmatched_events_rate_message, var.message)}"
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
resource "datadog_monitor" "eventhub_status" {
|
||||
count = "${var.status_enabled ? 1 : 0}"
|
||||
count = "${var.status_enabled == "true" ? 1 : 0}"
|
||||
name = "[${var.environment}] Event Hub is down"
|
||||
message = "${coalesce(var.status_message, var.message)}"
|
||||
|
||||
@ -27,7 +27,7 @@ resource "datadog_monitor" "eventhub_status" {
|
||||
}
|
||||
|
||||
resource "datadog_monitor" "eventhub_failed_requests" {
|
||||
count = "${var.failed_requests_rate_enabled ? 1 : 0}"
|
||||
count = "${var.failed_requests_rate_enabled == "true" ? 1 : 0}"
|
||||
name = "[${var.environment}] Event Hub too many failed requests {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}"
|
||||
message = "${coalesce(var.failed_requests_rate_message, var.message)}"
|
||||
|
||||
@ -61,7 +61,7 @@ resource "datadog_monitor" "eventhub_failed_requests" {
|
||||
}
|
||||
|
||||
resource "datadog_monitor" "eventhub_errors" {
|
||||
count = "${var.errors_rate_enabled ? 1 : 0}"
|
||||
count = "${var.errors_rate_enabled == "true" ? 1 : 0}"
|
||||
name = "[${var.environment}] Event Hub too many errors {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}"
|
||||
message = "${coalesce(var.errors_rate_message, var.message)}"
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
resource "datadog_monitor" "function_http_5xx_errors_rate" {
|
||||
count = "${var.http_5xx_errors_rate_enabled ? 1 : 0}"
|
||||
count = "${var.http_5xx_errors_rate_enabled == "true" ? 1 : 0}"
|
||||
name = "[${var.environment}] Function App HTTP 5xx errors too high {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}"
|
||||
type = "metric alert"
|
||||
message = "${coalesce(var.http_5xx_errors_rate_message, var.message)}"
|
||||
@ -31,7 +31,7 @@ resource "datadog_monitor" "function_http_5xx_errors_rate" {
|
||||
}
|
||||
|
||||
resource "datadog_monitor" "function_high_connections_count" {
|
||||
count = "${var.high_connections_count_enabled ? 1 : 0}"
|
||||
count = "${var.high_connections_count_enabled == "true" ? 1 : 0}"
|
||||
name = "[${var.environment}] Function App connections count too high {{#is_alert}}{{{comparator}}} {{threshold}} ({{value}}){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}} ({{value}}){{/is_warning}}"
|
||||
type = "metric alert"
|
||||
message = "${coalesce(var.high_connections_count_message, var.message)}"
|
||||
@ -62,7 +62,7 @@ resource "datadog_monitor" "function_high_connections_count" {
|
||||
}
|
||||
|
||||
resource "datadog_monitor" "function_high_threads_count" {
|
||||
count = "${var.high_threads_count_enabled ? 1 : 0}"
|
||||
count = "${var.high_threads_count_enabled == "true" ? 1 : 0}"
|
||||
name = "[${var.environment}] Function App threads count too high {{#is_alert}}{{{comparator}}} {{threshold}} ({{value}}){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}} ({{value}}){{/is_warning}}"
|
||||
type = "metric alert"
|
||||
message = "${coalesce(var.high_threads_count_message, var.message)}"
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
resource "datadog_monitor" "too_many_jobs_failed" {
|
||||
count = "${var.failed_jobs_rate_enabled ? 1 : 0}"
|
||||
count = "${var.failed_jobs_rate_enabled == "true" ? 1 : 0}"
|
||||
name = "[${var.environment}] IOT Hub Too many jobs failed {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}"
|
||||
message = "${coalesce(var.failed_jobs_rate_message, var.message)}"
|
||||
|
||||
@ -35,7 +35,7 @@ resource "datadog_monitor" "too_many_jobs_failed" {
|
||||
}
|
||||
|
||||
resource "datadog_monitor" "too_many_list_jobs_failed" {
|
||||
count = "${var.failed_listjobs_rate_enabled ? 1 : 0}"
|
||||
count = "${var.failed_listjobs_rate_enabled == "true" ? 1 : 0}"
|
||||
name = "[${var.environment}] IOT Hub Too many list_jobs failure {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}"
|
||||
message = "${coalesce(var.failed_listjobs_rate_message, var.message)}"
|
||||
|
||||
@ -71,7 +71,7 @@ resource "datadog_monitor" "too_many_list_jobs_failed" {
|
||||
}
|
||||
|
||||
resource "datadog_monitor" "too_many_query_jobs_failed" {
|
||||
count = "${var.failed_queryjobs_rate_enabled ? 1 : 0}"
|
||||
count = "${var.failed_queryjobs_rate_enabled == "true" ? 1 : 0}"
|
||||
name = "[${var.environment}] IOT Hub Too many query_jobs failed {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}"
|
||||
message = "${coalesce(var.failed_queryjobs_rate_message, var.message)}"
|
||||
|
||||
@ -107,7 +107,7 @@ resource "datadog_monitor" "too_many_query_jobs_failed" {
|
||||
}
|
||||
|
||||
resource "datadog_monitor" "status" {
|
||||
count = "${var.status_enabled ? 1 : 0}"
|
||||
count = "${var.status_enabled == "true" ? 1 : 0}"
|
||||
name = "[${var.environment}] IOT Hub is down"
|
||||
message = "${coalesce(var.status_message, var.message)}"
|
||||
|
||||
@ -135,7 +135,7 @@ resource "datadog_monitor" "status" {
|
||||
}
|
||||
|
||||
resource "datadog_monitor" "total_devices" {
|
||||
count = "${var.total_devices_enabled ? 1 : 0}"
|
||||
count = "${var.total_devices_enabled == "true" ? 1 : 0}"
|
||||
name = "[${var.environment}] IOT Hub Total devices is wrong {{#is_alert}}{{{comparator}}} {{threshold}} ({{value}}){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}} ({{value}}){{/is_warning}}"
|
||||
message = "${coalesce(var.total_devices_message, var.message)}"
|
||||
|
||||
@ -163,7 +163,7 @@ resource "datadog_monitor" "total_devices" {
|
||||
}
|
||||
|
||||
resource "datadog_monitor" "too_many_c2d_methods_failed" {
|
||||
count = "${var.failed_c2d_methods_rate_enabled ? 1 : 0}"
|
||||
count = "${var.failed_c2d_methods_rate_enabled == "true" ? 1 : 0}"
|
||||
name = "[${var.environment}] IOT Hub Too many c2d methods failure {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}"
|
||||
message = "${coalesce(var.failed_c2d_methods_rate_message, var.message)}"
|
||||
|
||||
@ -199,7 +199,7 @@ resource "datadog_monitor" "too_many_c2d_methods_failed" {
|
||||
}
|
||||
|
||||
resource "datadog_monitor" "too_many_c2d_twin_read_failed" {
|
||||
count = "${var.failed_c2d_twin_read_rate_enabled ? 1 : 0}"
|
||||
count = "${var.failed_c2d_twin_read_rate_enabled == "true" ? 1 : 0}"
|
||||
name = "[${var.environment}] IOT Hub Too many c2d twin read failure {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}"
|
||||
message = "${coalesce(var.failed_c2d_twin_read_rate_message, var.message)}"
|
||||
|
||||
@ -235,7 +235,7 @@ resource "datadog_monitor" "too_many_c2d_twin_read_failed" {
|
||||
}
|
||||
|
||||
resource "datadog_monitor" "too_many_c2d_twin_update_failed" {
|
||||
count = "${var.failed_c2d_twin_update_rate_enabled ? 1 : 0}"
|
||||
count = "${var.failed_c2d_twin_update_rate_enabled == "true" ? 1 : 0}"
|
||||
name = "[${var.environment}] IOT Hub Too many c2d twin update failure {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}"
|
||||
message = "${coalesce(var.failed_c2d_twin_update_rate_message, var.message)}"
|
||||
|
||||
@ -271,7 +271,7 @@ resource "datadog_monitor" "too_many_c2d_twin_update_failed" {
|
||||
}
|
||||
|
||||
resource "datadog_monitor" "too_many_d2c_twin_read_failed" {
|
||||
count = "${var.failed_d2c_twin_read_rate_enabled ? 1 : 0}"
|
||||
count = "${var.failed_d2c_twin_read_rate_enabled == "true" ? 1 : 0}"
|
||||
name = "[${var.environment}] IOT Hub Too many d2c twin read failure {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}"
|
||||
message = "${coalesce(var.failed_d2c_twin_read_rate_message, var.message)}"
|
||||
|
||||
@ -307,7 +307,7 @@ resource "datadog_monitor" "too_many_d2c_twin_read_failed" {
|
||||
}
|
||||
|
||||
resource "datadog_monitor" "too_many_d2c_twin_update_failed" {
|
||||
count = "${var.failed_d2c_twin_update_rate_enabled ? 1 : 0}"
|
||||
count = "${var.failed_d2c_twin_update_rate_enabled == "true" ? 1 : 0}"
|
||||
name = "[${var.environment}] IOT Hub Too many d2c twin update failure {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}"
|
||||
message = "${coalesce(var.failed_d2c_twin_update_rate_message, var.message)}"
|
||||
|
||||
@ -343,7 +343,7 @@ resource "datadog_monitor" "too_many_d2c_twin_update_failed" {
|
||||
}
|
||||
|
||||
resource "datadog_monitor" "too_many_d2c_telemetry_egress_dropped" {
|
||||
count = "${var.dropped_d2c_telemetry_egress_enabled ? 1 : 0}"
|
||||
count = "${var.dropped_d2c_telemetry_egress_enabled == "true" ? 1 : 0}"
|
||||
name = "[${var.environment}] IOT Hub Too many d2c telemetry egress dropped {{#is_alert}}{{{comparator}}} {{threshold}} ({{value}}){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}} ({{value}}){{/is_warning}}"
|
||||
message = "${coalesce(var.dropped_d2c_telemetry_egress_message, var.message)}"
|
||||
|
||||
@ -381,7 +381,7 @@ resource "datadog_monitor" "too_many_d2c_telemetry_egress_dropped" {
|
||||
}
|
||||
|
||||
resource "datadog_monitor" "too_many_d2c_telemetry_egress_orphaned" {
|
||||
count = "${var.orphaned_d2c_telemetry_egress_enabled ? 1 : 0}"
|
||||
count = "${var.orphaned_d2c_telemetry_egress_enabled == "true" ? 1 : 0}"
|
||||
name = "[${var.environment}] IOT Hub Too many d2c telemetry egress orphaned {{#is_alert}}{{{comparator}}} {{threshold}} ({{value}}){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}} ({{value}}){{/is_warning}}"
|
||||
message = "${coalesce(var.orphaned_d2c_telemetry_egress_message, var.message)}"
|
||||
|
||||
@ -419,7 +419,7 @@ resource "datadog_monitor" "too_many_d2c_telemetry_egress_orphaned" {
|
||||
}
|
||||
|
||||
resource "datadog_monitor" "too_many_d2c_telemetry_egress_invalid" {
|
||||
count = "${var.invalid_d2c_telemetry_egress_enabled ? 1 : 0}"
|
||||
count = "${var.invalid_d2c_telemetry_egress_enabled == "true" ? 1 : 0}"
|
||||
name = "[${var.environment}] IOT Hub Too many d2c telemetry egress invalid {{#is_alert}}{{{comparator}}} {{threshold}} ({{value}}){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}} ({{value}}){{/is_warning}}"
|
||||
message = "${coalesce(var.invalid_d2c_telemetry_egress_message, var.message)}"
|
||||
|
||||
@ -457,7 +457,7 @@ resource "datadog_monitor" "too_many_d2c_telemetry_egress_invalid" {
|
||||
}
|
||||
|
||||
resource "datadog_monitor" "too_many_d2c_telemetry_ingress_nosent" {
|
||||
count = "${var.too_many_d2c_telemetry_ingress_nosent_enabled ? 1 : 0}"
|
||||
count = "${var.too_many_d2c_telemetry_ingress_nosent_enabled == "true" ? 1 : 0}"
|
||||
name = "[${var.environment}] IOT Hub Too many d2c telemetry ingress not sent {{#is_alert}}{{{comparator}}} {{threshold}} ({{value}}){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}} ({{value}}){{/is_warning}}"
|
||||
message = "${coalesce(var.too_many_d2c_telemetry_ingress_nosent_message, var.message)}"
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
resource "datadog_monitor" "keyvault_status" {
|
||||
count = "${var.status_enabled ? 1 : 0}"
|
||||
count = "${var.status_enabled == "true" ? 1 : 0}"
|
||||
|
||||
name = "[${var.environment}] Key Vault is down"
|
||||
message = "${coalesce(var.status_message, var.message)}"
|
||||
@ -28,7 +28,7 @@ resource "datadog_monitor" "keyvault_status" {
|
||||
}
|
||||
|
||||
resource "datadog_monitor" "keyvault_api_result" {
|
||||
count = "${var.api_result_enabled ? 1 : 0}"
|
||||
count = "${var.api_result_enabled == "true" ? 1 : 0}"
|
||||
|
||||
name = "[${var.environment}] Key Vault API result rate is low {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}"
|
||||
message = "${coalesce(var.status_message, var.message)}"
|
||||
@ -65,7 +65,7 @@ resource "datadog_monitor" "keyvault_api_result" {
|
||||
}
|
||||
|
||||
resource "datadog_monitor" "keyvault_api_latency" {
|
||||
count = "${var.api_latency_enabled ? 1 : 0}"
|
||||
count = "${var.api_latency_enabled == "true" ? 1 : 0}"
|
||||
|
||||
name = "[${var.environment}] Key Vault API latency is high {{#is_alert}}{{{comparator}}} {{threshold}}ms ({{value}}ms){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}ms ({{value}}ms){{/is_warning}}"
|
||||
message = "${coalesce(var.status_message, var.message)}"
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
resource "datadog_monitor" "loadbalancer_status" {
|
||||
count = "${var.status_enabled ? 1 : 0}"
|
||||
count = "${var.status_enabled == "true" ? 1 : 0}"
|
||||
|
||||
name = "[${var.environment}] Load Balancer is unreachable"
|
||||
message = "${coalesce(var.status_message, var.message)}"
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
resource "datadog_monitor" "mysql_cpu_usage" {
|
||||
count = "${var.cpu_usage_enabled ? 1 : 0}"
|
||||
count = "${var.cpu_usage_enabled == "true" ? 1 : 0}"
|
||||
name = "[${var.environment}] Mysql Server CPU usage {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}"
|
||||
message = "${coalesce(var.cpu_usage_message, var.message)}"
|
||||
|
||||
@ -32,7 +32,7 @@ resource "datadog_monitor" "mysql_cpu_usage" {
|
||||
}
|
||||
|
||||
resource "datadog_monitor" "mysql_free_storage" {
|
||||
count = "${var.free_storage_enabled ? 1 : 0}"
|
||||
count = "${var.free_storage_enabled == "true" ? 1 : 0}"
|
||||
name = "[${var.environment}] Mysql Server storage {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}"
|
||||
message = "${coalesce(var.free_storage_message, var.message)}"
|
||||
|
||||
@ -65,7 +65,7 @@ resource "datadog_monitor" "mysql_free_storage" {
|
||||
}
|
||||
|
||||
resource "datadog_monitor" "mysql_io_consumption" {
|
||||
count = "${var.io_consumption_enabled ? 1 : 0}"
|
||||
count = "${var.io_consumption_enabled == "true" ? 1 : 0}"
|
||||
name = "[${var.environment}] Mysql Server IO consumption {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}"
|
||||
message = "${coalesce(var.io_consumption_message, var.message)}"
|
||||
|
||||
@ -98,7 +98,7 @@ resource "datadog_monitor" "mysql_io_consumption" {
|
||||
}
|
||||
|
||||
resource "datadog_monitor" "mysql_memory_usage" {
|
||||
count = "${var.memory_usage_enabled ? 1 : 0}"
|
||||
count = "${var.memory_usage_enabled == "true" ? 1 : 0}"
|
||||
name = "[${var.environment}] Mysql Server memory usage {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}"
|
||||
message = "${coalesce(var.memory_usage_message, var.message)}"
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
resource "datadog_monitor" "postgresql_cpu_usage" {
|
||||
count = "${var.cpu_usage_enabled ? 1 : 0}"
|
||||
count = "${var.cpu_usage_enabled == "true" ? 1 : 0}"
|
||||
name = "[${var.environment}] Postgresql Server CPU usage {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}"
|
||||
message = "${coalesce(var.cpu_usage_message, var.message)}"
|
||||
|
||||
@ -32,7 +32,7 @@ resource "datadog_monitor" "postgresql_cpu_usage" {
|
||||
}
|
||||
|
||||
resource "datadog_monitor" "postgresql_no_connection" {
|
||||
count = "${var.no_connection_enabled ? 1 : 0}"
|
||||
count = "${var.no_connection_enabled == "true" ? 1 : 0}"
|
||||
name = "[${var.environment}] Postgresql Server has no connection"
|
||||
message = "${coalesce(var.no_connection_message, var.message)}"
|
||||
|
||||
@ -60,7 +60,7 @@ resource "datadog_monitor" "postgresql_no_connection" {
|
||||
}
|
||||
|
||||
resource "datadog_monitor" "postgresql_free_storage" {
|
||||
count = "${var.free_storage_enabled ? 1 : 0}"
|
||||
count = "${var.free_storage_enabled == "true" ? 1 : 0}"
|
||||
name = "[${var.environment}] Postgresql Server storage {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}"
|
||||
message = "${coalesce(var.free_storage_message, var.message)}"
|
||||
|
||||
@ -93,7 +93,7 @@ resource "datadog_monitor" "postgresql_free_storage" {
|
||||
}
|
||||
|
||||
resource "datadog_monitor" "postgresql_io_consumption" {
|
||||
count = "${var.io_consumption_enabled ? 1 : 0}"
|
||||
count = "${var.io_consumption_enabled == "true" ? 1 : 0}"
|
||||
name = "[${var.environment}] Postgresql Server IO consumption {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}"
|
||||
message = "${coalesce(var.io_consumption_message, var.message)}"
|
||||
|
||||
@ -126,7 +126,7 @@ resource "datadog_monitor" "postgresql_io_consumption" {
|
||||
}
|
||||
|
||||
resource "datadog_monitor" "postgresql_memory_usage" {
|
||||
count = "${var.memory_usage_enabled ? 1 : 0}"
|
||||
count = "${var.memory_usage_enabled == "true" ? 1 : 0}"
|
||||
name = "[${var.environment}] Postgresql Server memory usage {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}"
|
||||
message = "${coalesce(var.memory_usage_message, var.message)}"
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
resource "datadog_monitor" "status" {
|
||||
count = "${var.status_enabled ? 1 : 0}"
|
||||
count = "${var.status_enabled == "true" ? 1 : 0}"
|
||||
name = "[${var.environment}] Redis {{name}} is down"
|
||||
message = "${coalesce(var.status_message, var.message)}"
|
||||
|
||||
@ -27,7 +27,7 @@ resource "datadog_monitor" "status" {
|
||||
}
|
||||
|
||||
resource "datadog_monitor" "evictedkeys" {
|
||||
count = "${var.evictedkeys_limit_enabled ? 1 : 0}"
|
||||
count = "${var.evictedkeys_limit_enabled == "true" ? 1 : 0}"
|
||||
name = "[${var.environment}] Redis too many evictedkeys {{#is_alert}}{{{comparator}}} {{threshold}} ({{value}}){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}} ({{value}}){{/is_warning}}"
|
||||
message = "${coalesce(var.evictedkeys_limit_message, var.message)}"
|
||||
|
||||
@ -60,7 +60,7 @@ EOF
|
||||
}
|
||||
|
||||
resource "datadog_monitor" "percent_processor_time" {
|
||||
count = "${var.percent_processor_time_enabled ? 1 : 0}"
|
||||
count = "${var.percent_processor_time_enabled == "true" ? 1 : 0}"
|
||||
name = "[${var.environment}] Redis processor time too high {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}"
|
||||
message = "${coalesce(var.percent_processor_time_message, var.message)}"
|
||||
|
||||
@ -93,7 +93,7 @@ EOF
|
||||
}
|
||||
|
||||
resource "datadog_monitor" "server_load" {
|
||||
count = "${var.server_load_rate_enabled ? 1 : 0}"
|
||||
count = "${var.server_load_rate_enabled == "true" ? 1 : 0}"
|
||||
name = "[${var.environment}] Redis server load too high {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}"
|
||||
message = "${coalesce(var.server_load_rate_message, var.message)}"
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
resource "datadog_monitor" "status" {
|
||||
count = "${var.status_enabled ? 1 : 0}"
|
||||
count = "${var.status_enabled == "true" ? 1 : 0}"
|
||||
name = "[${var.environment}] Serverfarm is down"
|
||||
message = "${coalesce(var.status_message, var.message)}"
|
||||
|
||||
@ -27,7 +27,7 @@ resource "datadog_monitor" "status" {
|
||||
}
|
||||
|
||||
resource "datadog_monitor" "cpu_percentage" {
|
||||
count = "${var.cpu_percentage_enabled ? 1 : 0}"
|
||||
count = "${var.cpu_percentage_enabled == "true" ? 1 : 0}"
|
||||
name = "[${var.environment}] Serverfarm CPU percentage is too high {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}"
|
||||
message = "${coalesce(var.cpu_percentage_message, var.message)}"
|
||||
|
||||
@ -60,7 +60,7 @@ resource "datadog_monitor" "cpu_percentage" {
|
||||
}
|
||||
|
||||
resource "datadog_monitor" "memory_percentage" {
|
||||
count = "${var.memory_percentage_enabled ? 1 : 0}"
|
||||
count = "${var.memory_percentage_enabled == "true" ? 1 : 0}"
|
||||
name = "[${var.environment}] Serverfarm memory percentage is too high {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}"
|
||||
message = "${coalesce(var.memory_percentage_message, var.message)}"
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
resource "datadog_monitor" "servicebus_status" {
|
||||
count = "${var.status_enabled ? 1 : 0}"
|
||||
count = "${var.status_enabled == "true" ? 1 : 0}"
|
||||
|
||||
name = "[${var.environment}] Service Bus is down"
|
||||
message = "${coalesce(var.status_message, var.message)}"
|
||||
@ -28,7 +28,7 @@ EOF
|
||||
}
|
||||
|
||||
resource "datadog_monitor" "service_bus_no_active_connections" {
|
||||
count = "${var.no_active_connections_enabled ? 1 : 0}"
|
||||
count = "${var.no_active_connections_enabled == "true" ? 1 : 0}"
|
||||
|
||||
name = "[${var.environment}] Service Bus has no active connection"
|
||||
message = "${coalesce(var.no_active_connections_message, var.message)}"
|
||||
@ -57,7 +57,7 @@ resource "datadog_monitor" "service_bus_no_active_connections" {
|
||||
}
|
||||
|
||||
resource "datadog_monitor" "service_bus_user_errors" {
|
||||
count = "${var.user_errors_enabled ? 1 : 0}"
|
||||
count = "${var.user_errors_enabled == "true" ? 1 : 0}"
|
||||
|
||||
name = "[${var.environment}] Service Bus user errors rate is high {{#is_alert}}{{comparator}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{comparator}} {{warn_threshold}}% ({{value}}%){{/is_warning}}"
|
||||
message = "${coalesce(var.user_errors_message, var.message)}"
|
||||
@ -92,7 +92,7 @@ resource "datadog_monitor" "service_bus_user_errors" {
|
||||
}
|
||||
|
||||
resource "datadog_monitor" "service_bus_server_errors" {
|
||||
count = "${var.server_errors_enabled ? 1 : 0}"
|
||||
count = "${var.server_errors_enabled == "true" ? 1 : 0}"
|
||||
|
||||
name = "[${var.environment}] Service Bus server errors rate is high {{#is_alert}}{{comparator}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{comparator}} {{warn_threshold}}% ({{value}}%){{/is_warning}}"
|
||||
message = "${coalesce(var.server_errors_message, var.message)}"
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
resource "datadog_monitor" "status" {
|
||||
count = "${var.status_enabled ? 1 : 0}"
|
||||
count = "${var.status_enabled == "true" ? 1 : 0}"
|
||||
name = "[${var.environment}] SQL Database is down"
|
||||
message = "${coalesce(var.status_message, var.message)}"
|
||||
|
||||
@ -27,7 +27,7 @@ resource "datadog_monitor" "status" {
|
||||
}
|
||||
|
||||
resource "datadog_monitor" "sql-database_cpu_90_15min" {
|
||||
count = "${var.cpu_enabled ? 1 : 0}"
|
||||
count = "${var.cpu_enabled == "true" ? 1 : 0}"
|
||||
name = "[${var.environment}] SQL Database CPU too high {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}"
|
||||
message = "${coalesce(var.cpu_message, var.message)}"
|
||||
|
||||
@ -59,7 +59,7 @@ resource "datadog_monitor" "sql-database_cpu_90_15min" {
|
||||
}
|
||||
|
||||
resource "datadog_monitor" "sql-database_free_space_low" {
|
||||
count = "${var.diskspace_enabled ? 1 : 0}"
|
||||
count = "${var.diskspace_enabled == "true" ? 1 : 0}"
|
||||
name = "[${var.environment}] SQL Database low free space {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}"
|
||||
message = "${coalesce(var.diskspace_message, var.message)}"
|
||||
|
||||
@ -92,7 +92,7 @@ resource "datadog_monitor" "sql-database_free_space_low" {
|
||||
}
|
||||
|
||||
resource "datadog_monitor" "sql-database_dtu_consumption_high" {
|
||||
count = "${var.dtu_enabled ? 1 : 0}"
|
||||
count = "${var.dtu_enabled == "true" ? 1 : 0}"
|
||||
name = "[${var.environment}] SQL Database DTU Consumption too high {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}"
|
||||
message = "${coalesce(var.dtu_message, var.message)}"
|
||||
|
||||
@ -125,7 +125,7 @@ resource "datadog_monitor" "sql-database_dtu_consumption_high" {
|
||||
}
|
||||
|
||||
resource "datadog_monitor" "sql-database_deadlocks_count" {
|
||||
count = "${var.deadlock_enabled ? 1 : 0}"
|
||||
count = "${var.deadlock_enabled == "true" ? 1 : 0}"
|
||||
name = "[${var.environment}] SQL Database Deadlocks too high {{#is_alert}}{{{comparator}}} {{threshold}} ({{value}}){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}} ({{value}}){{/is_warning}}"
|
||||
message = "${coalesce(var.deadlock_message, var.message)}"
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
resource "datadog_monitor" "availability" {
|
||||
count = "${var.availability_enabled ? 1 : 0}"
|
||||
count = "${var.availability_enabled == "true" ? 1 : 0}"
|
||||
name = "[${var.environment}] Azure Storage is down"
|
||||
message = "${coalesce(var.availability_message, var.message)}"
|
||||
|
||||
@ -31,7 +31,7 @@ EOF
|
||||
}
|
||||
|
||||
resource "datadog_monitor" "successful_requests" {
|
||||
count = "${var.successful_requests_enabled ? 1 : 0}"
|
||||
count = "${var.successful_requests_enabled == "true" ? 1 : 0}"
|
||||
name = "[${var.environment}] Azure Storage too few successful requests {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}"
|
||||
message = "${coalesce(var.successful_requests_message, var.message)}"
|
||||
|
||||
@ -63,7 +63,7 @@ EOF
|
||||
}
|
||||
|
||||
resource "datadog_monitor" "latency" {
|
||||
count = "${var.latency_enabled ? 1 : 0}"
|
||||
count = "${var.latency_enabled == "true" ? 1 : 0}"
|
||||
name = "[${var.environment}] Azure Storage too high end to end latency {{#is_alert}}{{{comparator}}} {{threshold}}ms ({{value}}ms){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}ms ({{value}}ms){{/is_warning}}"
|
||||
message = "${coalesce(var.latency_message, var.message)}"
|
||||
|
||||
@ -95,7 +95,7 @@ EOF
|
||||
}
|
||||
|
||||
resource "datadog_monitor" "timeout_error_requests" {
|
||||
count = "${var.timeout_error_requests_enabled ? 1 : 0}"
|
||||
count = "${var.timeout_error_requests_enabled == "true" ? 1 : 0}"
|
||||
name = "[${var.environment}] Azure Storage too many timeout errors {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}"
|
||||
message = "${coalesce(var.timeout_error_requests_message, var.message)}"
|
||||
|
||||
@ -127,7 +127,7 @@ EOF
|
||||
}
|
||||
|
||||
resource "datadog_monitor" "network_error_requests" {
|
||||
count = "${var.network_error_requests_enabled ? 1 : 0}"
|
||||
count = "${var.network_error_requests_enabled == "true" ? 1 : 0}"
|
||||
name = "[${var.environment}] Azure Storage too many network errors {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}"
|
||||
message = "${coalesce(var.network_error_requests_message, var.message)}"
|
||||
|
||||
@ -159,7 +159,7 @@ EOF
|
||||
}
|
||||
|
||||
resource "datadog_monitor" "throttling_error_requests" {
|
||||
count = "${var.throttling_error_requests_enabled ? 1 : 0}"
|
||||
count = "${var.throttling_error_requests_enabled == "true" ? 1 : 0}"
|
||||
name = "[${var.environment}] Azure Storage too many throttling errors {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}"
|
||||
message = "${coalesce(var.throttling_error_requests_message, var.message)}"
|
||||
|
||||
@ -191,7 +191,7 @@ EOF
|
||||
}
|
||||
|
||||
resource "datadog_monitor" "server_other_error_requests" {
|
||||
count = "${var.server_other_error_requests_enabled ? 1 : 0}"
|
||||
count = "${var.server_other_error_requests_enabled == "true" ? 1 : 0}"
|
||||
name = "[${var.environment}] Azure Storage too many server_other errors {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}"
|
||||
message = "${coalesce(var.server_other_error_requests_message, var.message)}"
|
||||
|
||||
@ -223,7 +223,7 @@ EOF
|
||||
}
|
||||
|
||||
resource "datadog_monitor" "client_other_error_requests" {
|
||||
count = "${var.client_other_error_requests_enabled ? 1 : 0}"
|
||||
count = "${var.client_other_error_requests_enabled == "true" ? 1 : 0}"
|
||||
name = "[${var.environment}] Azure Storage too many client_other errors {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}"
|
||||
message = "${coalesce(var.client_other_error_requests_message, var.message)}"
|
||||
|
||||
@ -255,7 +255,7 @@ EOF
|
||||
}
|
||||
|
||||
resource "datadog_monitor" "authorization_error_requests" {
|
||||
count = "${var.authorization_error_requests_enabled ? 1 : 0}"
|
||||
count = "${var.authorization_error_requests_enabled == "true" ? 1 : 0}"
|
||||
name = "[${var.environment}] Azure Storage too many authorization errors {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}"
|
||||
message = "${coalesce(var.authorization_error_requests_message, var.message)}"
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
resource "datadog_monitor" "status" {
|
||||
count = "${var.status_enabled ? 1 : 0}"
|
||||
count = "${var.status_enabled == "true" ? 1 : 0}"
|
||||
name = "[${var.environment}] Stream Analytics is down"
|
||||
message = "${coalesce(var.status_message, var.message)}"
|
||||
|
||||
@ -27,7 +27,7 @@ resource "datadog_monitor" "status" {
|
||||
}
|
||||
|
||||
resource "datadog_monitor" "su_utilization" {
|
||||
count = "${var.su_utilization_enabled ? 1 : 0}"
|
||||
count = "${var.su_utilization_enabled == "true" ? 1 : 0}"
|
||||
name = "[${var.environment}] Stream Analytics streaming units utilization too high {{#is_alert}}{{{comparator}}} {{threshold}} ({{value}}){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}} ({{value}}){{/is_warning}}"
|
||||
message = "${coalesce(var.su_utilization_message, var.message)}"
|
||||
|
||||
@ -60,7 +60,7 @@ resource "datadog_monitor" "su_utilization" {
|
||||
}
|
||||
|
||||
resource "datadog_monitor" "failed_function_requests" {
|
||||
count = "${var.failed_function_requests_enabled ? 1 : 0}"
|
||||
count = "${var.failed_function_requests_enabled == "true" ? 1 : 0}"
|
||||
name = "[${var.environment}] Stream Analytics too many failed requests {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}"
|
||||
message = "${coalesce(var.failed_function_requests_message, var.message)}"
|
||||
|
||||
@ -94,7 +94,7 @@ resource "datadog_monitor" "failed_function_requests" {
|
||||
}
|
||||
|
||||
resource "datadog_monitor" "conversion_errors" {
|
||||
count = "${var.conversion_errors_enabled ? 1 : 0}"
|
||||
count = "${var.conversion_errors_enabled == "true" ? 1 : 0}"
|
||||
name = "[${var.environment}] Stream Analytics too many conversion errors {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}"
|
||||
message = "${coalesce(var.conversion_errors_message, var.message)}"
|
||||
|
||||
@ -127,7 +127,7 @@ resource "datadog_monitor" "conversion_errors" {
|
||||
}
|
||||
|
||||
resource "datadog_monitor" "runtime_errors" {
|
||||
count = "${var.runtime_errors_enabled ? 1 : 0}"
|
||||
count = "${var.runtime_errors_enabled == "true" ? 1 : 0}"
|
||||
name = "[${var.environment}] Stream Analytics too many runtime errors {{#is_alert}}{{{comparator}}} {{threshold}} ({{value}}){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}} ({{value}}){{/is_warning}}"
|
||||
message = "${coalesce(var.runtime_errors_message, var.message)}"
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
resource "datadog_monitor" "virtualmachine_status" {
|
||||
count = "${var.status_enabled ? 1 : 0}"
|
||||
count = "${var.status_enabled == "true" ? 1 : 0}"
|
||||
|
||||
name = "[${var.environment}] Virtual Machine is unreachable"
|
||||
message = "${coalesce(var.status_message, var.message)}"
|
||||
@ -28,7 +28,7 @@ resource "datadog_monitor" "virtualmachine_status" {
|
||||
}
|
||||
|
||||
resource "datadog_monitor" "virtualmachine_cpu_usage" {
|
||||
count = "${var.cpu_usage_enabled ? 1 : 0}"
|
||||
count = "${var.cpu_usage_enabled == "true" ? 1 : 0}"
|
||||
name = "[${var.environment}] Virtual Machine CPU usage {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}"
|
||||
message = "${coalesce(var.cpu_usage_message, var.message)}"
|
||||
|
||||
@ -61,7 +61,7 @@ resource "datadog_monitor" "virtualmachine_cpu_usage" {
|
||||
}
|
||||
|
||||
resource "datadog_monitor" "virtualmachine_credit_cpu_remaining_too_low" {
|
||||
count = "${var.cpu_remaining_rate_enabled ? 1 : 0}"
|
||||
count = "${var.cpu_remaining_rate_enabled == "true" ? 1 : 0}"
|
||||
name = "[${var.environment}] Virtual Machine credit CPU {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}"
|
||||
message = "${coalesce(var.cpu_remaining_rate_message, var.message)}"
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
# Concurrent queries
|
||||
#
|
||||
resource "datadog_monitor" "concurrent_queries" {
|
||||
count = "${var.concurrent_queries_enabled ? 1 : 0}"
|
||||
count = "${var.concurrent_queries_enabled == "true" ? 1 : 0}"
|
||||
name = "[${var.environment}] GCP Big Query Concurrent Queries {{#is_alert}}{{{comparator}}} {{threshold}} ({{value}}){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}} ({{value}}){{/is_warning}}"
|
||||
message = "${coalesce(var.concurrent_queries_message, var.message)}"
|
||||
|
||||
@ -38,7 +38,7 @@ EOF
|
||||
# Execution Time
|
||||
#
|
||||
resource "datadog_monitor" "execution_time" {
|
||||
count = "${var.execution_time_enabled ? 1 : 0}"
|
||||
count = "${var.execution_time_enabled == "true" ? 1 : 0}"
|
||||
name = "[${var.environment}] GCP Big Query Execution Time {{#is_alert}}{{{comparator}}} {{threshold}}s ({{value}}s){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}s ({{value}}s){{/is_warning}}"
|
||||
message = "${coalesce(var.execution_time_message, var.message)}"
|
||||
|
||||
@ -74,7 +74,7 @@ EOF
|
||||
# Scanned Bytes
|
||||
#
|
||||
resource "datadog_monitor" "scanned_bytes" {
|
||||
count = "${var.scanned_bytes_enabled ? 1 : 0}"
|
||||
count = "${var.scanned_bytes_enabled == "true" ? 1 : 0}"
|
||||
name = "[${var.environment}] GCP Big Query Scanned Bytes {{#is_alert}}{{{comparator}}} {{threshold}}B/mn ({{value}}B/mn){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}B/mn ({{value}}B/mn){{/is_warning}}"
|
||||
message = "${coalesce(var.scanned_bytes_message, var.message)}"
|
||||
|
||||
@ -110,7 +110,7 @@ EOF
|
||||
# Scanned Bytes Billed
|
||||
#
|
||||
resource "datadog_monitor" "scanned_bytes_billed" {
|
||||
count = "${var.scanned_bytes_billed_enabled ? 1 : 0}"
|
||||
count = "${var.scanned_bytes_billed_enabled == "true" ? 1 : 0}"
|
||||
name = "[${var.environment}] GCP Big Query Scanned Bytes Billed {{#is_alert}}{{{comparator}}} {{threshold}}B/mn ({{value}}B/mn){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}B/mn ({{value}}B/mn){{/is_warning}}"
|
||||
message = "${coalesce(var.scanned_bytes_billed_message, var.message)}"
|
||||
|
||||
@ -146,7 +146,7 @@ EOF
|
||||
# Available Slots
|
||||
#
|
||||
resource "datadog_monitor" "available_slots" {
|
||||
count = "${var.available_slots_enabled ? 1 : 0}"
|
||||
count = "${var.available_slots_enabled == "true" ? 1 : 0}"
|
||||
name = "[${var.environment}] GCP Big Query Available Slots {{#is_alert}}{{{comparator}}} {{threshold}} ({{value}}){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}} ({{value}}){{/is_warning}}"
|
||||
message = "${coalesce(var.available_slots_message, var.message)}"
|
||||
|
||||
@ -182,7 +182,7 @@ EOF
|
||||
# Stored Bytes
|
||||
#
|
||||
resource "datadog_monitor" "stored_bytes" {
|
||||
count = "${var.stored_bytes_enabled ? 1 : 0}"
|
||||
count = "${var.stored_bytes_enabled == "true" ? 1 : 0}"
|
||||
name = "[${var.environment}] GCP Big Query Stored Bytes {{#is_alert}}{{{comparator}}} {{threshold}}B ({{value}}B){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}B ({{value}}B){{/is_warning}}"
|
||||
message = "${coalesce(var.stored_bytes_message, var.message)}"
|
||||
|
||||
@ -218,7 +218,7 @@ EOF
|
||||
# Table Count
|
||||
#
|
||||
resource "datadog_monitor" "table_count" {
|
||||
count = "${var.table_count_enabled ? 1 : 0}"
|
||||
count = "${var.table_count_enabled == "true" ? 1 : 0}"
|
||||
name = "[${var.environment}] GCP Big Query Table Count {{#is_alert}}{{{comparator}}} {{threshold}} ({{value}}){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}} ({{value}}){{/is_warning}}"
|
||||
message = "${coalesce(var.table_count_message, var.message)}"
|
||||
|
||||
@ -254,7 +254,7 @@ EOF
|
||||
# Uploaded Bytes
|
||||
#
|
||||
resource "datadog_monitor" "uploaded_bytes" {
|
||||
count = "${var.uploaded_bytes_enabled ? 1 : 0}"
|
||||
count = "${var.uploaded_bytes_enabled == "true" ? 1 : 0}"
|
||||
name = "[${var.environment}] GCP Big Query Uploaded Bytes {{#is_alert}}{{{comparator}}} {{threshold}}B/mn ({{value}}B/mn){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}B/mn ({{value}}B/mn){{/is_warning}}"
|
||||
message = "${coalesce(var.uploaded_bytes_message, var.message)}"
|
||||
|
||||
@ -290,7 +290,7 @@ EOF
|
||||
# Uploaded Bytes Billed
|
||||
#
|
||||
resource "datadog_monitor" "uploaded_bytes_billed" {
|
||||
count = "${var.uploaded_bytes_billed_enabled ? 1 : 0}"
|
||||
count = "${var.uploaded_bytes_billed_enabled == "true" ? 1 : 0}"
|
||||
name = "[${var.environment}] GCP Big Query Uploaded Bytes Billed {{#is_alert}}{{{comparator}}} {{threshold}}B/mn ({{value}}B/mn){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}B/mn ({{value}}B/mn){{/is_warning}}"
|
||||
message = "${coalesce(var.uploaded_bytes_billed_message, var.message)}"
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
# CPU Utilization
|
||||
#
|
||||
resource "datadog_monitor" "cpu_utilization" {
|
||||
count = "${var.cpu_utilization_enabled ? 1 : 0}"
|
||||
count = "${var.cpu_utilization_enabled == "true" ? 1 : 0}"
|
||||
name = "[${var.environment}] Cloud SQL CPU Utilization {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}"
|
||||
message = "${coalesce(var.cpu_utilization_message, var.message)}"
|
||||
|
||||
@ -40,7 +40,7 @@ EOF
|
||||
# Disk Utilization
|
||||
#
|
||||
resource "datadog_monitor" "disk_utilization" {
|
||||
count = "${var.disk_utilization_enabled ? 1 : 0}"
|
||||
count = "${var.disk_utilization_enabled == "true" ? 1 : 0}"
|
||||
name = "[${var.environment}] Cloud SQL Disk Utilization {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}"
|
||||
message = "${coalesce(var.disk_utilization_message, var.message)}"
|
||||
|
||||
@ -78,7 +78,7 @@ EOF
|
||||
# Disk Utilization Forecast
|
||||
#
|
||||
resource "datadog_monitor" "disk_utilization_forecast" {
|
||||
count = "${var.disk_utilization_forecast_enabled ? 1 : 0}"
|
||||
count = "${var.disk_utilization_forecast_enabled == "true" ? 1 : 0}"
|
||||
name = "[${var.environment}] Cloud SQL Disk Utilization could reach {{#is_alert}}{{threshold}}%{{/is_alert}} in a near future"
|
||||
message = "${coalesce(var.disk_utilization_forecast_message, var.message)}"
|
||||
|
||||
@ -122,7 +122,7 @@ EOF
|
||||
# Memory Utilization
|
||||
#
|
||||
resource "datadog_monitor" "memory_utilization" {
|
||||
count = "${var.memory_utilization_enabled ? 1 : 0}"
|
||||
count = "${var.memory_utilization_enabled == "true" ? 1 : 0}"
|
||||
name = "[${var.environment}] Cloud SQL Memory Utilization {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}"
|
||||
message = "${coalesce(var.memory_utilization_message, var.message)}"
|
||||
|
||||
@ -160,7 +160,7 @@ EOF
|
||||
# Memory Utilization Forecast
|
||||
#
|
||||
resource "datadog_monitor" "memory_utilization_forecast" {
|
||||
count = "${var.memory_utilization_forecast_enabled ? 1 : 0}"
|
||||
count = "${var.memory_utilization_forecast_enabled == "true" ? 1 : 0}"
|
||||
name = "[${var.environment}] Cloud SQL Memory Utilization could reach {{#is_alert}}{{threshold}}%{{/is_alert}} in a near future"
|
||||
message = "${coalesce(var.memory_utilization_forecast_message, var.message)}"
|
||||
|
||||
@ -204,7 +204,7 @@ EOF
|
||||
# Failover Unavailable
|
||||
#
|
||||
resource "datadog_monitor" "failover_unavailable" {
|
||||
count = "${var.failover_unavailable_enabled ? 1 : 0}"
|
||||
count = "${var.failover_unavailable_enabled == "true" ? 1 : 0}"
|
||||
name = "[${var.environment}] Cloud SQL Failover Unavailable"
|
||||
message = "${coalesce(var.failover_unavailable_message, var.message)}"
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
# Replication Lag
|
||||
#
|
||||
resource "datadog_monitor" "replication_lag" {
|
||||
count = "${var.replication_lag_enabled ? 1 : 0}"
|
||||
count = "${var.replication_lag_enabled == "true" ? 1 : 0}"
|
||||
name = "[${var.environment}] Cloud SQL MySQL Replication Lag {{#is_alert}}{{{comparator}}} {{threshold}}s ({{value}}s){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}s ({{value}}s){{/is_warning}}"
|
||||
message = "${coalesce(var.replication_lag_message, var.message)}"
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
# CPU Utilization
|
||||
#
|
||||
resource "datadog_monitor" "cpu_utilization" {
|
||||
count = "${var.cpu_utilization_enabled ? 1 : 0}"
|
||||
count = "${var.cpu_utilization_enabled == "true" ? 1 : 0}"
|
||||
name = "[${var.environment}] Compute Engine instance CPU Utilization {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}"
|
||||
message = "${coalesce(var.cpu_utilization_message, var.message)}"
|
||||
|
||||
@ -39,7 +39,7 @@ EOF
|
||||
# Disk Throttled Bps
|
||||
#
|
||||
resource "datadog_monitor" "disk_throttled_bps" {
|
||||
count = "${var.disk_throttled_bps_enabled ? 1 : 0}"
|
||||
count = "${var.disk_throttled_bps_enabled == "true" ? 1 : 0}"
|
||||
name = "[${var.environment}] Compute Engine instance Disk Throttled Bps {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}"
|
||||
message = "${coalesce(var.disk_throttled_bps_message, var.message)}"
|
||||
|
||||
@ -82,7 +82,7 @@ EOF
|
||||
# Disk Throttled OPS
|
||||
#
|
||||
resource "datadog_monitor" "disk_throttled_ops" {
|
||||
count = "${var.disk_throttled_ops_enabled ? 1 : 0}"
|
||||
count = "${var.disk_throttled_ops_enabled == "true" ? 1 : 0}"
|
||||
name = "[${var.environment}] Compute Engine instance Disk Throttled OPS {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}"
|
||||
message = "${coalesce(var.disk_throttled_ops_message, var.message)}"
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
# 4XX Errors
|
||||
#
|
||||
resource "datadog_monitor" "error_rate_4xx" {
|
||||
count = "${var.error_rate_4xx_enabled ? 1 : 0}"
|
||||
count = "${var.error_rate_4xx_enabled == "true" ? 1 : 0}"
|
||||
name = "[${var.environment}] GCP LB 4xx errors {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}"
|
||||
message = "${coalesce(var.error_rate_4xx_message, var.message)}"
|
||||
|
||||
@ -40,7 +40,7 @@ EOF
|
||||
# 5XX Errors
|
||||
#
|
||||
resource "datadog_monitor" "error_rate_5xx" {
|
||||
count = "${var.error_rate_5xx_enabled ? 1 : 0}"
|
||||
count = "${var.error_rate_5xx_enabled == "true" ? 1 : 0}"
|
||||
name = "[${var.environment}] GCP LB 5xx errors {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}"
|
||||
message = "${coalesce(var.error_rate_5xx_message, var.message)}"
|
||||
|
||||
@ -78,7 +78,7 @@ EOF
|
||||
# Backend Latency for service
|
||||
#
|
||||
resource "datadog_monitor" "backend_latency_service" {
|
||||
count = "${var.backend_latency_service_enabled ? 1 : 0}"
|
||||
count = "${var.backend_latency_service_enabled == "true" ? 1 : 0}"
|
||||
name = "[${var.environment}] GCP LB service backend latency {{#is_alert}}{{{comparator}}} {{threshold}}ms ({{value}}ms){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}ms ({{value}}ms){{/is_warning}}"
|
||||
message = "${coalesce(var.backend_latency_service_message, var.message)}"
|
||||
|
||||
@ -115,7 +115,7 @@ EOF
|
||||
# Backend Latency for bucket
|
||||
#
|
||||
resource "datadog_monitor" "backend_latency_bucket" {
|
||||
count = "${var.backend_latency_bucket_enabled ? 1 : 0}"
|
||||
count = "${var.backend_latency_bucket_enabled == "true" ? 1 : 0}"
|
||||
name = "[${var.environment}] GCP LB bucket backend latency {{#is_alert}}{{{comparator}}} {{threshold}}ms ({{value}}ms){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}ms ({{value}}ms){{/is_warning}}"
|
||||
message = "${coalesce(var.backend_latency_bucket_message, var.message)}"
|
||||
|
||||
@ -152,7 +152,7 @@ EOF
|
||||
# Request Count
|
||||
#
|
||||
resource "datadog_monitor" "request_count" {
|
||||
count = "${var.request_count_enabled ? 1 : 0}"
|
||||
count = "${var.request_count_enabled == "true" ? 1 : 0}"
|
||||
name = "[${var.environment}] GCP LB Requests count increased abruptly {{#is_alert}}{{value}}%{{/is_alert}}{{#is_warning}}{{value}}%{{/is_warning}}"
|
||||
message = "${coalesce(var.request_count_message, var.message)}"
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
# Sending Operations Count
|
||||
#
|
||||
resource "datadog_monitor" "sending_operations_count" {
|
||||
count = "${var.sending_operations_count_enabled ? 1 : 0}"
|
||||
count = "${var.sending_operations_count_enabled == "true" ? 1 : 0}"
|
||||
name = "[${var.environment}] GCP pubsub sending messages operations {{#is_alert}}{{{comparator}}} {{threshold}} ({{value}}){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}} ({{value}}){{/is_warning}}"
|
||||
message = "${coalesce(var.sending_operations_count_message, var.message)}"
|
||||
|
||||
@ -38,7 +38,7 @@ EOF
|
||||
# Unavailable Sending Operations Count
|
||||
#
|
||||
resource "datadog_monitor" "unavailable_sending_operations_count" {
|
||||
count = "${var.unavailable_sending_operations_count_enabled ? 1 : 0}"
|
||||
count = "${var.unavailable_sending_operations_count_enabled == "true" ? 1 : 0}"
|
||||
name = "[${var.environment}] GCP pubsub sending messages with result unavailable {{#is_alert}}{{{comparator}}} {{threshold}} ({{value}}){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}} ({{value}}){{/is_warning}}"
|
||||
message = "${coalesce(var.unavailable_sending_operations_count_message, var.message)}"
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
# Service Check
|
||||
#
|
||||
resource "datadog_monitor" "not_responding" {
|
||||
count = "${var.not_responding_enabled ? 1 : 0}"
|
||||
count = "${var.not_responding_enabled == "true" ? 1 : 0}"
|
||||
name = "[${var.environment}] ElasticSearch does not respond"
|
||||
message = "${coalesce(var.not_responding_message, var.message)}"
|
||||
|
||||
@ -45,7 +45,7 @@ EOL
|
||||
# Cluster Status Not Green
|
||||
#
|
||||
resource "datadog_monitor" "cluster_status_not_green" {
|
||||
count = "${var.cluster_status_not_green_enabled ? 1 : 0}"
|
||||
count = "${var.cluster_status_not_green_enabled == "true" ? 1 : 0}"
|
||||
name = "[${var.environment}] ElasticSearch Cluster status not green"
|
||||
message = "${coalesce(var.cluster_status_not_green_message, var.message)}"
|
||||
|
||||
@ -88,7 +88,7 @@ EOF
|
||||
# Cluster Initializing Shards
|
||||
#
|
||||
resource "datadog_monitor" "cluster_initializing_shards" {
|
||||
count = "${var.cluster_initializing_shards_enabled ? 1 : 0}"
|
||||
count = "${var.cluster_initializing_shards_enabled == "true" ? 1 : 0}"
|
||||
name = "[${var.environment}] ElasticSearch Cluster is initializing shards"
|
||||
message = "${coalesce(var.cluster_initializing_shards_message, var.message)}"
|
||||
|
||||
@ -130,7 +130,7 @@ EOF
|
||||
# Cluster Relocating Shards
|
||||
#
|
||||
resource "datadog_monitor" "cluster_relocating_shards" {
|
||||
count = "${var.cluster_relocating_shards_enabled ? 1 : 0}"
|
||||
count = "${var.cluster_relocating_shards_enabled == "true" ? 1 : 0}"
|
||||
name = "[${var.environment}] ElasticSearch Cluster is relocating shards"
|
||||
message = "${coalesce(var.cluster_relocating_shards_message, var.message)}"
|
||||
|
||||
@ -172,7 +172,7 @@ EOF
|
||||
# Cluster Unassigned Shards
|
||||
#
|
||||
resource "datadog_monitor" "cluster_unassigned_shards" {
|
||||
count = "${var.cluster_unassigned_shards_enabled ? 1 : 0}"
|
||||
count = "${var.cluster_unassigned_shards_enabled == "true" ? 1 : 0}"
|
||||
name = "[${var.environment}] ElasticSearch Cluster has unassigned shards"
|
||||
message = "${coalesce(var.cluster_unassigned_shards_message, var.message)}"
|
||||
|
||||
@ -214,7 +214,7 @@ EOF
|
||||
# Free Space in nodes
|
||||
#
|
||||
resource "datadog_monitor" "node_free_space" {
|
||||
count = "${var.node_free_space_enabled ? 1 : 0}"
|
||||
count = "${var.node_free_space_enabled == "true" ? 1 : 0}"
|
||||
name = "[${var.environment}] ElasticSearch free space < 10%"
|
||||
message = "${coalesce(var.node_free_space_message, var.message)}"
|
||||
|
||||
@ -259,7 +259,7 @@ EOF
|
||||
# JVM Heap Memory Usage
|
||||
#
|
||||
resource "datadog_monitor" "jvm_heap_memory_usage" {
|
||||
count = "${var.jvm_heap_memory_usage_enabled ? 1 : 0}"
|
||||
count = "${var.jvm_heap_memory_usage_enabled == "true" ? 1 : 0}"
|
||||
name = "[${var.environment}] Elasticsearch JVM HEAP memory usage {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}"
|
||||
message = "${coalesce(var.jvm_heap_memory_usage_message, var.message)}"
|
||||
|
||||
@ -301,7 +301,7 @@ EOF
|
||||
# JVM Memory Young Usage
|
||||
#
|
||||
resource "datadog_monitor" "jvm_memory_young_usage" {
|
||||
count = "${var.jvm_memory_young_usage_enabled ? 1 : 0}"
|
||||
count = "${var.jvm_memory_young_usage_enabled == "true" ? 1 : 0}"
|
||||
name = "[${var.environment}] Elasticsearch JVM memory Young usage {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}"
|
||||
message = "${coalesce(var.jvm_memory_young_usage_message, var.message)}"
|
||||
|
||||
@ -343,7 +343,7 @@ EOF
|
||||
# JVM Memory Old Usage
|
||||
#
|
||||
resource "datadog_monitor" "jvm_memory_old_usage" {
|
||||
count = "${var.jvm_memory_old_usage_enabled ? 1 : 0}"
|
||||
count = "${var.jvm_memory_old_usage_enabled == "true" ? 1 : 0}"
|
||||
name = "[${var.environment}] Elasticsearch JVM memory Old usage {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}"
|
||||
message = "${coalesce(var.jvm_memory_old_usage_message, var.message)}"
|
||||
|
||||
@ -385,7 +385,7 @@ EOF
|
||||
# JVM Garbace Collector Old Collection Latency
|
||||
#
|
||||
resource "datadog_monitor" "jvm_gc_old_collection_latency" {
|
||||
count = "${var.jvm_gc_old_collection_latency_enabled ? 1 : 0}"
|
||||
count = "${var.jvm_gc_old_collection_latency_enabled == "true" ? 1 : 0}"
|
||||
name = "[${var.environment}] Elasticsearch average Old-generation garbage collections latency {{#is_alert}}{{{comparator}}} {{threshold}}ms ({{value}}ms){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}ms ({{value}}ms){{/is_warning}}"
|
||||
message = "${coalesce(var.jvm_gc_old_collection_latency_message, var.message)}"
|
||||
|
||||
@ -427,7 +427,7 @@ EOF
|
||||
# JVM Garbace Collector Young Collection Latency
|
||||
#
|
||||
resource "datadog_monitor" "jvm_gc_young_collection_latency" {
|
||||
count = "${var.jvm_gc_young_collection_latency_enabled ? 1 : 0}"
|
||||
count = "${var.jvm_gc_young_collection_latency_enabled == "true" ? 1 : 0}"
|
||||
name = "[${var.environment}] Elasticsearch average Young-generation garbage collections latency {{#is_alert}}{{{comparator}}} {{threshold}}ms ({{value}}ms){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}ms ({{value}}ms){{/is_warning}}"
|
||||
message = "${coalesce(var.jvm_gc_young_collection_latency_message, var.message)}"
|
||||
|
||||
@ -469,7 +469,7 @@ EOF
|
||||
# Indexing Latency
|
||||
#
|
||||
resource "datadog_monitor" "indexing_latency" {
|
||||
count = "${var.indexing_latency_enabled ? 1 : 0}"
|
||||
count = "${var.indexing_latency_enabled == "true" ? 1 : 0}"
|
||||
name = "[${var.environment}] Elasticsearch average indexing time by document {{#is_alert}}{{{comparator}}} {{threshold}}ms ({{value}}ms){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}ms ({{value}}ms){{/is_warning}}"
|
||||
message = "${coalesce(var.indexing_latency_message, var.message)}"
|
||||
|
||||
@ -512,7 +512,7 @@ EOF
|
||||
# Flush Latency
|
||||
#
|
||||
resource "datadog_monitor" "flush_latency" {
|
||||
count = "${var.flush_latency_enabled ? 1 : 0}"
|
||||
count = "${var.flush_latency_enabled == "true" ? 1 : 0}"
|
||||
name = "[${var.environment}] Elasticsearch average index flushing to disk latency {{#is_alert}}{{{comparator}}} {{threshold}}ms ({{value}}ms){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}ms ({{value}}ms){{/is_warning}}"
|
||||
message = "${coalesce(var.flush_latency_message, var.message)}"
|
||||
|
||||
@ -555,7 +555,7 @@ EOF
|
||||
# Open HTTP Connections Anomaly
|
||||
#
|
||||
resource "datadog_monitor" "http_connections_anomaly" {
|
||||
count = "${var.http_connections_anomaly_enabled ? 1 : 0}"
|
||||
count = "${var.http_connections_anomaly_enabled == "true" ? 1 : 0}"
|
||||
name = "[${var.environment}] Elasticsearch number of current open HTTP connections anomaly detected"
|
||||
message = "${coalesce(var.http_connections_anomaly_message, var.message)}"
|
||||
|
||||
@ -605,7 +605,7 @@ EOF
|
||||
# Query Latency
|
||||
#
|
||||
resource "datadog_monitor" "search_query_latency" {
|
||||
count = "${var.search_query_latency_enabled ? 1 : 0}"
|
||||
count = "${var.search_query_latency_enabled == "true" ? 1 : 0}"
|
||||
name = "[${var.environment}] Elasticsearch average search query latency {{#is_alert}}{{{comparator}}} {{threshold}}ms ({{value}}ms){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}ms ({{value}}ms){{/is_warning}}"
|
||||
message = "${coalesce(var.search_query_latency_message, var.message)}"
|
||||
|
||||
@ -648,7 +648,7 @@ EOF
|
||||
# Fetch Latency
|
||||
#
|
||||
resource "datadog_monitor" "fetch_latency" {
|
||||
count = "${var.fetch_latency_enabled ? 1 : 0}"
|
||||
count = "${var.fetch_latency_enabled == "true" ? 1 : 0}"
|
||||
name = "[${var.environment}] Elasticsearch average search fetch latency {{#is_alert}}{{{comparator}}} {{threshold}}ms ({{value}}ms){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}ms ({{value}}ms){{/is_warning}}"
|
||||
message = "${coalesce(var.fetch_latency_message, var.message)}"
|
||||
|
||||
@ -691,7 +691,7 @@ EOF
|
||||
# Search Query Change
|
||||
#
|
||||
resource "datadog_monitor" "search_query_change" {
|
||||
count = "${var.search_query_change_enabled ? 1 : 0}"
|
||||
count = "${var.search_query_change_enabled == "true" ? 1 : 0}"
|
||||
name = "[${var.environment}] Elasticsearch change alert on the number of currently active queries"
|
||||
message = "${coalesce(var.search_query_change_message, var.message)}"
|
||||
|
||||
@ -733,7 +733,7 @@ EOF
|
||||
# Fetch Change
|
||||
#
|
||||
resource "datadog_monitor" "fetch_change" {
|
||||
count = "${var.fetch_change_enabled ? 1 : 0}"
|
||||
count = "${var.fetch_change_enabled == "true" ? 1 : 0}"
|
||||
name = "[${var.environment}] Elasticsearch change alert on the number of search fetches currently running"
|
||||
message = "${coalesce(var.fetch_change_message, var.message)}"
|
||||
|
||||
@ -775,7 +775,7 @@ EOF
|
||||
# Field Data Evictions
|
||||
#
|
||||
resource "datadog_monitor" "field_data_evictions_change" {
|
||||
count = "${var.field_data_evictions_change_enabled ? 1 : 0}"
|
||||
count = "${var.field_data_evictions_change_enabled == "true" ? 1 : 0}"
|
||||
name = "[${var.environment}] Elasticsearch change alert on the total number of evictions from the fielddata cache"
|
||||
message = "${coalesce(var.field_data_evictions_change_message, var.message)}"
|
||||
|
||||
@ -818,7 +818,7 @@ EOF
|
||||
# Query Cache Evictions
|
||||
#
|
||||
resource "datadog_monitor" "query_cache_evictions_change" {
|
||||
count = "${var.query_cache_evictions_change_enabled ? 1 : 0}"
|
||||
count = "${var.query_cache_evictions_change_enabled == "true" ? 1 : 0}"
|
||||
name = "[${var.environment}] Elasticsearch change alert on the number of query cache evictions"
|
||||
message = "${coalesce(var.query_cache_evictions_change_message, var.message)}"
|
||||
|
||||
@ -861,7 +861,7 @@ EOF
|
||||
# Request Cache Evictions
|
||||
#
|
||||
resource "datadog_monitor" "request_cache_evictions_change" {
|
||||
count = "${var.request_cache_evictions_change_enabled ? 1 : 0}"
|
||||
count = "${var.request_cache_evictions_change_enabled == "true" ? 1 : 0}"
|
||||
name = "[${var.environment}] Elasticsearch change alert on the number of request cache evictions"
|
||||
message = "${coalesce(var.request_cache_evictions_change_message, var.message)}"
|
||||
|
||||
@ -904,7 +904,7 @@ EOF
|
||||
# Task Time in Queue
|
||||
#
|
||||
resource "datadog_monitor" "task_time_in_queue_change" {
|
||||
count = "${var.task_time_in_queue_change_enabled ? 1 : 0}"
|
||||
count = "${var.task_time_in_queue_change_enabled == "true" ? 1 : 0}"
|
||||
name = "[${var.environment}] Elasticsearch change alert on the average time spent by tasks in the queue"
|
||||
message = "${coalesce(var.task_time_in_queue_change_message, var.message)}"
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
resource "datadog_monitor" "mongodb_primary" {
|
||||
count = "${var.mongodb_primary_enabled ? 1 : 0}"
|
||||
count = "${var.mongodb_primary_enabled == "true" ? 1 : 0}"
|
||||
name = "[${var.environment}] MongoDB primary state"
|
||||
message = "${coalesce(var.mongodb_primary_message, var.message)}"
|
||||
|
||||
@ -25,7 +25,7 @@ resource "datadog_monitor" "mongodb_primary" {
|
||||
}
|
||||
|
||||
resource "datadog_monitor" "mongodb_secondary" {
|
||||
count = "${var.mongodb_secondary_enabled ? 1 : 0}"
|
||||
count = "${var.mongodb_secondary_enabled == "true" ? 1 : 0}"
|
||||
name = "[${var.environment}] MongoDB secondary missing"
|
||||
message = "${coalesce(var.mongodb_secondary_message, var.message)}"
|
||||
|
||||
@ -58,7 +58,7 @@ resource "datadog_monitor" "mongodb_secondary" {
|
||||
}
|
||||
|
||||
resource "datadog_monitor" "mongodb_server_count" {
|
||||
count = "${var.mongodb_server_count_enabled ? 1 : 0}"
|
||||
count = "${var.mongodb_server_count_enabled == "true" ? 1 : 0}"
|
||||
name = "[${var.environment}] MongoDB too much servers or wrong monitoring config"
|
||||
message = "${coalesce(var.mongodb_server_count_message, var.message)}"
|
||||
|
||||
@ -90,7 +90,7 @@ resource "datadog_monitor" "mongodb_server_count" {
|
||||
}
|
||||
|
||||
resource "datadog_monitor" "mongodb_replication" {
|
||||
count = "${var.mongodb_replication_enabled ? 1 : 0}"
|
||||
count = "${var.mongodb_replication_enabled == "true" ? 1 : 0}"
|
||||
name = "[${var.environment}] MongoDB replication lag"
|
||||
message = "${coalesce(var.mongodb_replication_message, var.message)}"
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
resource "datadog_monitor" "mysql_availability" {
|
||||
count = "${var.mysql_availability_enabled ? 1 : 0}"
|
||||
count = "${var.mysql_availability_enabled == "true" ? 1 : 0}"
|
||||
name = "[${var.environment}] Mysql server does not respond"
|
||||
message = "${coalesce(var.mysql_availability_message, var.message)}"
|
||||
|
||||
@ -30,7 +30,7 @@ resource "datadog_monitor" "mysql_availability" {
|
||||
}
|
||||
|
||||
resource "datadog_monitor" "mysql_connection" {
|
||||
count = "${var.mysql_connection_enabled ? 1 : 0}"
|
||||
count = "${var.mysql_connection_enabled == "true" ? 1 : 0}"
|
||||
name = "[${var.environment}] Mysql Connections limit {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}"
|
||||
message = "${coalesce(var.mysql_connection_message, var.message)}"
|
||||
type = "metric alert"
|
||||
@ -62,7 +62,7 @@ resource "datadog_monitor" "mysql_connection" {
|
||||
}
|
||||
|
||||
resource "datadog_monitor" "mysql_aborted" {
|
||||
count = "${var.mysql_aborted_enabled ? 1 : 0}"
|
||||
count = "${var.mysql_aborted_enabled == "true" ? 1 : 0}"
|
||||
name = "[${var.environment}] Mysql Aborted connects {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}"
|
||||
message = "${coalesce(var.mysql_aborted_message, var.message)}"
|
||||
type = "metric alert"
|
||||
@ -94,7 +94,7 @@ resource "datadog_monitor" "mysql_aborted" {
|
||||
}
|
||||
|
||||
resource "datadog_monitor" "mysql_slow" {
|
||||
count = "${var.mysql_slow_enabled ? 1 : 0}"
|
||||
count = "${var.mysql_slow_enabled == "true" ? 1 : 0}"
|
||||
name = "[${var.environment}] Mysql Slow queries {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}"
|
||||
message = "${coalesce(var.mysql_slow_message, var.message)}"
|
||||
type = "metric alert"
|
||||
@ -126,7 +126,7 @@ resource "datadog_monitor" "mysql_slow" {
|
||||
}
|
||||
|
||||
resource "datadog_monitor" "mysql_pool_efficiency" {
|
||||
count = "${var.mysql_pool_efficiency_enabled ? 1 : 0}"
|
||||
count = "${var.mysql_pool_efficiency_enabled == "true" ? 1 : 0}"
|
||||
name = "[${var.environment}] Mysql Innodb buffer pool efficiency {{#is_alert}}{{{comparator}}} {{threshold}} ({{value}}){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}} ({{value}}){{/is_warning}}"
|
||||
message = "${coalesce(var.mysql_pool_efficiency_message, var.message)}"
|
||||
type = "metric alert"
|
||||
@ -158,7 +158,7 @@ resource "datadog_monitor" "mysql_pool_efficiency" {
|
||||
}
|
||||
|
||||
resource "datadog_monitor" "mysql_pool_utilization" {
|
||||
count = "${var.mysql_pool_utilization_enabled ? 1 : 0}"
|
||||
count = "${var.mysql_pool_utilization_enabled == "true" ? 1 : 0}"
|
||||
name = "[${var.environment}] Mysql Innodb buffer pool utilization {{#is_alert}}{{{comparator}}} {{threshold}} ({{value}}){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}} ({{value}}){{/is_warning}}"
|
||||
message = "${coalesce(var.mysql_pool_utilization_message, var.message)}"
|
||||
type = "metric alert"
|
||||
@ -191,7 +191,7 @@ resource "datadog_monitor" "mysql_pool_utilization" {
|
||||
}
|
||||
|
||||
resource "datadog_monitor" "mysql_threads_anomaly" {
|
||||
count = "${var.mysql_threads_enabled ? 1 : 0}"
|
||||
count = "${var.mysql_threads_enabled == "true" ? 1 : 0}"
|
||||
name = "[${var.environment}] Mysql threads changed abnormally"
|
||||
message = "${coalesce(var.mysql_threads_message, var.message)}"
|
||||
type = "metric alert"
|
||||
@ -231,7 +231,7 @@ resource "datadog_monitor" "mysql_threads_anomaly" {
|
||||
}
|
||||
|
||||
resource "datadog_monitor" "mysql_questions_anomaly" {
|
||||
count = "${var.mysql_questions_enabled ? 1 : 0}"
|
||||
count = "${var.mysql_questions_enabled == "true" ? 1 : 0}"
|
||||
name = "[${var.environment}] Mysql queries changed abnormally"
|
||||
message = "${coalesce(var.mysql_questions_message, var.message)}"
|
||||
type = "metric alert"
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
resource "datadog_monitor" "postgresql_availability" {
|
||||
count = "${var.postgresql_availability_enabled ? 1 : 0}"
|
||||
count = "${var.postgresql_availability_enabled == "true" ? 1 : 0}"
|
||||
name = "[${var.environment}] PostgreSQL server does not respond"
|
||||
message = "${coalesce(var.postgresql_availability_message, var.message)}"
|
||||
|
||||
@ -30,7 +30,7 @@ resource "datadog_monitor" "postgresql_availability" {
|
||||
}
|
||||
|
||||
resource "datadog_monitor" "postgresql_connection_too_high" {
|
||||
count = "${var.postgresql_connection_enabled ? 1 : 0}"
|
||||
count = "${var.postgresql_connection_enabled == "true" ? 1 : 0}"
|
||||
name = "[${var.environment}] PostgreSQL Connections {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}"
|
||||
message = "${coalesce(var.postgresql_connection_message, var.message)}"
|
||||
type = "metric alert"
|
||||
@ -61,7 +61,7 @@ resource "datadog_monitor" "postgresql_connection_too_high" {
|
||||
}
|
||||
|
||||
resource "datadog_monitor" "postgresql_too_many_locks" {
|
||||
count = "${var.postgresql_lock_enabled ? 1 : 0}"
|
||||
count = "${var.postgresql_lock_enabled == "true" ? 1 : 0}"
|
||||
name = "[${var.environment}] PostgreSQL too many locks {{#is_alert}}{{{comparator}}} {{threshold}} ({{value}}){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}} ({{value}}){{/is_warning}}"
|
||||
message = "${coalesce(var.postgresql_lock_message, var.message)}"
|
||||
type = "metric alert"
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
# Service Check
|
||||
#
|
||||
resource "datadog_monitor" "not_responding" {
|
||||
count = "${var.not_responding_enabled ? 1 : 0}"
|
||||
count = "${var.not_responding_enabled == "true" ? 1 : 0}"
|
||||
name = "[${var.environment}] Redis does not respond"
|
||||
message = "${coalesce(var.not_responding_message, var.message)}"
|
||||
|
||||
@ -34,7 +34,7 @@ resource "datadog_monitor" "not_responding" {
|
||||
}
|
||||
|
||||
resource "datadog_monitor" "evicted_keys" {
|
||||
count = "${var.evictedkeys_change_enabled ? 1 : 0}"
|
||||
count = "${var.evictedkeys_change_enabled == "true" ? 1 : 0}"
|
||||
name = "[${var.environment}] Redis evicted keys {{#is_alert}}{{{comparator}}} {{threshold}}% (+{{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% (+{{value}}%){{/is_warning}}"
|
||||
message = "${coalesce(var.evictedkeys_change_message, var.message)}"
|
||||
|
||||
@ -67,7 +67,7 @@ EOL
|
||||
}
|
||||
|
||||
resource "datadog_monitor" "expirations" {
|
||||
count = "${var.expirations_rate_enabled ? 1 : 0}"
|
||||
count = "${var.expirations_rate_enabled == "true" ? 1 : 0}"
|
||||
name = "[${var.environment}] Redis expired keys {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}"
|
||||
message = "${coalesce(var.expirations_rate_message, var.message)}"
|
||||
|
||||
@ -100,7 +100,7 @@ EOL
|
||||
}
|
||||
|
||||
resource "datadog_monitor" "blocked_clients" {
|
||||
count = "${var.blocked_clients_enabled ? 1 : 0}"
|
||||
count = "${var.blocked_clients_enabled == "true" ? 1 : 0}"
|
||||
name = "[${var.environment}] Redis blocked clients {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}"
|
||||
message = "${coalesce(var.blocked_clients_message, var.message)}"
|
||||
|
||||
@ -134,7 +134,7 @@ EOL
|
||||
}
|
||||
|
||||
resource "datadog_monitor" "keyspace_full" {
|
||||
count = "${var.keyspace_enabled ? 1 : 0}"
|
||||
count = "${var.keyspace_enabled == "true" ? 1 : 0}"
|
||||
name = "[${var.environment}] Redis keyspace seems full (no changes since ${var.keyspace_timeframe})"
|
||||
message = "${coalesce(var.keyspace_message, var.message)}"
|
||||
|
||||
@ -167,7 +167,7 @@ EOL
|
||||
}
|
||||
|
||||
resource "datadog_monitor" "memory_used" {
|
||||
count = "${var.mem_used_enabled ? 1 : 0}"
|
||||
count = "${var.mem_used_enabled == "true" ? 1 : 0}"
|
||||
name = "[${var.environment}] Redis memory used {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}"
|
||||
message = "${coalesce(var.mem_used_message, var.message)}"
|
||||
|
||||
@ -201,7 +201,7 @@ EOL
|
||||
}
|
||||
|
||||
resource "datadog_monitor" "memory_frag" {
|
||||
count = "${var.mem_frag_enabled ? 1 : 0}"
|
||||
count = "${var.mem_frag_enabled == "true" ? 1 : 0}"
|
||||
name = "[${var.environment}] Redis memory fragmented {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}"
|
||||
message = "${coalesce(var.mem_frag_message, var.message)}"
|
||||
|
||||
@ -234,7 +234,7 @@ EOL
|
||||
}
|
||||
|
||||
resource "datadog_monitor" "rejected_connections" {
|
||||
count = "${var.rejected_con_enabled ? 1 : 0}"
|
||||
count = "${var.rejected_con_enabled == "true" ? 1 : 0}"
|
||||
name = "[${var.environment}] Redis rejected connections {{#is_alert}}{{{comparator}}} {{threshold}} ({{value}}){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}} ({{value}}){{/is_warning}}"
|
||||
message = "${coalesce(var.rejected_con_message, var.message)}"
|
||||
|
||||
@ -267,7 +267,7 @@ EOL
|
||||
}
|
||||
|
||||
resource "datadog_monitor" "latency" {
|
||||
count = "${var.latency_enabled ? 1 : 0}"
|
||||
count = "${var.latency_enabled == "true" ? 1 : 0}"
|
||||
name = "[${var.environment}] Redis latency {{#is_alert}}{{{comparator}}} {{threshold}}ms ({{value}}){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}ms ({{value}}){{/is_warning}}"
|
||||
message = "${coalesce(var.latency_message, var.message)}"
|
||||
|
||||
@ -300,7 +300,7 @@ EOL
|
||||
}
|
||||
|
||||
resource "datadog_monitor" "hitrate" {
|
||||
count = "${var.hitrate_enabled ? 1 : 0}"
|
||||
count = "${var.hitrate_enabled == "true" ? 1 : 0}"
|
||||
name = "[${var.environment}] Redis hitrate {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}"
|
||||
message = "${coalesce(var.hitrate_message, var.message)}"
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
resource "datadog_monitor" "datadog_apache_process" {
|
||||
count = "${var.apache_connect_enabled ? 1 : 0}"
|
||||
count = "${var.apache_connect_enabled == "true" ? 1 : 0}"
|
||||
name = "[${var.environment}] Apache vhost status does not respond"
|
||||
message = "${coalesce(var.apache_connect_message, var.message)}"
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
resource "datadog_monitor" "datadog_nginx_process" {
|
||||
count = "${var.nginx_connect_enabled ? 1 : 0}"
|
||||
count = "${var.nginx_connect_enabled == "true" ? 1 : 0}"
|
||||
name = "[${var.environment}] Nginx vhost status does not respond"
|
||||
message = "${coalesce(var.nginx_connect_message, var.message)}"
|
||||
|
||||
@ -30,7 +30,7 @@ resource "datadog_monitor" "datadog_nginx_process" {
|
||||
}
|
||||
|
||||
resource "datadog_monitor" "datadog_nginx_dropped_connections" {
|
||||
count = "${var.nginx_dropped_enabled ? 1 : 0}"
|
||||
count = "${var.nginx_dropped_enabled == "true" ? 1 : 0}"
|
||||
name = "[${var.environment}] Nginx dropped connections {{#is_alert}}{{{comparator}}} {{threshold}} ({{value}}){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}} ({{value}}){{/is_warning}}"
|
||||
message = "${coalesce(var.nginx_dropped_message, var.message)}"
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
resource "datadog_monitor" "php_fpm_connect" {
|
||||
count = "${var.php_fpm_connect_enabled ? 1 : 0}"
|
||||
count = "${var.php_fpm_connect_enabled == "true" ? 1 : 0}"
|
||||
name = "[${var.environment}] Php-fpm ping url does not respond"
|
||||
message = "${coalesce(var.php_fpm_connect_message, var.message)}"
|
||||
|
||||
@ -30,7 +30,7 @@ resource "datadog_monitor" "php_fpm_connect" {
|
||||
}
|
||||
|
||||
resource "datadog_monitor" "php_fpm_connect_idle" {
|
||||
count = "${var.php_fpm_busy_enabled ? 1 : 0}"
|
||||
count = "${var.php_fpm_busy_enabled == "true" ? 1 : 0}"
|
||||
name = "[${var.environment}] Php-fpm busy worker {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}"
|
||||
message = "${coalesce(var.php_fpm_busy_message, var.message)}"
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
resource "datadog_monitor" "cpu" {
|
||||
count = "${var.cpu_enabled ? 1 : 0}"
|
||||
count = "${var.cpu_enabled == "true" ? 1 : 0}"
|
||||
name = "[${var.environment}] CPU usage {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}"
|
||||
message = "${coalesce(var.cpu_message, var.message)}"
|
||||
|
||||
@ -31,7 +31,7 @@ resource "datadog_monitor" "cpu" {
|
||||
}
|
||||
|
||||
resource "datadog_monitor" "load" {
|
||||
count = "${var.load_enabled ? 1 : 0}"
|
||||
count = "${var.load_enabled == "true" ? 1 : 0}"
|
||||
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.load_message, var.message)}"
|
||||
|
||||
@ -63,7 +63,7 @@ resource "datadog_monitor" "load" {
|
||||
}
|
||||
|
||||
resource "datadog_monitor" "disk_space" {
|
||||
count = "${var.disk_space_enabled ? 1 : 0}"
|
||||
count = "${var.disk_space_enabled == "true" ? 1 : 0}"
|
||||
name = "[${var.environment}] Disk space usage {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}"
|
||||
message = "${coalesce(var.disk_space_message, var.message)}"
|
||||
|
||||
@ -95,7 +95,7 @@ resource "datadog_monitor" "disk_space" {
|
||||
}
|
||||
|
||||
resource "datadog_monitor" "disk_space_forecast" {
|
||||
count = "${var.disk_space_forecast_enabled ? 1 : 0}"
|
||||
count = "${var.disk_space_forecast_enabled == "true" ? 1 : 0}"
|
||||
name = "[${var.environment}] Disk Space usage could reach {{#is_alert}}{{threshold}}%{{/is_alert}} in a near future"
|
||||
message = "${coalesce(var.disk_space_forecast_message, var.message)}"
|
||||
|
||||
@ -135,7 +135,7 @@ resource "datadog_monitor" "disk_space_forecast" {
|
||||
}
|
||||
|
||||
resource "datadog_monitor" "disk_inodes" {
|
||||
count = "${var.disk_inodes_enabled ? 1 : 0}"
|
||||
count = "${var.disk_inodes_enabled == "true" ? 1 : 0}"
|
||||
name = "[${var.environment}] Disk inodes usage {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}"
|
||||
message = "${coalesce(var.disk_inodes_message, var.message)}"
|
||||
|
||||
@ -167,7 +167,7 @@ resource "datadog_monitor" "disk_inodes" {
|
||||
}
|
||||
|
||||
resource "datadog_monitor" "memory" {
|
||||
count = "${var.memory_enabled ? 1 : 0}"
|
||||
count = "${var.memory_enabled == "true" ? 1 : 0}"
|
||||
name = "[${var.environment}] Usable Memory {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}"
|
||||
message = "${var.memory_message}"
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
resource "datadog_monitor" "host_unreachable" {
|
||||
count = "${var.unreachable_enabled ? 1 : 0}"
|
||||
count = "${var.unreachable_enabled == "true" ? 1 : 0}"
|
||||
name = "[${var.environment}] Host unreachable"
|
||||
message = "${coalesce(var.unreachable_message, var.message)}"
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user