From ab8605fcccd6e53057e03eefd48b269e02499852 Mon Sep 17 00:00:00 2001 From: Jean-Philippe LAINE Date: Tue, 14 Jan 2020 16:48:20 +0100 Subject: [PATCH] MON-554 - Fix with auto_update script --- README.md | 1 + caas/kubernetes/velero/README.md | 79 +++++++++++++++++++++++++++++++ caas/kubernetes/velero/outputs.tf | 13 ++--- 3 files changed, 87 insertions(+), 6 deletions(-) create mode 100644 caas/kubernetes/velero/README.md diff --git a/README.md b/README.md index c6cf645..9c77a72 100644 --- a/README.md +++ b/README.md @@ -131,6 +131,7 @@ module "datadog-monitors-system-generic" { - [vts](https://github.com/claranet/terraform-datadog-monitors/tree/master/caas/kubernetes/ingress/vts/) - [node](https://github.com/claranet/terraform-datadog-monitors/tree/master/caas/kubernetes/node/) - [pod](https://github.com/claranet/terraform-datadog-monitors/tree/master/caas/kubernetes/pod/) + - [velero](https://github.com/claranet/terraform-datadog-monitors/tree/master/caas/kubernetes/velero/) - [workload](https://github.com/claranet/terraform-datadog-monitors/tree/master/caas/kubernetes/workload/) - [cloud](https://github.com/claranet/terraform-datadog-monitors/tree/master/cloud/) - [aws](https://github.com/claranet/terraform-datadog-monitors/tree/master/cloud/aws/) diff --git a/caas/kubernetes/velero/README.md b/caas/kubernetes/velero/README.md new file mode 100644 index 0000000..e03451f --- /dev/null +++ b/caas/kubernetes/velero/README.md @@ -0,0 +1,79 @@ +# CAAS KUBERNETES VELERO DataDog monitors + +## How to use this module + +``` +module "datadog-monitors-caas-kubernetes-velero" { + source = "claranet/monitors/datadog//caas/kubernetes/velero" + version = "{revision}" + + environment = var.environment + message = module.datadog-message-alerting.alerting-message +} + +``` + +## Purpose + +Creates DataDog monitors with the following checks: + +- Velero backup deletion failure +- Velero backup failure +- Velero backup partial failure +- Velero scheduled backup missing +- Velero volume snapshot failure + +## Inputs + +| Name | Description | Type | Default | Required | +|------|-------------|:----:|:-----:|:-----:| +| environment | Architecture environment | string | n/a | yes | +| evaluation\_delay | Delay in seconds for the metric evaluation | string | `"15"` | no | +| filter\_tags\_custom | Tags used for custom filtering when filter_tags_use_defaults is false | string | `"*"` | no | +| filter\_tags\_custom\_excluded | Tags excluded for custom filtering when filter_tags_use_defaults is false | string | `""` | no | +| filter\_tags\_scheduled\_backup\_custom | Tags used for scheduled backup custom filtering when filter_tags_scheduled_backup_use_defaults is false | string | `"null"` | no | +| filter\_tags\_scheduled\_backup\_custom\_excluded | Tags excluded for scheduled backup custom filtering when filter_tags_scheduled_backup_use_defaults is false | string | `"null"` | no | +| filter\_tags\_scheduled\_backup\_use\_defaults | Use default filter tags scheduled backup convention | string | `"null"` | no | +| filter\_tags\_use\_defaults | Use default filter tags convention | string | `"true"` | no | +| message | Message sent when a monitor is triggered | string | n/a | yes | +| new\_host\_delay | Delay in seconds before monitor new resource | string | `"300"` | no | +| notify\_no\_data | Will raise no data alert if set to true | string | `"true"` | no | +| prefix\_slug | Prefix string to prepend between brackets on every monitors names | string | `""` | no | +| velero\_backup\_deletion\_failure\_enabled | Flag to enable Velero backup deletion failure monitor | string | `"true"` | no | +| velero\_backup\_deletion\_failure\_extra\_tags | Extra tags for Velero backup deletion failure monitor | list(string) | `[]` | no | +| velero\_backup\_deletion\_failure\_monitor\_message | Custom message for Velero backup deletion failure monitor | string | `""` | no | +| velero\_backup\_deletion\_failure\_monitor\_no\_data\_timeframe | No data timeframe in minutes | string | `"1440"` | no | +| velero\_backup\_deletion\_failure\_monitor\_timeframe | Monitor timeframe for Velero backup deletion failure monitor [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | `"last_1d"` | no | +| velero\_backup\_failure\_enabled | Flag to enable Velero backup failure monitor | string | `"true"` | no | +| velero\_backup\_failure\_extra\_tags | Extra tags for Velero backup failure monitor | list(string) | `[]` | no | +| velero\_backup\_failure\_monitor\_message | Custom message for Velero backup failure monitor | string | `""` | no | +| velero\_backup\_failure\_monitor\_no\_data\_timeframe | No data timeframe in minutes | string | `"1440"` | no | +| velero\_backup\_failure\_monitor\_timeframe | Monitor timeframe for Velero backup failure monitor [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | `"last_1d"` | no | +| velero\_backup\_partial\_failure\_enabled | Flag to enable Velero backup partial failure monitor | string | `"true"` | no | +| velero\_backup\_partial\_failure\_extra\_tags | Extra tags for Velero backup partial failure monitor | list(string) | `[]` | no | +| velero\_backup\_partial\_failure\_monitor\_message | Custom message for Velero backup partial failure monitor | string | `""` | no | +| velero\_backup\_partial\_failure\_monitor\_no\_data\_timeframe | No data timeframe in minutes | string | `"1440"` | no | +| velero\_backup\_partial\_failure\_monitor\_timeframe | Monitor timeframe for Velero backup partial failure monitor [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | `"last_1d"` | no | +| velero\_scheduled\_backup\_missing\_enabled | Flag to enable Velero scheduled backup missing monitor | string | `"true"` | no | +| velero\_scheduled\_backup\_missing\_extra\_tags | Extra tags for Velero scheduled backup missing monitor | list(string) | `[]` | no | +| velero\_scheduled\_backup\_missing\_monitor\_message | Custom message for Velero scheduled backup missing monitor | string | `""` | no | +| velero\_scheduled\_backup\_missing\_monitor\_no\_data\_timeframe | No data timeframe in minutes | string | `"1440"` | no | +| velero\_scheduled\_backup\_missing\_monitor\_timeframe | Monitor timeframe for Velero scheduled backup missing monitor [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | `"last_1d"` | no | +| velero\_volume\_snapshot\_failure\_enabled | Flag to enable Velero volume snapshot failure monitor | string | `"true"` | no | +| velero\_volume\_snapshot\_failure\_extra\_tags | Extra tags for Velero volume snapshot failure monitor | list(string) | `[]` | no | +| velero\_volume\_snapshot\_failure\_monitor\_message | Custom message for Velero volume snapshot failure monitor | string | `""` | no | +| velero\_volume\_snapshot\_failure\_monitor\_no\_data\_timeframe | No data timeframe in minutes | string | `"1440"` | no | +| velero\_volume\_snapshot\_failure\_monitor\_timeframe | Monitor timeframe for Velero volume snapshot failure monitor [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | `"last_1d"` | no | + +## Outputs + +| Name | Description | +|------|-------------| +| velero\_backup\_deletion\_failure\_id | id for monitor velero_backup_deletion_failure | +| velero\_backup\_failure\_id | id for monitor velero_backup_failure | +| velero\_backup\_partial\_failure\_id | id for monitor velero_backup_partial_failure | +| velero\_scheduled\_backup\_missing\_id | id for monitor velero_scheduled_backup_missing | +| velero\_volume\_snapshot\_failure\_id | id for monitor velero_volume_snapshot_failure | + +## Related documentation + diff --git a/caas/kubernetes/velero/outputs.tf b/caas/kubernetes/velero/outputs.tf index 1534cc9..992a26b 100644 --- a/caas/kubernetes/velero/outputs.tf +++ b/caas/kubernetes/velero/outputs.tf @@ -1,6 +1,6 @@ -output "velero_scheduled_backup_missing_id" { - description = "id for monitor velero_scheduled_backup_missing" - value = datadog_monitor.velero_scheduled_backup_missing.*.id +output "velero_backup_deletion_failure_id" { + description = "id for monitor velero_backup_deletion_failure" + value = datadog_monitor.velero_backup_deletion_failure.*.id } output "velero_backup_failure_id" { @@ -13,12 +13,13 @@ output "velero_backup_partial_failure_id" { value = datadog_monitor.velero_backup_partial_failure.*.id } -output "velero_backup_deletion_failure_id" { - description = "id for monitor velero_backup_deletion_failure" - value = datadog_monitor.velero_backup_deletion_failure.*.id +output "velero_scheduled_backup_missing_id" { + description = "id for monitor velero_scheduled_backup_missing" + value = datadog_monitor.velero_scheduled_backup_missing.*.id } output "velero_volume_snapshot_failure_id" { description = "id for monitor velero_volume_snapshot_failure" value = datadog_monitor.velero_volume_snapshot_failure.*.id } +