MON-247 auto update

This commit is contained in:
Quentin Manfroi 2018-09-03 10:02:42 +02:00
parent 7fa7a42b09
commit fdd86f34d0
4 changed files with 18 additions and 20 deletions

View File

@ -74,8 +74,8 @@ The `//` is very important, it's a terraform specific syntax used to separate gi
- [caas](https://bitbucket.org/morea/terraform.feature.datadog/src/master/caas/) - [caas](https://bitbucket.org/morea/terraform.feature.datadog/src/master/caas/)
- [kubernetes](https://bitbucket.org/morea/terraform.feature.datadog/src/master/caas/kubernetes/) - [kubernetes](https://bitbucket.org/morea/terraform.feature.datadog/src/master/caas/kubernetes/)
- [ark](https://bitbucket.org/morea/terraform.feature.datadog/src/master/caas/kubernetes/ark/)
- [ingress](https://bitbucket.org/morea/terraform.feature.datadog/src/master/caas/kubernetes/ingress/) - [ingress](https://bitbucket.org/morea/terraform.feature.datadog/src/master/caas/kubernetes/ingress/)
- [ark](https://bitbucket.org/morea/terraform.feature.datadog/src/master/caas/k8s/ark/)
- [cloud](https://bitbucket.org/morea/terraform.feature.datadog/src/master/cloud/) - [cloud](https://bitbucket.org/morea/terraform.feature.datadog/src/master/cloud/)
- [aws](https://bitbucket.org/morea/terraform.feature.datadog/src/master/cloud/aws/) - [aws](https://bitbucket.org/morea/terraform.feature.datadog/src/master/cloud/aws/)
- [alb](https://bitbucket.org/morea/terraform.feature.datadog/src/master/cloud/aws/alb/) - [alb](https://bitbucket.org/morea/terraform.feature.datadog/src/master/cloud/aws/alb/)

View File

@ -1,43 +1,41 @@
Ark schedules monitor # CAAS KUBERNETES ARK DataDog monitors
==========================================
How to use this module ## How to use this module
----------------------
``` ```
module "ark_schedules_monitor" { module "datadog-monitors-caas-kubernetes-ark" {
source = "git::ssh://git@bitbucket.org/morea/terraform.feature.datadog.git//caas/k8s/ark?ref={revision}" source = "git::ssh://git@bitbucket.org/morea/terraform.feature.datadog.git//caas/kubernetes/ark?ref={revision}"
environment = "${var.environment}" environment = "${var.environment}"
message = "${module.datadog-message-alerting.alerting-message}" message = "${module.datadog-message-alerting.alerting-message}"
} }
``` ```
Purpose ## Purpose
-------
Creates DataDog monitor with the following checks :
* Ark schedules monitors Creates DataDog monitors with the following checks:
Inputs - Ark backup failed
------
## Inputs
| Name | Description | Type | Default | Required | | Name | Description | Type | Default | Required |
|------|-------------|:----:|:-----:|:-----:| |------|-------------|:----:|:-----:|:-----:|
| ark_schedules_enabled | Flag to enable Ark schedules monitor | string | `true` | no |
| ark_schedules_extra_tags | Extra tags for Ark schedules monitor | list | `<list>` | no |
| ark_schedules_monitor_message | Custom message for Ark schedules monitor | string | `` | no | | ark_schedules_monitor_message | Custom message for Ark schedules monitor | string | `` | no |
| ark_schedules_monitor_no_data_timeframe | No data timeframe | string | `1440` | no | | ark_schedules_monitor_no_data_timeframe | No data timeframe | string | `1440` | no |
| ark_schedules_monitor_silenced | Groups to mute for Ark schedules monitor | map | `<map>` | no | | ark_schedules_monitor_silenced | Groups to mute for Ark schedules monitor | map | `<map>` | no |
| ark_schedules_monitor_timeframe | Monitor timeframe for Ark schedules monitor [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | `last_1d` | no | | ark_schedules_monitor_timeframe | Monitor timeframe for Ark schedules monitor [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | `last_1d` | no |
| delay | Delay in seconds for the metric evaluation | string | `60` | no |
| environment | Architecture environment | string | - | yes | | environment | Architecture environment | string | - | 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 | Tags used for custom filtering when filter_tags_use_defaults is false | string | `*` | no |
| filter_tags_use_defaults | Use default filter tags convention | string | `true` | no | | filter_tags_use_defaults | Use default filter tags convention | string | `true` | no |
| message | Message sent when a monitor is triggered | string | - | yes | | message | Message sent when a monitor is triggered | string | - | yes |
| team | | string | `k8s` | no | | new_host_delay | Delay in seconds before monitor new resource | string | `300` | no |
Outputs ## Outputs
-------
| Name | Description | | Name | Description |
|------|-------------| |------|-------------|

View File

@ -5,7 +5,7 @@ resource "datadog_monitor" "ark_schedules_monitor" {
message = "${coalesce(var.ark_schedules_monitor_message, var.message)}" message = "${coalesce(var.ark_schedules_monitor_message, var.message)}"
query = <<EOF query = <<EOF
sum(${var.ark_schedules_monitor_timeframe}):min:ark.ark_backup_failure_total${module.filter-tags-5xx.query_alert} by {schedule}.as_count() > 1 sum(${var.ark_schedules_monitor_timeframe}):min:ark.ark_backup_failure_total${module.filter-tags.query_alert} by {schedule}.as_count() > 1
EOF EOF
thresholds { thresholds {

View File

@ -1,4 +1,4 @@
output "ark_schedules_monitor_id" { output "ark_schedules_monitor_id" {
description = "id for monitor ark_schedules_monitor" description = "id for monitor ark_schedules_monitor"
value = "${datadog_monitor.ark_schedules_monitor.id}" value = "${datadog_monitor.ark_schedules_monitor.*.id}"
} }