add documentation

This commit is contained in:
Kevin Pecquet 2017-07-05 19:30:15 +02:00
parent 08c3a47ed7
commit d7bc069049
4 changed files with 69 additions and 36 deletions

10
.gitignore vendored
View File

@ -1 +1,9 @@
testing/*
# Ignore all volatile files
**/.terraform/modules
**/terraform.tfstate*.backup
# Ignore all credentials files
**/terraform.tfvars
# Ignore all but root state files
**/terraform.tfstate

View File

@ -20,23 +20,47 @@ The easiest way to contribute on this repository is to add monitors file inside
```
module "datadog-monitors" {
source = "git:ssh://git@bitbucket.org/morea/terraform.datadog.monitors.git"
source = "git::ssh://git@bitbucket.org/morea/terraform.datadog.monitors.git"
ho_escalation_group = "${var.ho_escalation_group}"
hno_escalation_group = "${var.hno_escalation_group}"
critical_escalation_group = "${var.critical_escalation_group}"
warning_escalation_group = "${var.warning_escalation_group}"
#default monitors templates integrations examples
linux_basics = "${var.linux_basics}"
#nginx = "disabled"
#aws_rds_mysql = "disabled"
dd_linux_basics = "${var.dd_linux_basics}"
#nginx = "false"
#aws_rds_mysql = "false"
#custom monitors template integrations examples
#cpu_custom = "enabled" #Will match the tag dd_custom_cpu (NB: it will replace the basic cpu alert)
#cpu_custom_period = "60"
#cpu_custom_warning_threshold = "90"
#cpu_custom_warning_escalation_msg = ${var.ho_escalation_group}
#cpu_custom_alert_threshold = "95"
#cpu_custom_alert_escalation_msg = ${var.hno_escalation_group}
dd_custom_cpu = "${var.dd_custom_cpu}"
}
```
### Input Declaration example ###
```
variable "critical_escalation_group" {
default = "@pagerduty_HODummy"
}
variable "warning_escalation_group" {
default = "@pagerduty_HNODummy"
}
variable "datadog_app_key" {}
variable "datadog_api_key" {}
variable "dd_linux_basics" {
default = "enabled"
}
variable "dd_custom_cpu" {
type = "map"
default = {
status = "enabled"
name = "CPU High > 95% during 1 hour"
period = "last_1h"
critical_threshold = 95
warning_threshold = 90
}
}
```

View File

@ -1,19 +1,26 @@
variable "ho_escalation_group" {
variable "critical_escalation_group" {
default = "@pagerduty_HODummy"
}
variable "hno_escalation_group" {
variable "warning_escalation_group" {
default = "@pagerduty_HNODummy"
}
variable "linux_basics" {
variable "datadog_app_key" {}
variable "datadog_api_key" {}
variable "dd_linux_basics" {
default = "enabled"
}
variable "datadog_api_key" {
default = "4878503d31a00ad7af4486581d0f98e8"
}
variable "dd_custom_cpu" {
type = "map"
default = {
status = "enabled"
name = "CPU High > 95% during 1 hour"
variable "datadog_app_key" {
default = "e1a10feedbb095e7d28ef966c4a2c00d50f53272"
period = "last_1h"
critical_threshold = 95
warning_threshold = 90
}
}

View File

@ -1,19 +1,13 @@
module "datadog-monitors" {
source = "git:ssh://git@bitbucket.org/morea/terraform.datadog.monitors.git"
source = "git::ssh://git@bitbucket.org/morea/terraform.datadog.monitors.git"
ho_escalation_group = "${var.ho_escalation_group}"
hno_escalation_group = "${var.hno_escalation_group}"
critical_escalation_group = "${var.critical_escalation_group}"
warning_escalation_group = "${var.warning_escalation_group}"
#default monitors templates integrations examples
linux_basics = "${var.linux_basics}"
#nginx = "disabled"
#aws_rds_mysql = "disabled"
dd_linux_basics = "${var.dd_linux_basics}"
#nginx = "false"
#aws_rds_mysql = "false"
#custom monitors template integrations examples
#cpu_custom = "enabled" #Will match the tag dd_custom_cpu (NB: it will replace the basic cpu alert)
#cpu_custom_period = "60"
#cpu_custom_warning_threshold = "90"
#cpu_custom_warning_escalation_msg = ${var.ho_escalation_group}
#cpu_custom_alert_threshold = "95"
#cpu_custom_alert_escalation_msg = ${var.hno_escalation_group}
dd_custom_cpu = "${var.dd_custom_cpu}"
}