MON-76 add subscription_id and tags, remove client_name
This commit is contained in:
parent
c624b041a4
commit
0a4345dfa3
@ -9,9 +9,8 @@ module "datadog-monitors-azure-redis" {
|
||||
source = "git::ssh://git@bitbucket.org/morea/terraform.feature.datadog.git//cloud/azure/redis?ref={revision}"
|
||||
|
||||
message = "${module.datadog-message-alerting.alerting-message}"
|
||||
|
||||
environment = "${var.environment}"
|
||||
client_name = "${var.client_name}"
|
||||
subscription_id = "${var.subscription_id}"
|
||||
}
|
||||
```
|
||||
|
||||
@ -29,7 +28,6 @@ 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 |
|
||||
@ -37,9 +35,12 @@ Inputs
|
||||
| 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 |
|
||||
| provider | What is the monitored provider | string | azure | 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 |
|
||||
| service | What is the monitored service | string | storage | no |
|
||||
| subscription_id | Azure account id used as filter for monitors | string | - | yes |
|
||||
|
||||
Related documentation
|
||||
---------------------
|
||||
|
||||
@ -1,14 +1,26 @@
|
||||
# Global Terraform
|
||||
variable "client_name" {
|
||||
description = "Client name"
|
||||
type = "string"
|
||||
}
|
||||
|
||||
variable "environment" {
|
||||
description = "Architecture environment"
|
||||
type = "string"
|
||||
}
|
||||
|
||||
variable "subscription_id" {
|
||||
description = "Azure account id used as filter for monitors"
|
||||
type = "string"
|
||||
}
|
||||
|
||||
variable "provider" {
|
||||
description = "Cloud provider which the monitor and its based metric depend on"
|
||||
type = "string"
|
||||
default = "azure"
|
||||
}
|
||||
|
||||
variable "service" {
|
||||
description = "Service monitored by this set of monitors"
|
||||
type = "string"
|
||||
default = "storage"
|
||||
}
|
||||
|
||||
# Global DataDog
|
||||
variable "message" {
|
||||
description = "Message sent when a Redis monitor is triggered"
|
||||
|
||||
@ -2,7 +2,7 @@ data "template_file" "filter" {
|
||||
template = "$${filter}"
|
||||
|
||||
vars {
|
||||
filter = "${var.use_filter_tags == "true" ? format("dd_monitoring:enabled,dd_azure_redis:enabled,env:%s", var.environment) : "*"}"
|
||||
filter = "${var.use_filter_tags == "true" ? format("dd_monitoring:enabled,dd_azure_storage:enabled,env:%s", var.environment) : "subscription_id:${var.subscription_id}"}"
|
||||
}
|
||||
}
|
||||
|
||||
@ -26,6 +26,8 @@ EOF
|
||||
require_full_window = true
|
||||
new_host_delay = "${var.delay}"
|
||||
no_data_timeframe = 20
|
||||
|
||||
tags = ["env:${var.environment}","resource:${var.service}","team:${var.provider}"]
|
||||
}
|
||||
|
||||
resource "datadog_monitor" "evictedkeys" {
|
||||
@ -55,6 +57,8 @@ EOF
|
||||
require_full_window = true
|
||||
new_host_delay = "${var.delay}"
|
||||
no_data_timeframe = 20
|
||||
|
||||
tags = ["env:${var.environment}","resource:${var.service}","team:${var.provider}"]
|
||||
}
|
||||
|
||||
resource "datadog_monitor" "percent_processor_time" {
|
||||
@ -84,6 +88,8 @@ EOF
|
||||
require_full_window = true
|
||||
new_host_delay = "${var.delay}"
|
||||
no_data_timeframe = 20
|
||||
|
||||
tags = ["env:${var.environment}","resource:${var.service}","team:${var.provider}"]
|
||||
}
|
||||
|
||||
resource "datadog_monitor" "server_load" {
|
||||
@ -113,4 +119,6 @@ EOF
|
||||
require_full_window = true
|
||||
new_host_delay = "${var.delay}"
|
||||
no_data_timeframe = 20
|
||||
|
||||
tags = ["env:${var.environment}","resource:${var.service}","team:${var.provider}"]
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user