20 lines
596 B
HCL
20 lines
596 B
HCL
resource "datadog_monitor" "app_monitor" {
|
|
name = "Kubernetes Pod Health"
|
|
type = "metric alert"
|
|
message = "Kubernetes Pods are not in an optimal health state. Notify: @operator"
|
|
escalation_message = "Please investigate the Kubernetes Pods, @operator"
|
|
|
|
query = "max(last_1m):sum:docker.containers.running{short_image:${var.app_name} <= 1"
|
|
|
|
monitor_thresholds {
|
|
ok = 3
|
|
warning = 2
|
|
critical = 1
|
|
}
|
|
|
|
notify_no_data = true
|
|
|
|
tags = ["cfa:${var.cfa_name}", "team:${var.team_name}", "app:${var.app_name}", "env:${var.stage}"]
|
|
}
|
|
|