Skip to content

Commit a9b071b

Browse files
authored
chore: update module in datadog-monitor (cloudposse/terraform-aws-components#1003)
1 parent 62b34e5 commit a9b071b

File tree

12 files changed

+778
-772
lines changed

12 files changed

+778
-772
lines changed

src/README.md

Lines changed: 38 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -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

3641
Since there are so many parameters that may be adjusted for a given monitor, we define all monitors through YAML. By
3742
convention, 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

4247
For 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 |

src/catalog/monitors/aurora.yaml

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -17,23 +17,23 @@ aurora-replica-lag:
1717
escalation_message: ""
1818
tags:
1919
managed-by: Terraform
20-
notify_no_data: false
21-
notify_audit: true
22-
require_full_window: false
23-
enable_logs_sample: false
24-
force_delete: true
25-
include_tags: true
26-
locked: false
27-
renotify_interval: 60
28-
timeout_h: 24
29-
evaluation_delay: 60
30-
new_host_delay: 300
31-
no_data_timeframe: 10
32-
threshold_windows: { }
33-
thresholds:
34-
critical: 1000
35-
warning: 500
36-
#unknown:
37-
#ok:
38-
#critical_recovery:
39-
#warning_recovery:
20+
options:
21+
notify_no_data: false
22+
notify_audit: true
23+
require_full_window: false
24+
include_tags: true
25+
renotify_interval: 60
26+
timeout_h: 24
27+
evaluation_delay: 60
28+
new_host_delay: 300
29+
no_data_timeframe: 10
30+
threshold_windows: { }
31+
thresholds:
32+
critical: 1000
33+
warning: 500
34+
#unknown:
35+
#ok:
36+
#critical_recovery:
37+
#warning_recovery:
38+
priority: 3
39+
restricted_roles: null

src/catalog/monitors/ec2.yaml

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -11,23 +11,23 @@ ec2-failed-status-check:
1111
escalation_message: ""
1212
tags:
1313
managed-by: Terraform
14-
notify_no_data: false
15-
notify_audit: true
16-
require_full_window: true
17-
enable_logs_sample: false
18-
force_delete: true
19-
include_tags: true
20-
locked: false
21-
renotify_interval: 60
22-
timeout_h: 24
23-
evaluation_delay: 60
24-
new_host_delay: 300
25-
no_data_timeframe: 10
26-
threshold_windows: { }
27-
thresholds:
28-
critical: 0
29-
#warning:
30-
#unknown:
31-
#ok:
32-
#critical_recovery:
33-
#warning_recovery:
14+
options:
15+
notify_no_data: false
16+
notify_audit: true
17+
require_full_window: true
18+
include_tags: true
19+
renotify_interval: 60
20+
timeout_h: 24
21+
evaluation_delay: 60
22+
new_host_delay: 300
23+
no_data_timeframe: 10
24+
threshold_windows: { }
25+
thresholds:
26+
critical: 0
27+
#warning:
28+
#unknown:
29+
#ok:
30+
#critical_recovery:
31+
#warning_recovery:
32+
priority: 3
33+
restricted_roles: null

0 commit comments

Comments
 (0)