MON-185 - Monitor updated with last best practices
This commit is contained in:
parent
aa214124ae
commit
71e67671dd
@ -152,6 +152,8 @@ Inputs
|
|||||||
| redis_status_silenced | Groups to mute for Redis status monitor | map | `<map>` | no |
|
| redis_status_silenced | Groups to mute for Redis status monitor | map | `<map>` | no |
|
||||||
| servicebus_status_message | Custom message for Service Bus status monitor | string | `` | no |
|
| servicebus_status_message | Custom message for Service Bus status monitor | string | `` | no |
|
||||||
| servicebus_status_silenced | Groups to mute for Service Bus status monitor | map | `<map>` | no |
|
| servicebus_status_silenced | Groups to mute for Service Bus status monitor | map | `<map>` | no |
|
||||||
|
| servicebus_status_timeframe | Monitor timeframe for Service Bus status [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | `last_15m` | no |
|
||||||
|
| servicebus_status_aggregator | Monitor timeframe aggregator for Service Bus status [available values: min, max, sum or avg] | string | `min` | no |
|
||||||
| sqldatabase_cpu_message | Custom message for SQL CPU monitor | string | `` | no |
|
| sqldatabase_cpu_message | Custom message for SQL CPU monitor | string | `` | no |
|
||||||
| sqldatabase_cpu_silenced | Groups to mute for SQL CPU monitor | map | `<map>` | no |
|
| sqldatabase_cpu_silenced | Groups to mute for SQL CPU monitor | map | `<map>` | no |
|
||||||
| sqldatabase_cpu_threshold_critical | CPU usage in percent (critical threshold) | string | `90` | no |
|
| sqldatabase_cpu_threshold_critical | CPU usage in percent (critical threshold) | string | `90` | no |
|
||||||
|
|||||||
@ -668,6 +668,17 @@ variable "servicebus_status_message" {
|
|||||||
default = ""
|
default = ""
|
||||||
}
|
}
|
||||||
|
|
||||||
|
variable "servicebus_status_aggregator" {
|
||||||
|
description = "Monitor aggregator for Service Bus status [available values: min, max, sum or avg]"
|
||||||
|
type = "string"
|
||||||
|
default = "min"
|
||||||
|
}
|
||||||
|
|
||||||
|
variable "servicebus_status_timeframe" {
|
||||||
|
description = "Monitor timeframe for Service Bus status [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`]"
|
||||||
|
default = "last_15m"
|
||||||
|
}
|
||||||
|
|
||||||
# Azure SQL Database specific variables
|
# Azure SQL Database specific variables
|
||||||
variable "sqldatabase_cpu_silenced" {
|
variable "sqldatabase_cpu_silenced" {
|
||||||
description = "Groups to mute for SQL CPU monitor"
|
description = "Groups to mute for SQL CPU monitor"
|
||||||
|
|||||||
@ -178,8 +178,10 @@ module "servicebus" {
|
|||||||
filter_tags_use_defaults = "${var.filter_tags_use_defaults}"
|
filter_tags_use_defaults = "${var.filter_tags_use_defaults}"
|
||||||
filter_tags_custom = "${var.filter_tags_custom}"
|
filter_tags_custom = "${var.filter_tags_custom}"
|
||||||
|
|
||||||
status_silenced = "${var.servicebus_status_silenced}"
|
status_silenced = "${var.servicebus_status_silenced}"
|
||||||
status_message = "${var.servicebus_status_message}"
|
status_message = "${var.servicebus_status_message}"
|
||||||
|
status_timeframe = "${var.servicebus_status_timeframe}"
|
||||||
|
status_timeframe_aggregator = "${var.servicebus_status_aggregator}"
|
||||||
}
|
}
|
||||||
|
|
||||||
module "sqldatabase" {
|
module "sqldatabase" {
|
||||||
|
|||||||
@ -31,6 +31,8 @@ Inputs
|
|||||||
| message | Message sent when an alert is triggered | string | - | yes |
|
| message | Message sent when an alert is triggered | string | - | yes |
|
||||||
| status_message | Custom message for Service Bus status monitor | string | `` | no |
|
| status_message | Custom message for Service Bus status monitor | string | `` | no |
|
||||||
| status_silenced | Groups to mute for Service Bus status monitor | map | `<map>` | no |
|
| status_silenced | Groups to mute for Service Bus status monitor | map | `<map>` | no |
|
||||||
|
| status_timeframe | Monitor timeframe for Service Bus status [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | `last_15m` | no |
|
||||||
|
| status_aggregator | Monitor aggregator for Service Bus status [available values: min, max, sum or avg] | string | `min` | no |
|
||||||
|
|
||||||
Related documentation
|
Related documentation
|
||||||
---------------------
|
---------------------
|
||||||
|
|||||||
@ -36,3 +36,14 @@ variable "status_message" {
|
|||||||
type = "string"
|
type = "string"
|
||||||
default = ""
|
default = ""
|
||||||
}
|
}
|
||||||
|
|
||||||
|
variable "status_aggregator" {
|
||||||
|
description = "Monitor aggregator for Service Bus status [available values: min, max, sum or avg]"
|
||||||
|
type = "string"
|
||||||
|
default = "min"
|
||||||
|
}
|
||||||
|
|
||||||
|
variable "status_timeframe" {
|
||||||
|
description = "Monitor timeframe for Service Bus status [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`]"
|
||||||
|
default = "last_15m"
|
||||||
|
}
|
||||||
|
|||||||
@ -11,7 +11,9 @@ resource "datadog_monitor" "servicebus_status" {
|
|||||||
message = "${coalesce(var.status_message, var.message)}"
|
message = "${coalesce(var.status_message, var.message)}"
|
||||||
|
|
||||||
query = <<EOF
|
query = <<EOF
|
||||||
min(last_5m): avg:azure.servicebus_namespaces.status{${data.template_file.filter.rendered}} by {resource_group,region,name} != 1
|
${var.status_aggregator}(${var.status_timeframe}): (
|
||||||
|
${var.status_aggregator}:azure.servicebus_namespaces.status{${data.template_file.filter.rendered}} by {resource_group,region,name}
|
||||||
|
) != 1
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
type = "metric alert"
|
type = "metric alert"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user