@@ -31,13 +31,18 @@ components:
3131- Use the ` catalog` convention to define a step of alerts. You can use ours or define your own.
3232 [https://github.com/cloudposse/terraform-datadog-platform/tree/master/catalog/monitors](https://github.com/cloudposse/terraform-datadog-platform/tree/master/catalog/monitors)
3333
34+ - The monitors catalog for the datadog-monitor component support datadog monitor exports. You can use
35+ [the status page of a monitor to export it from 'settings'](https://docs.datadoghq.com/monitors/manage/status/#settings).
36+ You can add the export to existing files or make new ones. Because the export is json formatted, it's also yaml
37+ compatible. If you prefer, you can convert the export to yaml using your text editor or a cli tool like `yq`.
38+
3439# # Adjust Thresholds per Stack
3540
3641Since there are so many parameters that may be adjusted for a given monitor, we define all monitors through YAML. By
3742convention, we define the **default monitors** that should apply to all environments, and then adjust the thresholds per
38- environment. This is accomplished using the `datadog-monitor` components variable `datadog_monitors_config_paths` which
39- defines the path to the YAML configuration files. By passing a path for `dev` and `prod`, we can define configurations
40- that are different per environment.
43+ environment. This is accomplished using the `datadog-monitor` components variable `local_datadog_monitors_config_paths`
44+ which defines the path to the YAML configuration files. By passing a path for `dev` and `prod`, we can define
45+ configurations that are different per environment.
4146
4247For example, you might have the following settings defined for `prod` and `dev` stacks that override the defaults.
4348
@@ -49,7 +54,7 @@ components:
4954 datadog-monitor:
5055 vars:
5156 # Located in the components/terraform/datadog-monitor directory
52- datadog_monitors_config_paths :
57+ local_datadog_monitors_config_paths :
5358 - catalog/monitors/*.yaml
5459 - catalog/monitors/dev/*.yaml # note this line
5560` ` `
@@ -62,7 +67,7 @@ components:
6267 datadog-monitor:
6368 vars:
6469 # Located in the components/terraform/datadog-monitor directory
65- datadog_monitors_config_paths :
70+ local_datadog_monitors_config_paths :
6671 - catalog/monitors/*.yaml
6772 - catalog/monitors/prod/*.yaml # note this line
6873` ` `
@@ -89,29 +94,28 @@ elb-lb-httpcode-5xx-notify:
8994 Check LB
9095 escalation_message: ""
9196 tags: {}
97+ options:
98+ renotify_interval: 60
99+ notify_audit: false
100+ require_full_window: true
101+ include_tags: true
102+ timeout_h: 0
103+ evaluation_delay: 60
104+ new_host_delay: 300
105+ new_group_delay: 0
106+ groupby_simple_monitor: false
107+ renotify_occurrences: 0
108+ renotify_statuses: [ ]
109+ validate: true
110+ notify_no_data: false
111+ no_data_timeframe: 5
112+ priority: 3
113+ threshold_windows: {}
114+ thresholds:
115+ critical: 50
116+ warning: 20
92117 priority: 3
93- renotify_interval: 60
94- notify_audit: false
95- require_full_window: true
96- enable_logs_sample: false
97- force_delete: true
98- include_tags: true
99- locked: false
100- timeout_h: 0
101- evaluation_delay: 60
102- new_host_delay: 300
103- new_group_delay: 0
104- groupby_simple_monitor: false
105- renotify_occurrences: 0
106- renotify_statuses: [ ]
107- validate: true
108- notify_no_data: false
109- no_data_timeframe: 5
110- priority: 3
111- threshold_windows: {}
112- thresholds:
113- critical: 50
114- warning: 20
118+ restricted_roles: null
115119```
116120
117121**components/terraform/datadog-monitor/catalog/monitors/dev/elb.yaml**
@@ -121,9 +125,10 @@ elb-lb-httpcode-5xx-notify:
121125 query: |
122126 avg(last_15m):max: aws .elb.httpcode_elb_5xx{${context_dd_tags}} by {env,host} > 30
123127 priority: 2
124- thresholds:
125- critical: 30
126- warning: 10
128+ options:
129+ thresholds:
130+ critical: 30
131+ warning: 10
127132```
128133
129134## Key Notes
@@ -148,7 +153,7 @@ components:
148153 datadog-monitor:
149154 vars:
150155 # Located in the components/terraform/datadog-monitor directory
151- datadog_monitors_config_paths :
156+ local_datadog_monitors_config_paths :
152157 - catalog/monitors/* .yaml
153158 - catalog/monitors/dev/* .yaml
154159 # templatefile() is used for all yaml config paths with these variables.
@@ -165,7 +170,7 @@ components:
165170 terraform:
166171 datadog-monitor:
167172 vars:
168- datadog_monitors_config_paths :
173+ local_datadog_monitors_config_paths :
169174 - https://raw.githubusercontent.com/cloudposse/terraform-datadog-platform/0.27.0/catalog/monitors/ec2.yaml
170175 - catalog/monitors/ec2.yaml
171176```
@@ -198,7 +203,7 @@ No providers.
198203| Name | Source | Version |
199204|------|--------|---------|
200205| <a name="module_datadog_configuration"></a> [datadog\_configuration](#module\_datadog\_configuration) | ../datadog-configuration/modules/datadog_keys | n/a |
201- | <a name="module_datadog_monitors"></a> [datadog\_monitors](#module\_datadog\_monitors) | cloudposse/platform/datadog//modules/monitors | 1.2.0 |
206+ | <a name="module_datadog_monitors"></a> [datadog\_monitors](#module\_datadog\_monitors) | cloudposse/platform/datadog//modules/monitors | 1.4.1 |
202207| <a name="module_datadog_monitors_merge"></a> [datadog\_monitors\_merge](#module\_datadog\_monitors\_merge) | cloudposse/config/yaml//modules/deepmerge | 1.0.2 |
203208| <a name="module_iam_roles"></a> [iam\_roles](#module\_iam\_roles) | ../account-map/modules/iam-roles | n/a |
204209| <a name="module_local_datadog_monitors_yaml_config"></a> [local\_datadog\_monitors\_yaml\_config](#module\_local\_datadog\_monitors\_yaml\_config) | cloudposse/config/yaml | 1.0.2 |
0 commit comments