MON-76: Readme update with inputs
This commit is contained in:
parent
505e0df14c
commit
814ee2838d
@ -24,6 +24,23 @@ Creates a DataDog monitors with the following checks :
|
|||||||
* Processor time (percent) threshold
|
* Processor time (percent) threshold
|
||||||
* Server CPU load threshold
|
* Server CPU load threshold
|
||||||
|
|
||||||
|
Inputs
|
||||||
|
------
|
||||||
|
|
||||||
|
| Name | Description | Type | Default | Required |
|
||||||
|
|------|-------------|:----:|:-----:|:-----:|
|
||||||
|
| client_name | Client name | string | - | yes |
|
||||||
|
| delay | Delay in seconds for the metric evaluation | string | `600` | no |
|
||||||
|
| environment | Architecture environment | string | - | yes |
|
||||||
|
| evictedkeys_limit_threshold_critical | Evicted keys limit (critical threshold) | string | `100` | no |
|
||||||
|
| evictedkeys_limit_threshold_warning | Evicted keys limit (warning threshold) | string | `0` | no |
|
||||||
|
| message | Message sent when a Redis monitor is triggered | string | - | yes |
|
||||||
|
| percent_processor_time_threshold_critical | Processor time percent (critical threshold) | string | `80` | no |
|
||||||
|
| percent_processor_time_threshold_warning | Processor time percent (warning threshold) | string | `60` | no |
|
||||||
|
| server_load_rate_threshold_critical | Server CPU load rate (critical threshold) | string | `90` | no |
|
||||||
|
| server_load_rate_threshold_warning | Server CPU load rate (warning threshold) | string | `70` | no |
|
||||||
|
| use_filter_tags | Filter the data with service tags if true | string | `true` | no |
|
||||||
|
|
||||||
Related documentation
|
Related documentation
|
||||||
---------------------
|
---------------------
|
||||||
|
|
||||||
|
|||||||
@ -1,10 +1,12 @@
|
|||||||
# Global Terraform
|
# Global Terraform
|
||||||
variable "client_name" {
|
variable "client_name" {
|
||||||
type = "string"
|
description = "Client name"
|
||||||
|
type = "string"
|
||||||
}
|
}
|
||||||
|
|
||||||
variable "environment" {
|
variable "environment" {
|
||||||
type = "string"
|
description = "Architecture environment"
|
||||||
|
type = "string"
|
||||||
}
|
}
|
||||||
|
|
||||||
# Global DataDog
|
# Global DataDog
|
||||||
@ -14,7 +16,7 @@ variable "message" {
|
|||||||
|
|
||||||
variable "delay" {
|
variable "delay" {
|
||||||
description = "Delay in seconds for the metric evaluation"
|
description = "Delay in seconds for the metric evaluation"
|
||||||
default = 600
|
default = 600
|
||||||
}
|
}
|
||||||
|
|
||||||
variable "use_filter_tags" {
|
variable "use_filter_tags" {
|
||||||
@ -24,25 +26,31 @@ variable "use_filter_tags" {
|
|||||||
|
|
||||||
# Azure Redis specific
|
# Azure Redis specific
|
||||||
variable "evictedkeys_limit_threshold_warning" {
|
variable "evictedkeys_limit_threshold_warning" {
|
||||||
default = 0
|
description = "Evicted keys limit (warning threshold)"
|
||||||
|
default = 0
|
||||||
}
|
}
|
||||||
|
|
||||||
variable "evictedkeys_limit_threshold_critical" {
|
variable "evictedkeys_limit_threshold_critical" {
|
||||||
default = 100
|
description = "Evicted keys limit (critical threshold)"
|
||||||
|
default = 100
|
||||||
}
|
}
|
||||||
|
|
||||||
variable "percent_processor_time_threshold_critical" {
|
variable "percent_processor_time_threshold_critical" {
|
||||||
default = 80
|
description = "Processor time percent (critical threshold)"
|
||||||
|
default = 80
|
||||||
}
|
}
|
||||||
|
|
||||||
variable "percent_processor_time_threshold_warning" {
|
variable "percent_processor_time_threshold_warning" {
|
||||||
default = 60
|
description = "Processor time percent (warning threshold)"
|
||||||
|
default = 60
|
||||||
}
|
}
|
||||||
|
|
||||||
variable "server_load_rate_threshold_critical" {
|
variable "server_load_rate_threshold_critical" {
|
||||||
default = 90
|
description = "Server CPU load rate (critical threshold)"
|
||||||
|
default = 90
|
||||||
}
|
}
|
||||||
|
|
||||||
variable "server_load_rate_threshold_warning" {
|
variable "server_load_rate_threshold_warning" {
|
||||||
default = 70
|
description = "Server CPU load rate (warning threshold)"
|
||||||
|
default = 70
|
||||||
}
|
}
|
||||||
|
|||||||
@ -13,7 +13,8 @@ resource "datadog_monitor" "status" {
|
|||||||
query = <<EOF
|
query = <<EOF
|
||||||
avg(last_5m):avg:azure.cache_redis.status{${data.template_file.filter.rendered}} by {name,resource_group} != 1
|
avg(last_5m):avg:azure.cache_redis.status{${data.template_file.filter.rendered}} by {name,resource_group} != 1
|
||||||
EOF
|
EOF
|
||||||
type = "query alert"
|
|
||||||
|
type = "query alert"
|
||||||
|
|
||||||
notify_no_data = false
|
notify_no_data = false
|
||||||
evaluation_delay = "${var.delay}"
|
evaluation_delay = "${var.delay}"
|
||||||
@ -36,7 +37,8 @@ resource "datadog_monitor" "evictedkeys" {
|
|||||||
avg:azure.cache_redis.evictedkeys{${data.template_file.filter.rendered}} by {name,resource_group}
|
avg:azure.cache_redis.evictedkeys{${data.template_file.filter.rendered}} by {name,resource_group}
|
||||||
) > ${var.evictedkeys_limit_threshold_critical}
|
) > ${var.evictedkeys_limit_threshold_critical}
|
||||||
EOF
|
EOF
|
||||||
type = "query alert"
|
|
||||||
|
type = "query alert"
|
||||||
|
|
||||||
thresholds {
|
thresholds {
|
||||||
warning = "${var.evictedkeys_limit_threshold_warning}"
|
warning = "${var.evictedkeys_limit_threshold_warning}"
|
||||||
@ -64,7 +66,8 @@ resource "datadog_monitor" "percent_processor_time" {
|
|||||||
avg:azure.cache_redis.percent_processor_time{${data.template_file.filter.rendered}} by {name,resource_group}
|
avg:azure.cache_redis.percent_processor_time{${data.template_file.filter.rendered}} by {name,resource_group}
|
||||||
) > ${var.percent_processor_time_threshold_critical}
|
) > ${var.percent_processor_time_threshold_critical}
|
||||||
EOF
|
EOF
|
||||||
type = "query alert"
|
|
||||||
|
type = "query alert"
|
||||||
|
|
||||||
thresholds {
|
thresholds {
|
||||||
warning = "${var.percent_processor_time_threshold_warning}"
|
warning = "${var.percent_processor_time_threshold_warning}"
|
||||||
@ -92,7 +95,8 @@ resource "datadog_monitor" "server_load" {
|
|||||||
avg:azure.cache_redis.server_load{${data.template_file.filter.rendered}} by {name,resource_group}
|
avg:azure.cache_redis.server_load{${data.template_file.filter.rendered}} by {name,resource_group}
|
||||||
) > ${var.server_load_rate_threshold_critical}
|
) > ${var.server_load_rate_threshold_critical}
|
||||||
EOF
|
EOF
|
||||||
type = "query alert"
|
|
||||||
|
type = "query alert"
|
||||||
|
|
||||||
thresholds {
|
thresholds {
|
||||||
warning = "${var.server_load_rate_threshold_warning}"
|
warning = "${var.server_load_rate_threshold_warning}"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user