Skip to content

Commit db0a964

Browse files
authored
Add priority input and remove deprecated new_host_delay input (#67)
1 parent 03d1fc5 commit db0a964

File tree

239 files changed

+455
-857
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

239 files changed

+455
-857
lines changed

caas/docker/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -65,14 +65,14 @@ Creates DataDog monitors with the following checks:
6565
| <a name="input_memory_used_timeframe"></a> [memory\_used\_timeframe](#input\_memory\_used\_timeframe) | Timeframe for the Container Memory Usage monitor | `string` | `"last_5m"` | no |
6666
| <a name="input_message"></a> [message](#input\_message) | Message sent when an alert is triggered | `any` | n/a | yes |
6767
| <a name="input_new_group_delay"></a> [new\_group\_delay](#input\_new\_group\_delay) | Delay in seconds before monitor new resource | `number` | `300` | no |
68-
| <a name="input_new_host_delay"></a> [new\_host\_delay](#input\_new\_host\_delay) | Delay in seconds before monitor new resource | `number` | `300` | no |
6968
| <a name="input_not_responding_enabled"></a> [not\_responding\_enabled](#input\_not\_responding\_enabled) | Flag to enable Docker does not respond monitor | `string` | `"true"` | no |
7069
| <a name="input_not_responding_extra_tags"></a> [not\_responding\_extra\_tags](#input\_not\_responding\_extra\_tags) | Extra tags for Docker does not respond monitor | `list(string)` | `[]` | no |
7170
| <a name="input_not_responding_message"></a> [not\_responding\_message](#input\_not\_responding\_message) | Custom message for Docker does not respond monitor | `string` | `""` | no |
7271
| <a name="input_not_responding_no_data_timeframe"></a> [not\_responding\_no\_data\_timeframe](#input\_not\_responding\_no\_data\_timeframe) | Docker does not respond monitor no data timeframe | `string` | `10` | no |
7372
| <a name="input_not_responding_threshold_warning"></a> [not\_responding\_threshold\_warning](#input\_not\_responding\_threshold\_warning) | Docker does not respond monitor (warning threshold) | `string` | `3` | no |
7473
| <a name="input_notify_no_data"></a> [notify\_no\_data](#input\_notify\_no\_data) | Will raise no data alert if set to true | `bool` | `true` | no |
7574
| <a name="input_prefix_slug"></a> [prefix\_slug](#input\_prefix\_slug) | Prefix string to prepend between brackets on every monitors names | `string` | `""` | no |
75+
| <a name="input_priority"></a> [priority](#input\_priority) | Alert severity of monitors from 1 (high) to 5 (low) | `number` | `null` | no |
7676
| <a name="input_tags"></a> [tags](#input\_tags) | Global variables | `list(string)` | <pre>[<br> "type:docker",<br> "provider:docker",<br> "resource:docker"<br>]</pre> | no |
7777
| <a name="input_team"></a> [team](#input\_team) | n/a | `string` | `"claranet"` | no |
7878
| <a name="input_timeout_h"></a> [timeout\_h](#input\_timeout\_h) | Default auto-resolving state (in hours) | `number` | `0` | no |

caas/docker/inputs.tf

-4
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,6 @@ variable "evaluation_delay" {
1010
default = 15
1111
}
1212

13-
variable "new_host_delay" {
14-
description = "Delay in seconds before monitor new resource"
15-
default = 300
16-
}
1713

1814
variable "new_group_delay" {
1915
description = "Delay in seconds before monitor new resource"

caas/docker/monitors-docker.tf

+2-3
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ EOQ
1616
critical = 5
1717
}
1818

19-
new_host_delay = var.new_host_delay
2019
new_group_delay = var.new_group_delay
2120
no_data_timeframe = var.not_responding_no_data_timeframe
2221
notify_no_data = var.notify_no_data
@@ -25,6 +24,7 @@ EOQ
2524
include_tags = true
2625
require_full_window = true
2726
renotify_interval = 0
27+
priority = var.priority
2828

2929
tags = concat(local.common_tags, var.tags, var.not_responding_extra_tags)
3030
}
@@ -47,15 +47,14 @@ EOQ
4747
}
4848

4949
evaluation_delay = var.evaluation_delay
50-
new_host_delay = var.new_host_delay
5150
new_group_delay = var.new_group_delay
5251
notify_no_data = false
5352
renotify_interval = 0
5453
notify_audit = false
5554
timeout_h = var.timeout_h
5655
include_tags = true
5756
require_full_window = true
57+
priority = var.priority
5858

5959
tags = concat(local.common_tags, var.tags, var.memory_used_extra_tags)
6060
}
61-

caas/kubernetes/ark/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,9 @@ Creates DataDog monitors with the following checks:
6161
| <a name="input_filter_tags_use_defaults"></a> [filter\_tags\_use\_defaults](#input\_filter\_tags\_use\_defaults) | Use default filter tags convention | `string` | `"true"` | no |
6262
| <a name="input_message"></a> [message](#input\_message) | Message sent when a monitor is triggered | `any` | n/a | yes |
6363
| <a name="input_new_group_delay"></a> [new\_group\_delay](#input\_new\_group\_delay) | Delay in seconds before monitor new resource | `number` | `300` | no |
64-
| <a name="input_new_host_delay"></a> [new\_host\_delay](#input\_new\_host\_delay) | Delay in seconds before monitor new resource | `number` | `300` | no |
6564
| <a name="input_notify_no_data"></a> [notify\_no\_data](#input\_notify\_no\_data) | Will raise no data alert if set to true | `bool` | `true` | no |
6665
| <a name="input_prefix_slug"></a> [prefix\_slug](#input\_prefix\_slug) | Prefix string to prepend between brackets on every monitors names | `string` | `""` | no |
66+
| <a name="input_priority"></a> [priority](#input\_priority) | Alert severity of monitors from 1 (high) to 5 (low) | `number` | `null` | no |
6767
| <a name="input_tags"></a> [tags](#input\_tags) | Global variables | `list(string)` | <pre>[<br> "type:caas",<br> "provider:prometheus",<br> "resource:ark"<br>]</pre> | no |
6868
| <a name="input_team"></a> [team](#input\_team) | n/a | `string` | `"claranet"` | no |
6969
| <a name="input_timeout_h"></a> [timeout\_h](#input\_timeout\_h) | Default auto-resolving state (in hours) | `number` | `0` | no |

caas/kubernetes/ark/inputs.tf

-4
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,6 @@ variable "evaluation_delay" {
2929
default = 15
3030
}
3131

32-
variable "new_host_delay" {
33-
description = "Delay in seconds before monitor new resource"
34-
default = 300
35-
}
3632

3733
variable "new_group_delay" {
3834
description = "Delay in seconds before monitor new resource"

caas/kubernetes/ark/monitors-ark.tf

+1
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ EOQ
2323
timeout_h = var.timeout_h
2424
include_tags = true
2525
require_full_window = false
26+
priority = var.priority
2627

2728
tags = concat(local.common_tags, var.tags, var.ark_schedules_extra_tags)
2829
}

caas/kubernetes/cluster/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,9 @@ Creates DataDog monitors with the following checks:
7070
| <a name="input_heartbeat_timeframe"></a> [heartbeat\_timeframe](#input\_heartbeat\_timeframe) | Timeframe for heartbeat monitor | `string` | `"last_30m"` | no |
7171
| <a name="input_message"></a> [message](#input\_message) | Message sent when a monitor is triggered | `any` | n/a | yes |
7272
| <a name="input_new_group_delay"></a> [new\_group\_delay](#input\_new\_group\_delay) | Delay in seconds before monitor new resource | `number` | `300` | no |
73-
| <a name="input_new_host_delay"></a> [new\_host\_delay](#input\_new\_host\_delay) | Delay in seconds before monitor new resource | `number` | `300` | no |
7473
| <a name="input_notify_no_data"></a> [notify\_no\_data](#input\_notify\_no\_data) | Will raise no data alert if set to true | `bool` | `true` | no |
7574
| <a name="input_prefix_slug"></a> [prefix\_slug](#input\_prefix\_slug) | Prefix string to prepend between brackets on every monitors names | `string` | `""` | no |
75+
| <a name="input_priority"></a> [priority](#input\_priority) | Alert severity of monitors from 1 (high) to 5 (low) | `number` | `null` | no |
7676
| <a name="input_tags"></a> [tags](#input\_tags) | Global variables | `list(string)` | <pre>[<br> "type:caas",<br> "provider:kubernetes",<br> "resource:kubernetes-node"<br>]</pre> | no |
7777
| <a name="input_team"></a> [team](#input\_team) | n/a | `string` | `"claranet"` | no |
7878
| <a name="input_timeout_h"></a> [timeout\_h](#input\_timeout\_h) | Default auto-resolving state (in hours) | `number` | `0` | no |

caas/kubernetes/cluster/inputs.tf

-4
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,6 @@ variable "evaluation_delay" {
3434
default = 15
3535
}
3636

37-
variable "new_host_delay" {
38-
description = "Delay in seconds before monitor new resource"
39-
default = 300
40-
}
4137

4238
variable "new_group_delay" {
4339
description = "Delay in seconds before monitor new resource"

caas/kubernetes/cluster/monitors-k8s-cluster.tf

+2-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ EOQ
1414
critical = 5
1515
}
1616

17-
new_host_delay = var.new_host_delay
1817
new_group_delay = var.new_group_delay
1918
notify_no_data = false
2019
no_data_timeframe = var.apiserver_no_data_timeframe
@@ -23,6 +22,7 @@ EOQ
2322
timeout_h = var.timeout_h
2423
include_tags = true
2524
require_full_window = true
25+
priority = var.priority
2626

2727
tags = concat(local.common_tags, var.tags, var.apiserver_extra_tags)
2828
}
@@ -50,6 +50,7 @@ EOQ
5050
timeout_h = var.timeout_h
5151
include_tags = true
5252
require_full_window = true
53+
priority = var.priority
5354

5455
tags = concat(local.common_tags, var.tags, var.heartbeat_extra_tags)
5556
}

caas/kubernetes/ingress/vts/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -85,9 +85,9 @@ Creates DataDog monitors with the following checks:
8585
| <a name="input_ingress_down_timeframe"></a> [ingress\_down\_timeframe](#input\_ingress\_down\_timeframe) | Monitor timeframe for Nginx Ingress is down [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | `string` | `"last_10m"` | no |
8686
| <a name="input_message"></a> [message](#input\_message) | Message sent when an alert is triggered | `any` | n/a | yes |
8787
| <a name="input_new_group_delay"></a> [new\_group\_delay](#input\_new\_group\_delay) | Delay in seconds before monitor new resource | `number` | `300` | no |
88-
| <a name="input_new_host_delay"></a> [new\_host\_delay](#input\_new\_host\_delay) | Delay in seconds before monitor new resource | `number` | `300` | no |
8988
| <a name="input_notify_no_data"></a> [notify\_no\_data](#input\_notify\_no\_data) | Will raise no data alert if set to true | `bool` | `true` | no |
9089
| <a name="input_prefix_slug"></a> [prefix\_slug](#input\_prefix\_slug) | Prefix string to prepend between brackets on every monitors names | `string` | `""` | no |
90+
| <a name="input_priority"></a> [priority](#input\_priority) | Alert severity of monitors from 1 (high) to 5 (low) | `number` | `null` | no |
9191
| <a name="input_tags"></a> [tags](#input\_tags) | Global variables | `list(string)` | <pre>[<br> "type:caas",<br> "provider:prometheus",<br> "resource:nginx-ingress-controller"<br>]</pre> | no |
9292
| <a name="input_team"></a> [team](#input\_team) | n/a | `string` | `"claranet"` | no |
9393
| <a name="input_timeout_h"></a> [timeout\_h](#input\_timeout\_h) | Default auto-resolving state (in hours) | `number` | `0` | no |

caas/kubernetes/ingress/vts/inputs.tf

-4
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,6 @@ variable "evaluation_delay" {
1010
default = 15
1111
}
1212

13-
variable "new_host_delay" {
14-
description = "Delay in seconds before monitor new resource"
15-
default = 300
16-
}
1713

1814
variable "new_group_delay" {
1915
description = "Delay in seconds before monitor new resource"

caas/kubernetes/ingress/vts/monitors-ingress.tf

+3-2
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,14 @@ EOQ
1717
}
1818

1919
evaluation_delay = var.evaluation_delay
20-
new_host_delay = var.new_host_delay
2120
new_group_delay = var.new_group_delay
2221
notify_no_data = false
2322
renotify_interval = 0
2423
notify_audit = false
2524
timeout_h = var.timeout_h
2625
include_tags = true
2726
require_full_window = true
27+
priority = var.priority
2828

2929
tags = concat(local.common_tags, var.tags, var.ingress_5xx_extra_tags)
3030
}
@@ -48,14 +48,14 @@ EOQ
4848
}
4949

5050
evaluation_delay = var.evaluation_delay
51-
new_host_delay = var.new_host_delay
5251
new_group_delay = var.new_group_delay
5352
notify_no_data = false
5453
renotify_interval = 0
5554
notify_audit = false
5655
timeout_h = var.timeout_h
5756
include_tags = true
5857
require_full_window = true
58+
priority = var.priority
5959

6060
tags = concat(local.common_tags, var.tags, var.ingress_4xx_extra_tags)
6161
}
@@ -85,6 +85,7 @@ EOQ
8585
timeout_h = var.timeout_h
8686
include_tags = true
8787
require_full_window = true
88+
priority = var.priority
8889

8990
tags = concat(local.common_tags, var.tags, var.ingress_down_extra_tags)
9091
}

caas/kubernetes/node/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -91,14 +91,14 @@ Creates DataDog monitors with the following checks:
9191
| <a name="input_memory_pressure_threshold_warning"></a> [memory\_pressure\_threshold\_warning](#input\_memory\_pressure\_threshold\_warning) | Memory pressure monitor (warning threshold) | `string` | `3` | no |
9292
| <a name="input_message"></a> [message](#input\_message) | Message sent when a monitor is triggered | `any` | n/a | yes |
9393
| <a name="input_new_group_delay"></a> [new\_group\_delay](#input\_new\_group\_delay) | Delay in seconds before monitor new resource | `number` | `300` | no |
94-
| <a name="input_new_host_delay"></a> [new\_host\_delay](#input\_new\_host\_delay) | Delay in seconds before monitor new resource | `number` | `300` | no |
9594
| <a name="input_node_unschedulable_enabled"></a> [node\_unschedulable\_enabled](#input\_node\_unschedulable\_enabled) | Flag to enable node unschedulable monitor | `string` | `"true"` | no |
9695
| <a name="input_node_unschedulable_extra_tags"></a> [node\_unschedulable\_extra\_tags](#input\_node\_unschedulable\_extra\_tags) | Extra tags for node unschedulable monitor | `list(string)` | `[]` | no |
9796
| <a name="input_node_unschedulable_message"></a> [node\_unschedulable\_message](#input\_node\_unschedulable\_message) | Custom message for node unschedulable monitor | `string` | `""` | no |
9897
| <a name="input_node_unschedulable_time_aggregator"></a> [node\_unschedulable\_time\_aggregator](#input\_node\_unschedulable\_time\_aggregator) | Monitor aggregator for node unschedulable [available values: min, max or avg] | `string` | `"min"` | no |
9998
| <a name="input_node_unschedulable_timeframe"></a> [node\_unschedulable\_timeframe](#input\_node\_unschedulable\_timeframe) | Monitor timeframe for node unschedulable [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | `string` | `"last_1h"` | no |
10099
| <a name="input_notify_no_data"></a> [notify\_no\_data](#input\_notify\_no\_data) | Will raise no data alert if set to true | `bool` | `true` | no |
101100
| <a name="input_prefix_slug"></a> [prefix\_slug](#input\_prefix\_slug) | Prefix string to prepend between brackets on every monitors names | `string` | `""` | no |
101+
| <a name="input_priority"></a> [priority](#input\_priority) | Alert severity of monitors from 1 (high) to 5 (low) | `number` | `null` | no |
102102
| <a name="input_ready_enabled"></a> [ready\_enabled](#input\_ready\_enabled) | Flag to enable Node ready monitor | `string` | `"true"` | no |
103103
| <a name="input_ready_extra_tags"></a> [ready\_extra\_tags](#input\_ready\_extra\_tags) | Extra tags for Node ready monitor | `list(string)` | `[]` | no |
104104
| <a name="input_ready_message"></a> [ready\_message](#input\_ready\_message) | Custom message for Node ready monitor | `string` | `""` | no |

caas/kubernetes/node/inputs.tf

-4
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,6 @@ variable "evaluation_delay" {
3434
default = 15
3535
}
3636

37-
variable "new_host_delay" {
38-
description = "Delay in seconds before monitor new resource"
39-
default = 300
40-
}
4137

4238
variable "new_group_delay" {
4339
description = "Delay in seconds before monitor new resource"

caas/kubernetes/node/monitors-k8s-node.tf

+9-9
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,14 @@ EOQ
1313
critical = 5
1414
}
1515

16-
new_host_delay = var.new_host_delay
1716
new_group_delay = var.new_group_delay
1817
notify_no_data = false
1918
renotify_interval = 0
2019
notify_audit = false
2120
timeout_h = var.timeout_h
2221
include_tags = true
2322
require_full_window = true
23+
priority = var.priority
2424

2525
tags = concat(local.common_tags, var.tags, var.disk_pressure_extra_tags)
2626
}
@@ -40,14 +40,14 @@ EOQ
4040
critical = 5
4141
}
4242

43-
new_host_delay = var.new_host_delay
4443
new_group_delay = var.new_group_delay
4544
notify_no_data = false
4645
renotify_interval = 0
4746
notify_audit = false
4847
timeout_h = var.timeout_h
4948
include_tags = true
5049
require_full_window = true
50+
priority = var.priority
5151

5252
tags = concat(local.common_tags, var.tags, var.memory_pressure_extra_tags)
5353
}
@@ -67,14 +67,14 @@ EOQ
6767
critical = 5
6868
}
6969

70-
new_host_delay = var.new_host_delay
7170
new_group_delay = var.new_group_delay
7271
notify_no_data = false
7372
renotify_interval = 0
7473
notify_audit = false
7574
timeout_h = var.timeout_h
7675
include_tags = true
7776
require_full_window = true
77+
priority = var.priority
7878

7979
tags = concat(local.common_tags, var.tags, var.ready_extra_tags)
8080
}
@@ -94,7 +94,6 @@ EOQ
9494
critical = 5
9595
}
9696

97-
new_host_delay = var.new_host_delay
9897
new_group_delay = var.new_group_delay
9998
notify_no_data = var.notify_no_data
10099
no_data_timeframe = var.kubelet_ping_no_data_timeframe
@@ -103,6 +102,7 @@ EOQ
103102
timeout_h = var.timeout_h
104103
include_tags = true
105104
require_full_window = true
105+
priority = var.priority
106106

107107
tags = concat(local.common_tags, var.tags, var.kubelet_ping_extra_tags)
108108
}
@@ -122,14 +122,14 @@ EOQ
122122
critical = 5
123123
}
124124

125-
new_host_delay = var.new_host_delay
126125
new_group_delay = var.new_group_delay
127126
notify_no_data = false
128127
renotify_interval = 0
129128
notify_audit = false
130129
timeout_h = var.timeout_h
131130
include_tags = true
132131
require_full_window = true
132+
priority = var.priority
133133

134134
tags = concat(local.common_tags, var.tags, var.kubelet_syncloop_extra_tags)
135135
}
@@ -142,12 +142,12 @@ resource "datadog_monitor" "unregister_net_device" {
142142

143143
query = "events(\"sources:kubernetes ${module.filter-tags.event_alert} \"UnregisterNetDevice\"\").rollup(\"count\").last(\"${var.unregister_net_device_timeframe}\") >= ${var.unregister_net_device_threshold_critical}"
144144

145-
new_host_delay = var.new_host_delay
146145
notify_no_data = false
147146
renotify_interval = 0
148147
notify_audit = false
149148
timeout_h = var.timeout_h
150149
include_tags = true
150+
priority = var.priority
151151

152152
tags = concat(local.common_tags, var.tags, var.unregister_net_device_extra_tags)
153153
}
@@ -169,14 +169,14 @@ EOQ
169169
}
170170

171171
evaluation_delay = var.evaluation_delay
172-
new_host_delay = var.new_host_delay
173172
new_group_delay = var.new_group_delay
174173
notify_no_data = false
175174
renotify_interval = 0
176175
notify_audit = false
177176
timeout_h = var.timeout_h
178177
include_tags = true
179178
require_full_window = true
179+
priority = var.priority
180180

181181
tags = concat(local.common_tags, var.tags, var.node_unschedulable_extra_tags)
182182
}
@@ -200,14 +200,14 @@ EOQ
200200
}
201201

202202
evaluation_delay = var.evaluation_delay
203-
new_host_delay = var.new_host_delay
204203
new_group_delay = var.new_group_delay
205204
notify_no_data = false
206205
renotify_interval = 0
207206
notify_audit = false
208207
timeout_h = var.timeout_h
209208
include_tags = true
210209
require_full_window = true
210+
priority = var.priority
211211

212212
tags = concat(local.common_tags, var.tags, var.volume_space_extra_tags)
213213
}
@@ -231,14 +231,14 @@ EOQ
231231
}
232232

233233
evaluation_delay = var.evaluation_delay
234-
new_host_delay = var.new_host_delay
235234
new_group_delay = var.new_group_delay
236235
notify_no_data = false
237236
renotify_interval = 0
238237
notify_audit = false
239238
timeout_h = var.timeout_h
240239
include_tags = true
241240
require_full_window = true
241+
priority = var.priority
242242

243243
tags = concat(local.common_tags, var.tags, var.volume_inodes_extra_tags)
244244
}

0 commit comments

Comments
 (0)