MON-230 Added extra tags on the monitors where they were missing

This commit is contained in:
Rafael Romero Carmona 2018-07-06 15:48:40 +02:00 committed by Quentin Manfroi
parent aa57c19f03
commit b73b4e7ba1
2 changed files with 20 additions and 4 deletions

View File

@ -50,15 +50,17 @@ Inputs
| available_slots_threshold_critical | Available Slots (critical threshold) | string | `200` | no | | available_slots_threshold_critical | Available Slots (critical threshold) | string | `200` | no |
| available_slots_threshold_warning | Available Slots (warning threshold) | string | `300` | no | | available_slots_threshold_warning | Available Slots (warning threshold) | string | `300` | no |
| available_slots_timeframe | Timeframe for the Available Slots monitor | string | `last_5m` | no | | available_slots_timeframe | Timeframe for the Available Slots monitor | string | `last_5m` | no |
| concurrent_queries_extra_tags | Extra tags for GCP Big Query Concurrent Queries monitor | list | `<list>` | no |
| concurrent_queries_message | Custom message for the Concurrent Queries monitor | string | `` | no | | concurrent_queries_message | Custom message for the Concurrent Queries monitor | string | `` | no |
| concurrent_queries_silenced | Groups to mute for GCP Big Query Concurrent Queries monitor | map | `<map>` | no | | concurrent_queries_silenced | Groups to mute for GCP Big Query Concurrent Queries monitor | map | `<map>` | no |
| concurrent_queries_threshold_critical | Concurrent Queries (critical threshold) (hard limit 50) | string | `45` | no | | concurrent_queries_threshold_critical | Concurrent Queries (critical threshold) (hard limit 50) | string | `45` | no |
| concurrent_queries_threshold_warning | Concurrent Queries (warning threshold) (hard limit 50) | string | `40` | no | | concurrent_queries_threshold_warning | Concurrent Queries (warning threshold) (hard limit 50) | string | `40` | no |
| concurrent_queries_timeframe | Timeframe for the Concurrent Queries monitor | string | `last_5m` | no | | concurrent_queries_timeframe | Timeframe for the Concurrent Queries monitor | string | `last_5m` | no |
| delay | Delay in seconds for the metric evaluation | string | `900` | no | | delay | Delay in seconds for the metric evaluation | string | `900` | no |
| environment | Architecture environment | string | - | yes | | environment | Architecture environment | string | - | yes |
| execution_time_extra_tags | Extra tags for GCP Big Query Execution Time monitor | list | `<list>` | no |
| execution_time_message | Custom message for the Execution Time monitor | string | `` | no | | execution_time_message | Custom message for the Execution Time monitor | string | `` | no |
| execution_time_silenced | Groups to mute for GCP Big Query Execution Time monitor. Muted by default. | map | `<map>` | no | | execution_time_silenced | Groups to mute for GCP Big Query Execution Time monitor. Muted by default. | map | `<map>` | no |
| execution_time_threshold_critical | Average Execution Time in seconds (critical threshold) | string | `150` | no | | execution_time_threshold_critical | Average Execution Time in seconds (critical threshold) | string | `150` | no |
| execution_time_threshold_warning | Average Execution Time in seconds (warning threshold) | string | `100` | no | | execution_time_threshold_warning | Average Execution Time in seconds (warning threshold) | string | `100` | no |
| execution_time_timeframe | Timeframe for the Execution Time monitor | string | `last_5m` | no | | execution_time_timeframe | Timeframe for the Execution Time monitor | string | `last_5m` | no |

View File

@ -26,11 +26,17 @@ variable "concurrent_queries_threshold_critical" {
} }
variable "concurrent_queries_silenced" { variable "concurrent_queries_silenced" {
description = "Groups to mute for GCP Big Query Concurrent Queries monitor" description = "Groups to mute for GCP Big Query Concurrent Queries monitor"
type = "map" type = "map"
default = {} default = {}
} }
variable "concurrent_queries_extra_tags" {
description = "Extra tags for GCP Big Query Concurrent Queries monitor"
type = "list"
default = []
}
resource "datadog_monitor" "concurrent_queries" { resource "datadog_monitor" "concurrent_queries" {
name = "[${var.environment}] GCP Big Query Concurrent Queries close to the limit {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}" name = "[${var.environment}] GCP Big Query Concurrent Queries close to the limit {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}"
message = "${coalesce(var.concurrent_queries_message, var.message)}" message = "${coalesce(var.concurrent_queries_message, var.message)}"
@ -63,6 +69,7 @@ EOF
"provider:gcp", "provider:gcp",
"env:${var.environment}", "env:${var.environment}",
"resource:big-query", "resource:big-query",
"${var.concurrent_queries_extra_tags}",
] ]
} }
@ -94,7 +101,7 @@ variable "execution_time_threshold_critical" {
} }
variable "execution_time_silenced" { variable "execution_time_silenced" {
description = "Groups to mute for GCP Big Query Execution Time monitor. Muted by default." description = "Groups to mute for GCP Big Query Execution Time monitor. Muted by default."
type = "map" type = "map"
default = { default = {
@ -102,6 +109,12 @@ variable "execution_time_silenced" {
} }
} }
variable "execution_time_extra_tags" {
description = "Extra tags for GCP Big Query Execution Time monitor"
type = "list"
default = []
}
resource "datadog_monitor" "execution_time" { resource "datadog_monitor" "execution_time" {
name = "[${var.environment}] GCP Big Query Execution Time too high {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}" name = "[${var.environment}] GCP Big Query Execution Time too high {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}"
message = "${coalesce(var.execution_time_message, var.message)}" message = "${coalesce(var.execution_time_message, var.message)}"
@ -134,5 +147,6 @@ EOF
"provider:gcp", "provider:gcp",
"env:${var.environment}", "env:${var.environment}",
"resource:big-query", "resource:big-query",
"${var.execution_time_extra_tags}",
] ]
} }