Merged in TER-209-add-bitbucket-pipelines-to-suppo (pull request #40)
TER-209 add bitbucket pipelines to suppo Approved-by: Adrien Bréfort <adrien.brefort@fr.clara.net>
This commit is contained in:
commit
37d83aa0f2
13
.gitignore
vendored
13
.gitignore
vendored
@ -1,10 +1,3 @@
|
|||||||
# Ignore all volatile files
|
.terraform
|
||||||
**/.terraform/modules
|
main.tf
|
||||||
**/.terraform/plugins
|
terraform.tfvars
|
||||||
**/terraform.tfstate*.backup
|
|
||||||
|
|
||||||
# Ignore all credentials files
|
|
||||||
**/terraform.tfvars
|
|
||||||
|
|
||||||
# Ignore all but root state files
|
|
||||||
**/terraform.tfstate
|
|
||||||
|
|||||||
15
bitbucket-pipelines.yml
Normal file
15
bitbucket-pipelines.yml
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
image: hashicorp/terraform:0.10.8
|
||||||
|
|
||||||
|
pipelines:
|
||||||
|
default:
|
||||||
|
- step:
|
||||||
|
name: Format
|
||||||
|
script:
|
||||||
|
- terraform fmt -write=false -diff -check
|
||||||
|
- step:
|
||||||
|
name: Validate
|
||||||
|
script:
|
||||||
|
- mv main.tf.ci main.tf
|
||||||
|
- mv terraform.tfvars.ci terraform.tfvars
|
||||||
|
- terraform init
|
||||||
|
- terraform validate
|
||||||
@ -12,6 +12,7 @@ resource "datadog_monitor" "es_cluster_status" {
|
|||||||
message = "${var.message}"
|
message = "${var.message}"
|
||||||
|
|
||||||
type = "query alert"
|
type = "query alert"
|
||||||
|
|
||||||
query = <<EOF
|
query = <<EOF
|
||||||
max(last_30m): (
|
max(last_30m): (
|
||||||
avg:aws.es.cluster_statusred{${data.template_file.filter.rendered}} by {region,name} * 2 +
|
avg:aws.es.cluster_statusred{${data.template_file.filter.rendered}} by {region,name} * 2 +
|
||||||
@ -45,6 +46,7 @@ resource "datadog_monitor" "es_free_space_low" {
|
|||||||
message = "${var.message}"
|
message = "${var.message}"
|
||||||
|
|
||||||
type = "query alert"
|
type = "query alert"
|
||||||
|
|
||||||
query = <<EOF
|
query = <<EOF
|
||||||
avg(last_15m): (
|
avg(last_15m): (
|
||||||
avg:aws.es.free_storage_space{${data.template_file.filter.rendered}} by {region,name} / (${var.es_cluster_volume_size}*1000) * 100
|
avg:aws.es.free_storage_space{${data.template_file.filter.rendered}} by {region,name} / (${var.es_cluster_volume_size}*1000) * 100
|
||||||
@ -76,6 +78,7 @@ resource "datadog_monitor" "es_cpu_90_15min" {
|
|||||||
message = "${var.message}"
|
message = "${var.message}"
|
||||||
|
|
||||||
type = "query alert"
|
type = "query alert"
|
||||||
|
|
||||||
query = <<EOF
|
query = <<EOF
|
||||||
avg(last_15m): (
|
avg(last_15m): (
|
||||||
avg:aws.es.cpuutilization{${data.template_file.filter.rendered}} by {region,name}
|
avg:aws.es.cpuutilization{${data.template_file.filter.rendered}} by {region,name}
|
||||||
|
|||||||
@ -15,6 +15,7 @@ resource "datadog_monitor" "apimgt_status" {
|
|||||||
query = <<EOF
|
query = <<EOF
|
||||||
avg(last_5m):avg:azure.apimanagement_service.status{${data.template_file.filter.rendered}} by {resource_group,region,name} < 1
|
avg(last_5m):avg:azure.apimanagement_service.status{${data.template_file.filter.rendered}} by {resource_group,region,name} < 1
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
type = "metric alert"
|
type = "metric alert"
|
||||||
|
|
||||||
thresholds {
|
thresholds {
|
||||||
|
|||||||
@ -13,6 +13,7 @@ resource "datadog_monitor" "eventhub_status" {
|
|||||||
query = <<EOF
|
query = <<EOF
|
||||||
avg(last_5m): avg:azure.eventhub_namespaces.status{${data.template_file.filter.rendered}} by {resource_group,region,name} != 1
|
avg(last_5m): avg:azure.eventhub_namespaces.status{${data.template_file.filter.rendered}} by {resource_group,region,name} != 1
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
type = "metric alert"
|
type = "metric alert"
|
||||||
|
|
||||||
notify_no_data = true
|
notify_no_data = true
|
||||||
@ -41,6 +42,7 @@ resource "datadog_monitor" "eventhub_failed_requests" {
|
|||||||
avg:azure.eventhub_namespaces.failed_requests{${data.template_file.filter.rendered}} by {resource_group,region,name}.as_count()
|
avg:azure.eventhub_namespaces.failed_requests{${data.template_file.filter.rendered}} by {resource_group,region,name}.as_count()
|
||||||
) * 100 > ${var.failed_requests_rate_thresold_critical}
|
) * 100 > ${var.failed_requests_rate_thresold_critical}
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
type = "metric alert"
|
type = "metric alert"
|
||||||
|
|
||||||
thresholds {
|
thresholds {
|
||||||
@ -78,6 +80,7 @@ resource "datadog_monitor" "eventhub_errors" {
|
|||||||
avg:azure.eventhub_namespaces.other_errors{${data.template_file.filter.rendered}} by {resource_group,region,name}.as_count()
|
avg:azure.eventhub_namespaces.other_errors{${data.template_file.filter.rendered}} by {resource_group,region,name}.as_count()
|
||||||
) * 100 > ${var.errors_rate_thresold_critical}
|
) * 100 > ${var.errors_rate_thresold_critical}
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
type = "metric alert"
|
type = "metric alert"
|
||||||
|
|
||||||
thresholds {
|
thresholds {
|
||||||
|
|||||||
@ -69,4 +69,3 @@ variable "authorization_error_requests_threshold_critical" {
|
|||||||
description = "Maximum acceptable percent of authorization error requests for a storage"
|
description = "Maximum acceptable percent of authorization error requests for a storage"
|
||||||
default = 15
|
default = 15
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -122,7 +122,6 @@ EOF
|
|||||||
tags = ["env:${var.environment}", "resource:storage", "team:azure", "provider:azure"]
|
tags = ["env:${var.environment}", "resource:storage", "team:azure", "provider:azure"]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
resource "datadog_monitor" "network_error_requests" {
|
resource "datadog_monitor" "network_error_requests" {
|
||||||
name = "[${var.environment}] Azure Storage {{value}}% of network error requests on {{name}}"
|
name = "[${var.environment}] Azure Storage {{value}}% of network error requests on {{name}}"
|
||||||
message = "${var.message}"
|
message = "${var.message}"
|
||||||
@ -152,7 +151,6 @@ EOF
|
|||||||
tags = ["env:${var.environment}", "resource:storage", "team:azure", "provider:azure"]
|
tags = ["env:${var.environment}", "resource:storage", "team:azure", "provider:azure"]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
resource "datadog_monitor" "throttling_error_requests" {
|
resource "datadog_monitor" "throttling_error_requests" {
|
||||||
name = "[${var.environment}] Azure Storage {{value}}% of throttling error requests on {{name}}"
|
name = "[${var.environment}] Azure Storage {{value}}% of throttling error requests on {{name}}"
|
||||||
message = "${var.message}"
|
message = "${var.message}"
|
||||||
@ -182,7 +180,6 @@ EOF
|
|||||||
tags = ["env:${var.environment}", "resource:storage", "team:azure", "provider:azure"]
|
tags = ["env:${var.environment}", "resource:storage", "team:azure", "provider:azure"]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
resource "datadog_monitor" "server_other_error_requests" {
|
resource "datadog_monitor" "server_other_error_requests" {
|
||||||
name = "[${var.environment}] Azure Storage {{value}}% of server_other error requests on {{name}}"
|
name = "[${var.environment}] Azure Storage {{value}}% of server_other error requests on {{name}}"
|
||||||
message = "${var.message}"
|
message = "${var.message}"
|
||||||
@ -212,7 +209,6 @@ EOF
|
|||||||
tags = ["env:${var.environment}", "resource:storage", "team:azure", "provider:azure"]
|
tags = ["env:${var.environment}", "resource:storage", "team:azure", "provider:azure"]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
resource "datadog_monitor" "client_other_error_requests" {
|
resource "datadog_monitor" "client_other_error_requests" {
|
||||||
name = "[${var.environment}] Azure Storage {{value}}% of client_other error requests on {{name}}"
|
name = "[${var.environment}] Azure Storage {{value}}% of client_other error requests on {{name}}"
|
||||||
message = "${var.message}"
|
message = "${var.message}"
|
||||||
@ -242,7 +238,6 @@ EOF
|
|||||||
tags = ["env:${var.environment}", "resource:storage", "team:azure", "provider:azure"]
|
tags = ["env:${var.environment}", "resource:storage", "team:azure", "provider:azure"]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
resource "datadog_monitor" "authorization_error_requests" {
|
resource "datadog_monitor" "authorization_error_requests" {
|
||||||
name = "[${var.environment}] Azure Storage {{value}}% of authorization error requests on {{name}}"
|
name = "[${var.environment}] Azure Storage {{value}}% of authorization error requests on {{name}}"
|
||||||
message = "${var.message}"
|
message = "${var.message}"
|
||||||
|
|||||||
@ -13,6 +13,7 @@ resource "datadog_monitor" "status" {
|
|||||||
query = <<EOF
|
query = <<EOF
|
||||||
avg(last_5m):avg:azure.streamanalytics_streamingjobs.status{${data.template_file.filter.rendered}} by {resource_group,region,name} < 1
|
avg(last_5m):avg:azure.streamanalytics_streamingjobs.status{${data.template_file.filter.rendered}} by {resource_group,region,name} < 1
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
type = "metric alert"
|
type = "metric alert"
|
||||||
|
|
||||||
notify_no_data = true
|
notify_no_data = true
|
||||||
@ -38,6 +39,7 @@ resource "datadog_monitor" "su_utilization" {
|
|||||||
avg:azure.streamanalytics_streamingjobs.resource_utilization{${data.template_file.filter.rendered}} by {resource_group,region,name}
|
avg:azure.streamanalytics_streamingjobs.resource_utilization{${data.template_file.filter.rendered}} by {resource_group,region,name}
|
||||||
) > ${var.su_utilization_threshold_critical}
|
) > ${var.su_utilization_threshold_critical}
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
type = "metric alert"
|
type = "metric alert"
|
||||||
|
|
||||||
notify_no_data = false
|
notify_no_data = false
|
||||||
@ -50,6 +52,7 @@ resource "datadog_monitor" "su_utilization" {
|
|||||||
require_full_window = true
|
require_full_window = true
|
||||||
new_host_delay = "${var.delay}"
|
new_host_delay = "${var.delay}"
|
||||||
no_data_timeframe = 20
|
no_data_timeframe = 20
|
||||||
|
|
||||||
thresholds {
|
thresholds {
|
||||||
warning = "${var.su_utilization_threshold_warning}"
|
warning = "${var.su_utilization_threshold_warning}"
|
||||||
critical = "${var.su_utilization_threshold_critical}"
|
critical = "${var.su_utilization_threshold_critical}"
|
||||||
@ -68,6 +71,7 @@ resource "datadog_monitor" "failed_function_requests" {
|
|||||||
avg:azure.streamanalytics_streamingjobs.aml_callout_requests{${data.template_file.filter.rendered}} by {resource_group,region,name}.as_count()
|
avg:azure.streamanalytics_streamingjobs.aml_callout_requests{${data.template_file.filter.rendered}} by {resource_group,region,name}.as_count()
|
||||||
) * 100 > ${var.failed_function_requests_threshold_critical}
|
) * 100 > ${var.failed_function_requests_threshold_critical}
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
type = "metric alert"
|
type = "metric alert"
|
||||||
|
|
||||||
notify_no_data = false
|
notify_no_data = false
|
||||||
@ -80,6 +84,7 @@ resource "datadog_monitor" "failed_function_requests" {
|
|||||||
require_full_window = true
|
require_full_window = true
|
||||||
new_host_delay = "${var.delay}"
|
new_host_delay = "${var.delay}"
|
||||||
no_data_timeframe = 20
|
no_data_timeframe = 20
|
||||||
|
|
||||||
thresholds {
|
thresholds {
|
||||||
warning = "${var.function_requests_threshold_warning}"
|
warning = "${var.function_requests_threshold_warning}"
|
||||||
critical = "${var.failed_function_requests_threshold_critical}"
|
critical = "${var.failed_function_requests_threshold_critical}"
|
||||||
@ -97,6 +102,7 @@ resource "datadog_monitor" "conversion_errors" {
|
|||||||
avg:azure.streamanalytics_streamingjobs.conversion_errors{${data.template_file.filter.rendered}} by {resource_group,region,name}
|
avg:azure.streamanalytics_streamingjobs.conversion_errors{${data.template_file.filter.rendered}} by {resource_group,region,name}
|
||||||
) > ${var.conversion_errors_threshold_critical}
|
) > ${var.conversion_errors_threshold_critical}
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
type = "metric alert"
|
type = "metric alert"
|
||||||
|
|
||||||
notify_no_data = false
|
notify_no_data = false
|
||||||
@ -109,6 +115,7 @@ resource "datadog_monitor" "conversion_errors" {
|
|||||||
require_full_window = true
|
require_full_window = true
|
||||||
new_host_delay = "${var.delay}"
|
new_host_delay = "${var.delay}"
|
||||||
no_data_timeframe = 20
|
no_data_timeframe = 20
|
||||||
|
|
||||||
thresholds {
|
thresholds {
|
||||||
warning = "${var.conversion_errors_threshold_warning}"
|
warning = "${var.conversion_errors_threshold_warning}"
|
||||||
critical = "${var.conversion_errors_threshold_critical}"
|
critical = "${var.conversion_errors_threshold_critical}"
|
||||||
@ -126,6 +133,7 @@ resource "datadog_monitor" "runtime_errors" {
|
|||||||
avg:azure.streamanalytics_streamingjobs.errors{${data.template_file.filter.rendered}} by {resource_group,region,name}
|
avg:azure.streamanalytics_streamingjobs.errors{${data.template_file.filter.rendered}} by {resource_group,region,name}
|
||||||
) > ${var.runtime_errors_threshold_critical}
|
) > ${var.runtime_errors_threshold_critical}
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
type = "metric alert"
|
type = "metric alert"
|
||||||
|
|
||||||
notify_no_data = false
|
notify_no_data = false
|
||||||
@ -138,6 +146,7 @@ resource "datadog_monitor" "runtime_errors" {
|
|||||||
require_full_window = true
|
require_full_window = true
|
||||||
new_host_delay = "${var.delay}"
|
new_host_delay = "${var.delay}"
|
||||||
no_data_timeframe = 20
|
no_data_timeframe = 20
|
||||||
|
|
||||||
thresholds {
|
thresholds {
|
||||||
warning = "${var.runtime_errors_threshold_warning}"
|
warning = "${var.runtime_errors_threshold_warning}"
|
||||||
critical = "${var.runtime_errors_threshold_critical}"
|
critical = "${var.runtime_errors_threshold_critical}"
|
||||||
|
|||||||
@ -77,7 +77,6 @@ type = "metric alert"
|
|||||||
notify_no_data = false
|
notify_no_data = false
|
||||||
renotify_interval = 0
|
renotify_interval = 0
|
||||||
no_data_timeframe = 20
|
no_data_timeframe = 20
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
resource "datadog_monitor" "cloud_sql_replication" {
|
resource "datadog_monitor" "cloud_sql_replication" {
|
||||||
@ -97,5 +96,4 @@ type = "metric alert"
|
|||||||
notify_no_data = false
|
notify_no_data = false
|
||||||
renotify_interval = 0
|
renotify_interval = 0
|
||||||
no_data_timeframe = 20
|
no_data_timeframe = 20
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -48,7 +48,9 @@ resource "datadog_monitor" "kubernetes_kubelet_check" {
|
|||||||
|
|
||||||
resource "datadog_monitor" "kubernetes_kubelet_ping" {
|
resource "datadog_monitor" "kubernetes_kubelet_ping" {
|
||||||
name = "Kubernetes kubelet ping not ok"
|
name = "Kubernetes kubelet ping not ok"
|
||||||
message = "{{#is_alert}}\n${var.alert_HNO} \n{{/is_alert}} \n{{#is_recovery}}\n${var.alert_HNO}\n{{/is_recovery}}\n{{#is_warning}}\n${var.warning_HO} \n{{/is_warning}} \n{{#is_warning_recovery}}\n${var.warning_HO}\n{{/is_warning_recovery}}"message = "{{#is_alert}}\n${var.alert_HNO} \n{{/is_alert}} \n{{#is_recovery}}\n${var.alert_HNO}\n{{/is_recovery}}\n{{#is_warning}}\n${var.warning_HO} \n{{/is_warning}} \n{{#is_warning_recovery}}\n${var.warning_HO}\n{{/is_warning_recovery}}"
|
message = "{{#is_alert}}\n${var.alert_HNO} \n{{/is_alert}} \n{{#is_recovery}}\n${var.alert_HNO}\n{{/is_recovery}}\n{{#is_warning}}\n${var.warning_HO} \n{{/is_warning}} \n{{#is_warning_recovery}}\n${var.warning_HO}\n{{/is_warning_recovery}}"
|
||||||
|
|
||||||
|
message = "{{#is_alert}}\n${var.alert_HNO} \n{{/is_alert}} \n{{#is_recovery}}\n${var.alert_HNO}\n{{/is_recovery}}\n{{#is_warning}}\n${var.warning_HO} \n{{/is_warning}} \n{{#is_warning_recovery}}\n${var.warning_HO}\n{{/is_warning_recovery}}"
|
||||||
query = "\"kubernetes.kubelet.check.ping\".over(\"goog-gke-node\").by(\"*\").last(1).pct_by_status()"
|
query = "\"kubernetes.kubelet.check.ping\".over(\"goog-gke-node\").by(\"*\").last(1).pct_by_status()"
|
||||||
|
|
||||||
thresholds {
|
thresholds {
|
||||||
@ -108,7 +110,7 @@ resource "datadog_monitor" "kubernetes_node_status" {
|
|||||||
no_data_timeframe = 20
|
no_data_timeframe = 20
|
||||||
}
|
}
|
||||||
|
|
||||||
type = "query alert"
|
/* type = "query alert"
|
||||||
|
|
||||||
thresholds {
|
thresholds {
|
||||||
# warning = 75
|
# warning = 75
|
||||||
@ -126,4 +128,5 @@ resource "datadog_monitor" "kubernetes_node_status" {
|
|||||||
notify_no_data = false
|
notify_no_data = false
|
||||||
renotify_interval = 0
|
renotify_interval = 0
|
||||||
no_data_timeframe = 20
|
no_data_timeframe = 20
|
||||||
}
|
}*/
|
||||||
|
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
resource "datadog_monitor" "kubernetes_redis_cpu_95_5min" {
|
resource "datadog_monitor" "kubernetes_redis_cpu_95_5min" {
|
||||||
name = "Kubernetes Redis container CPU High > 95% for 5 min"
|
name = "Kubernetes Redis container CPU High > 95% for 5 min"
|
||||||
|
|
||||||
#message = "{{#is_alert}}\n${var.alert_HNO} \n{{/is_alert}} \n{{#is_recovery}}\n${var.alert_HNO}\n{{/is_recovery}}\n{{#is_warning}}\n${var.warning_HO} \n{{/is_warning}} \n{{#is_warning_recovery}}\n${var.warning_HO}\n{{/is_warning_recovery}}"
|
#message = "{{#is_alert}}\n${var.alert_HNO} \n{{/is_alert}} \n{{#is_recovery}}\n${var.alert_HNO}\n{{/is_recovery}}\n{{#is_warning}}\n${var.warning_HO} \n{{/is_warning}} \n{{#is_warning_recovery}}\n${var.warning_HO}\n{{/is_warning_recovery}}"
|
||||||
message = "{{#is_alert}}\n${var.alert_HNO} \n{{/is_alert}} \n{{#is_recovery}}\n${var.alert_HNO}\n{{/is_recovery}}"
|
message = "{{#is_alert}}\n${var.alert_HNO} \n{{/is_alert}} \n{{#is_recovery}}\n${var.alert_HNO}\n{{/is_recovery}}"
|
||||||
query = "avg(last_5m):avg:gcp.container.cpu.utilization{container_name:redis} by {cluster-name} * 100 > 95"
|
query = "avg(last_5m):avg:gcp.container.cpu.utilization{container_name:redis} by {cluster-name} * 100 > 95"
|
||||||
@ -25,6 +26,7 @@ resource "datadog_monitor" "kubernetes_redis_cpu_95_5min" {
|
|||||||
|
|
||||||
resource "datadog_monitor" "kubernetes_redis_cpu_80_15min" {
|
resource "datadog_monitor" "kubernetes_redis_cpu_80_15min" {
|
||||||
name = "Kubernetes Redis container CPU High > 80% for 15 min"
|
name = "Kubernetes Redis container CPU High > 80% for 15 min"
|
||||||
|
|
||||||
#message = "{{#is_alert}}\n${var.alert_HNO} \n{{/is_alert}} \n{{#is_recovery}}\n${var.alert_HNO}\n{{/is_recovery}}\n{{#is_warning}}\n${var.warning_HO} \n{{/is_warning}} \n{{#is_warning_recovery}}\n${var.warning_HO}\n{{/is_warning_recovery}}"
|
#message = "{{#is_alert}}\n${var.alert_HNO} \n{{/is_alert}} \n{{#is_recovery}}\n${var.alert_HNO}\n{{/is_recovery}}\n{{#is_warning}}\n${var.warning_HO} \n{{/is_warning}} \n{{#is_warning_recovery}}\n${var.warning_HO}\n{{/is_warning_recovery}}"
|
||||||
message = "{{#is_alert}}\n${var.alert_HNO} \n{{/is_alert}} \n{{#is_recovery}}\n${var.alert_HNO}\n{{/is_recovery}}"
|
message = "{{#is_alert}}\n${var.alert_HNO} \n{{/is_alert}} \n{{#is_recovery}}\n${var.alert_HNO}\n{{/is_recovery}}"
|
||||||
|
|
||||||
@ -72,3 +74,4 @@ resource "datadog_monitor" "kubernetes_redis_cpu_80_15min" {
|
|||||||
# renotify_interval = 0
|
# renotify_interval = 0
|
||||||
# no_data_timeframe = 20
|
# no_data_timeframe = 20
|
||||||
# }
|
# }
|
||||||
|
|
||||||
|
|||||||
@ -22,8 +22,6 @@ resource "datadog_monitor" "redis_connection" {
|
|||||||
no_data_timeframe = 20
|
no_data_timeframe = 20
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
resource "datadog_monitor" "redis_eviction" {
|
resource "datadog_monitor" "redis_eviction" {
|
||||||
name = "Redis eviction > 0"
|
name = "Redis eviction > 0"
|
||||||
message = "{{#is_alert}}\n${var.alert_HNO} \n{{/is_alert}} \n{{#is_recovery}}\n${var.alert_HNO}\n{{/is_recovery}}"
|
message = "{{#is_alert}}\n${var.alert_HNO} \n{{/is_alert}} \n{{#is_recovery}}\n${var.alert_HNO}\n{{/is_recovery}}"
|
||||||
@ -41,10 +39,8 @@ type = "metric alert"
|
|||||||
notify_no_data = false
|
notify_no_data = false
|
||||||
renotify_interval = 0
|
renotify_interval = 0
|
||||||
no_data_timeframe = 20
|
no_data_timeframe = 20
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
resource "datadog_monitor" "datadog_blocked_client" {
|
resource "datadog_monitor" "datadog_blocked_client" {
|
||||||
name = "Redis blocked clients > 0"
|
name = "Redis blocked clients > 0"
|
||||||
message = "{{#is_alert}}\n${var.alert_HNO} \n{{/is_alert}} \n{{#is_recovery}}\n${var.alert_HNO}\n{{/is_recovery}}"
|
message = "{{#is_alert}}\n${var.alert_HNO} \n{{/is_alert}} \n{{#is_recovery}}\n${var.alert_HNO}\n{{/is_recovery}}"
|
||||||
@ -62,10 +58,8 @@ type = "metric alert"
|
|||||||
notify_no_data = false
|
notify_no_data = false
|
||||||
renotify_interval = 0
|
renotify_interval = 0
|
||||||
no_data_timeframe = 20
|
no_data_timeframe = 20
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
resource "datadog_monitor" "redis_swap" {
|
resource "datadog_monitor" "redis_swap" {
|
||||||
name = "Redis begin to swap"
|
name = "Redis begin to swap"
|
||||||
message = "{{#is_alert}}\n${var.alert_HNO} \n{{/is_alert}} \n{{#is_recovery}}\n${var.alert_HNO}\n{{/is_recovery}}"
|
message = "{{#is_alert}}\n${var.alert_HNO} \n{{/is_alert}} \n{{#is_recovery}}\n${var.alert_HNO}\n{{/is_recovery}}"
|
||||||
@ -83,5 +77,4 @@ type = "metric alert"
|
|||||||
notify_no_data = false
|
notify_no_data = false
|
||||||
renotify_interval = 0
|
renotify_interval = 0
|
||||||
no_data_timeframe = 20
|
no_data_timeframe = 20
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -96,6 +96,7 @@ variable "elb_4xx_threshold" {
|
|||||||
|
|
||||||
variable "elb_backend_latency" {
|
variable "elb_backend_latency" {
|
||||||
description = "Average time elapsed after the request leaves the load balancer until a response is received. In seconds"
|
description = "Average time elapsed after the request leaves the load balancer until a response is received. In seconds"
|
||||||
|
|
||||||
default = {
|
default = {
|
||||||
warning = 1
|
warning = 1
|
||||||
critical = 5
|
critical = 5
|
||||||
|
|||||||
7
main.tf.ci
Normal file
7
main.tf.ci
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
variable "aws_region" {}
|
||||||
|
|
||||||
|
provider "aws" {
|
||||||
|
version = "1.2.0"
|
||||||
|
|
||||||
|
region = "${var.aws_region}"
|
||||||
|
}
|
||||||
6
terraform.tfvars.ci
Normal file
6
terraform.tfvars.ci
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
aws_region="eu-west-1"
|
||||||
|
region="eu-west-1"
|
||||||
|
env="test"
|
||||||
|
hno_escalation_group="abc"
|
||||||
|
ho_escalation_group="abc"
|
||||||
|
|
||||||
Loading…
x
Reference in New Issue
Block a user