From 41c8f0cd28e75dff5818a5ba49073049fb46f6a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Respaut?= Date: Fri, 27 Oct 2017 16:08:06 +0200 Subject: [PATCH] MON-66: New tree directory and README updates --- README.md | 16 +++++++--------- cloud/aws/elb/inputs.tf | 1 + monitors_elb.tf => cloud/aws/elb/monitors-elb.tf | 0 cloud/aws/rds-mysql/inputs.tf | 1 + .../aws/rds-mysql/monitors-rds_mysql-basics.tf | 0 middleware/apache/inputs.tf | 1 + .../apache/monitors-apache.tf | 0 middleware/nginx/inputs.tf | 1 + .../nginx/monitors-nginx.tf | 0 middleware/php-fpm/inputs.tf | 1 + .../php-fpm/monitors-fpm.tf | 0 os/linux/inputs.tf | 1 + .../linux/monitors-linux-basics.tf | 0 system/cpu/inputs.tf | 1 + .../cpu/monitors-custom-cpu.tf | 0 15 files changed, 14 insertions(+), 9 deletions(-) create mode 120000 cloud/aws/elb/inputs.tf rename monitors_elb.tf => cloud/aws/elb/monitors-elb.tf (100%) create mode 120000 cloud/aws/rds-mysql/inputs.tf rename monitors-rds_mysql-basics.tf => cloud/aws/rds-mysql/monitors-rds_mysql-basics.tf (100%) create mode 120000 middleware/apache/inputs.tf rename monitors_apache.tf => middleware/apache/monitors-apache.tf (100%) create mode 120000 middleware/nginx/inputs.tf rename monitors_nginx.tf => middleware/nginx/monitors-nginx.tf (100%) create mode 120000 middleware/php-fpm/inputs.tf rename monitors_fpm.tf => middleware/php-fpm/monitors-fpm.tf (100%) create mode 120000 os/linux/inputs.tf rename monitors-linux-basics.tf => os/linux/monitors-linux-basics.tf (100%) create mode 120000 system/cpu/inputs.tf rename monitors-custom-cpu.tf => system/cpu/monitors-custom-cpu.tf (100%) diff --git a/README.md b/README.md index 78e83cf..88e7dda 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,8 @@ -# README # +# README - DataDog Monitors # This repository is used to store all our monitors templates. -These templates have to be used with dedicated agent configurations and ressource tagging to works as expected. +These templates have to be used with dedicated agent configurations and resource tagging to works as expected. ### How to contribute ? ### @@ -10,13 +10,11 @@ The easiest way to contribute on this repository is to add monitors file inside ### Important notes ### -*This repository will be included as a Terraform module source. - -*Each monitors have to be disabled by default, so you have to manage this condition when you create your monitors. +* This repository will be included as a Terraform module source. +* Each monitors have to be disabled by default, so you have to manage this condition when you create your monitors. +* If you override a basic monitor with a custom one, you have to use tag filters on you query. (Example dd_cpu_high, if you want to override default cpu monitors) -*If you override a basic monitor with a custom one, you have to use tag filters on you query. (Example dd_cpu_high, if you want to override default cpu monitors) - -### Main.tf : add the datadog provider ### +### Main.tf : add the DataDog provider ### ``` provider "datadog" { @@ -29,7 +27,7 @@ provider "datadog" { ``` module "datadog-monitors" { - source = "git::ssh://git@bitbucket.org/morea/terraform.datadog.monitors.git" + source = "git::ssh://git@bitbucket.org/morea/terraform.feature.datadog.git//{module-path}?ref={version}" critical_escalation_group = "${var.critical_escalation_group}" warning_escalation_group = "${var.warning_escalation_group}" diff --git a/cloud/aws/elb/inputs.tf b/cloud/aws/elb/inputs.tf new file mode 120000 index 0000000..a68ace3 --- /dev/null +++ b/cloud/aws/elb/inputs.tf @@ -0,0 +1 @@ +../../../inputs.tf \ No newline at end of file diff --git a/monitors_elb.tf b/cloud/aws/elb/monitors-elb.tf similarity index 100% rename from monitors_elb.tf rename to cloud/aws/elb/monitors-elb.tf diff --git a/cloud/aws/rds-mysql/inputs.tf b/cloud/aws/rds-mysql/inputs.tf new file mode 120000 index 0000000..a68ace3 --- /dev/null +++ b/cloud/aws/rds-mysql/inputs.tf @@ -0,0 +1 @@ +../../../inputs.tf \ No newline at end of file diff --git a/monitors-rds_mysql-basics.tf b/cloud/aws/rds-mysql/monitors-rds_mysql-basics.tf similarity index 100% rename from monitors-rds_mysql-basics.tf rename to cloud/aws/rds-mysql/monitors-rds_mysql-basics.tf diff --git a/middleware/apache/inputs.tf b/middleware/apache/inputs.tf new file mode 120000 index 0000000..cdfc6c6 --- /dev/null +++ b/middleware/apache/inputs.tf @@ -0,0 +1 @@ +../../inputs.tf \ No newline at end of file diff --git a/monitors_apache.tf b/middleware/apache/monitors-apache.tf similarity index 100% rename from monitors_apache.tf rename to middleware/apache/monitors-apache.tf diff --git a/middleware/nginx/inputs.tf b/middleware/nginx/inputs.tf new file mode 120000 index 0000000..cdfc6c6 --- /dev/null +++ b/middleware/nginx/inputs.tf @@ -0,0 +1 @@ +../../inputs.tf \ No newline at end of file diff --git a/monitors_nginx.tf b/middleware/nginx/monitors-nginx.tf similarity index 100% rename from monitors_nginx.tf rename to middleware/nginx/monitors-nginx.tf diff --git a/middleware/php-fpm/inputs.tf b/middleware/php-fpm/inputs.tf new file mode 120000 index 0000000..cdfc6c6 --- /dev/null +++ b/middleware/php-fpm/inputs.tf @@ -0,0 +1 @@ +../../inputs.tf \ No newline at end of file diff --git a/monitors_fpm.tf b/middleware/php-fpm/monitors-fpm.tf similarity index 100% rename from monitors_fpm.tf rename to middleware/php-fpm/monitors-fpm.tf diff --git a/os/linux/inputs.tf b/os/linux/inputs.tf new file mode 120000 index 0000000..cdfc6c6 --- /dev/null +++ b/os/linux/inputs.tf @@ -0,0 +1 @@ +../../inputs.tf \ No newline at end of file diff --git a/monitors-linux-basics.tf b/os/linux/monitors-linux-basics.tf similarity index 100% rename from monitors-linux-basics.tf rename to os/linux/monitors-linux-basics.tf diff --git a/system/cpu/inputs.tf b/system/cpu/inputs.tf new file mode 120000 index 0000000..cdfc6c6 --- /dev/null +++ b/system/cpu/inputs.tf @@ -0,0 +1 @@ +../../inputs.tf \ No newline at end of file diff --git a/monitors-custom-cpu.tf b/system/cpu/monitors-custom-cpu.tf similarity index 100% rename from monitors-custom-cpu.tf rename to system/cpu/monitors-custom-cpu.tf