MON-80 Add c2d and d2c monitors
This commit is contained in:
parent
4c474be541
commit
effaaf0e12
@ -43,8 +43,6 @@ variable "status_message" {}
|
|||||||
|
|
||||||
variable "total_devices_message" {}
|
variable "total_devices_message" {}
|
||||||
|
|
||||||
variable "c2d_methods_failed_message" {}
|
|
||||||
|
|
||||||
variable "c2d_methods_failed_threshold_warning" {
|
variable "c2d_methods_failed_threshold_warning" {
|
||||||
default = 0
|
default = 0
|
||||||
}
|
}
|
||||||
@ -52,3 +50,45 @@ variable "c2d_methods_failed_threshold_warning" {
|
|||||||
variable "c2d_methods_failed_threshold_critical" {
|
variable "c2d_methods_failed_threshold_critical" {
|
||||||
default = 10
|
default = 10
|
||||||
}
|
}
|
||||||
|
|
||||||
|
variable "c2d_methods_failed_message" {}
|
||||||
|
|
||||||
|
variable "c2d_twin_read_failed_threshold_warning" {
|
||||||
|
default = 0
|
||||||
|
}
|
||||||
|
|
||||||
|
variable "c2d_twin_read_failed_threshold_critical" {
|
||||||
|
default = 10
|
||||||
|
}
|
||||||
|
|
||||||
|
variable "c2d_twin_read_failed_message" {}
|
||||||
|
|
||||||
|
variable "c2d_twin_update_failed_threshold_warning" {
|
||||||
|
default = 0
|
||||||
|
}
|
||||||
|
|
||||||
|
variable "c2d_twin_update_failed_threshold_critical" {
|
||||||
|
default = 10
|
||||||
|
}
|
||||||
|
|
||||||
|
variable "c2d_twin_update_failed_message" {}
|
||||||
|
|
||||||
|
variable "d2c_twin_read_failed_threshold_warning" {
|
||||||
|
default = 0
|
||||||
|
}
|
||||||
|
|
||||||
|
variable "d2c_twin_read_failed_threshold_critical" {
|
||||||
|
default = 10
|
||||||
|
}
|
||||||
|
|
||||||
|
variable "d2c_twin_read_failed_message" {}
|
||||||
|
|
||||||
|
variable "d2c_twin_update_failed_threshold_warning" {
|
||||||
|
default = 0
|
||||||
|
}
|
||||||
|
|
||||||
|
variable "d2c_twin_update_failed_threshold_critical" {
|
||||||
|
default = 10
|
||||||
|
}
|
||||||
|
|
||||||
|
variable "d2c_twin_update_failed_message" {}
|
||||||
@ -131,3 +131,99 @@ resource "datadog_monitor" "too_many_c2d_methods_failed" {
|
|||||||
new_host_delay = "${var.delay}"
|
new_host_delay = "${var.delay}"
|
||||||
no_data_timeframe = 20
|
no_data_timeframe = 20
|
||||||
}
|
}
|
||||||
|
|
||||||
|
resource "datadog_monitor" "too_many_c2d_twin_read_failed" {
|
||||||
|
name = "[${var.environment}] Too many c2d twin read failure on {{name}} "
|
||||||
|
message = "${var.c2d_twin_read_failed_message}"
|
||||||
|
|
||||||
|
query = "avg(last_5m):( avg:azure.devices_iothubs.c2d.twin.read.failure{*} by {name,resource_group}.as_count() / ( avg:azure.devices_iothubs.c2d.twin.read.failure{*} by {name,resource_group}.as_count() + avg:azure.devices_iothubs.c2d.twin.read.success{*} by {name,resource_group}.as_count() ) ) * 100 > ${var.c2d_twin_read_failed_threshold_critical}"
|
||||||
|
type = "query alert"
|
||||||
|
|
||||||
|
thresholds {
|
||||||
|
warning = "${var.c2d_twin_read_failed_threshold_warning}"
|
||||||
|
critical = "${var.c2d_twin_read_failed_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
|
||||||
|
}
|
||||||
|
|
||||||
|
resource "datadog_monitor" "too_many_c2d_twin_update_failed" {
|
||||||
|
name = "[${var.environment}] Too many c2d twin update failure on {{name}} "
|
||||||
|
message = "${var.c2d_twin_update_failed_message}"
|
||||||
|
|
||||||
|
query = "avg(last_5m):( avg:azure.devices_iothubs.c2d.twin.update.failure{*} by {name,resource_group}.as_count() / ( avg:azure.devices_iothubs.c2d.twin.update.failure{*} by {name,resource_group}.as_count() + avg:azure.devices_iothubs.c2d.twin.update.success{*} by {name,resource_group}.as_count() ) ) * 100 > ${var.c2d_twin_update_failed_threshold_critical}"
|
||||||
|
type = "query alert"
|
||||||
|
|
||||||
|
thresholds {
|
||||||
|
warning = "${var.c2d_twin_update_failed_threshold_warning}"
|
||||||
|
critical = "${var.c2d_twin_update_failed_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
|
||||||
|
}
|
||||||
|
|
||||||
|
resource "datadog_monitor" "too_many_d2c_twin_read_failed" {
|
||||||
|
name = "[${var.environment}] Too many d2c twin read failure on {{name}} "
|
||||||
|
message = "${var.d2c_twin_read_failed_message}"
|
||||||
|
|
||||||
|
query = "avg(last_5m):( avg:azure.devices_iothubs.d2c.twin.read.failure{*} by {name,resource_group}.as_count() / ( avg:azure.devices_iothubs.d2c.twin.read.failure{*} by {name,resource_group}.as_count() + avg:azure.devices_iothubs.d2c.twin.read.success{*} by {name,resource_group}.as_count() ) ) * 100 > ${var.d2c_twin_read_failed_threshold_critical}"
|
||||||
|
type = "query alert"
|
||||||
|
|
||||||
|
thresholds {
|
||||||
|
warning = "${var.d2c_twin_read_failed_threshold_warning}"
|
||||||
|
critical = "${var.d2c_twin_read_failed_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
|
||||||
|
}
|
||||||
|
|
||||||
|
resource "datadog_monitor" "too_many_d2c_twin_update_failed" {
|
||||||
|
name = "[${var.environment}] Too many d2c twin update failure on {{name}} "
|
||||||
|
message = "${var.d2c_twin_update_failed_message}"
|
||||||
|
|
||||||
|
query = "avg(last_5m):( avg:azure.devices_iothubs.d2c.twin.update.failure{*} by {name,resource_group}.as_count() / ( avg:azure.devices_iothubs.d2c.twin.update.failure{*} by {name,resource_group}.as_count() + avg:azure.devices_iothubs.d2c.twin.update.success{*} by {name,resource_group}.as_count() ) ) * 100 > ${var.d2c_twin_update_failed_threshold_critical}"
|
||||||
|
type = "query alert"
|
||||||
|
|
||||||
|
thresholds {
|
||||||
|
warning = "${var.d2c_twin_update_failed_threshold_warning}"
|
||||||
|
critical = "${var.d2c_twin_update_failed_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