MON-76: Azure Redis - DataDog Monitors
This commit is contained in:
parent
22e7021681
commit
6e6147088c
31
cloud/azure/redis/inputs.tf
Normal file
31
cloud/azure/redis/inputs.tf
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
# Global Terraform
|
||||||
|
variable "client_name" {
|
||||||
|
type = "string"
|
||||||
|
}
|
||||||
|
|
||||||
|
variable "environment" {
|
||||||
|
type = "string"
|
||||||
|
}
|
||||||
|
|
||||||
|
variable "stack" {
|
||||||
|
type = "string"
|
||||||
|
}
|
||||||
|
|
||||||
|
# Global DataDog
|
||||||
|
variable "critical_escalation_group" {
|
||||||
|
}
|
||||||
|
|
||||||
|
variable "warning_escalation_group" {
|
||||||
|
}
|
||||||
|
|
||||||
|
variable "delay" {
|
||||||
|
default = 600
|
||||||
|
}
|
||||||
|
|
||||||
|
# Azure Redis specific
|
||||||
|
variable "evictedkeys_threshold_warning" {
|
||||||
|
default = 0
|
||||||
|
}
|
||||||
|
variable "evictedkeys_threshold_critical" {
|
||||||
|
default = 100
|
||||||
|
}
|
||||||
42
cloud/azure/redis/monitors-azure-redis.tf
Normal file
42
cloud/azure/redis/monitors-azure-redis.tf
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
resource "datadog_monitor" "status" {
|
||||||
|
name = "[${var.environment}] Redis {{name}} is down"
|
||||||
|
message = "{{#is_alert}}\n${var.critical_escalation_group} \n{{/is_alert}} \n{{#is_recovery}}\n${var.critical_escalation_group}\n{{/is_recovery}}"
|
||||||
|
|
||||||
|
query = "avg(last_5m):avg:azure.cache_redis.status{*} by {name,resource_group} != 1"
|
||||||
|
type = "query alert"
|
||||||
|
|
||||||
|
notify_no_data = false
|
||||||
|
evaluation_delay = "${var.delay}"
|
||||||
|
renotify_interval = 60
|
||||||
|
notify_audit = false
|
||||||
|
timeout_h = 0
|
||||||
|
include_tags = true
|
||||||
|
locked = false
|
||||||
|
require_full_window = true
|
||||||
|
new_host_delay = "${var.delay}"
|
||||||
|
no_data_timeframe = 20
|
||||||
|
}
|
||||||
|
|
||||||
|
resource "datadog_monitor" "evictedkeys" {
|
||||||
|
name = "[${var.environment}] Redis {{value}} evictedkeys on {{name}}"
|
||||||
|
message = "{{#is_alert}}\n${var.critical_escalation_group} \n{{/is_alert}} \n{{#is_recovery}}\n${var.critical_escalation_group}\n{{/is_recovery}}"
|
||||||
|
|
||||||
|
query = "avg(last_5m):avg:azure.cache_redis.evictedkeys{*} by {name,resource_group} > ${var.evictedkeys_threshold_critical}"
|
||||||
|
type = "query alert"
|
||||||
|
|
||||||
|
thresholds {
|
||||||
|
warning = "${var.evictedkeys_threshold_warning}"
|
||||||
|
critical = "${var.evictedkeys_threshold_critical}"
|
||||||
|
}
|
||||||
|
|
||||||
|
notify_no_data = false
|
||||||
|
evaluation_delay = "${var.delay}"
|
||||||
|
renotify_interval = 60
|
||||||
|
notify_audit = false
|
||||||
|
timeout_h = 0
|
||||||
|
include_tags = true
|
||||||
|
locked = false
|
||||||
|
require_full_window = true
|
||||||
|
new_host_delay = "${var.delay}"
|
||||||
|
no_data_timeframe = 20
|
||||||
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user