Merged in MON-231-update-readme-for-every-monitors (pull request #100)

MON-231 update readme for every monitors

Approved-by: Quentin Manfroi <quentin.manfroi@yahoo.fr>
Approved-by: Laurent Piroelle <laurent.piroelle@fr.clara.net>
Approved-by: Alexandre Gaillet <alexandre.gaillet@fr.clara.net>
This commit is contained in:
Quentin Manfroi 2018-06-29 09:16:57 +00:00
commit 7a9c97be81
24 changed files with 194 additions and 163 deletions

View File

@ -1,15 +1,25 @@
image: hashicorp/terraform:0.10.8
image: hashicorp/terraform:full
pipelines:
default:
- step:
name: Format
name: Terraform format
script:
- terraform fmt -write=false -diff -check
- step:
name: Validate
name: Terraform validate
script:
- mv main.tf.ci main.tf
- mv terraform.tfvars.ci terraform.tfvars
- terraform init
- terraform validate
- step:
name: Readme update
script:
- apk update
- apk upgrade
- apk add --no-cache bash git grep
- go get github.com/segmentio/terraform-docs
- ./scripts/update_readme.sh
- git status
- git diff --exit-code

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -1,30 +1,30 @@
AWS ELB DataDog monitors
========================
How to use this module
----------------------
```
module "datadog-monitors-aws-elb" {
source = "git::ssh://git@bitbucket.org/morea/terraform.feature.datadog.git//cloud/aws/elb?ref={revision}"
environment = "${var.environment}"
message = "${module.datadog-message-alerting.alerting-message}"
}
```
Purpose
-------
Creates DataDog monitors with the following checks :
* ELB no healthy hosts
* ELB latency too high
* ELB http code 4xx percent to high
* ELB http code 5xx percent to high
* ELB backend http code 4xx percent to high
* ELB backend http code 5xx percent to high
AWS ELB DataDog monitors
========================
How to use this module
----------------------
```
module "datadog-monitors-aws-elb" {
source = "git::ssh://git@bitbucket.org/morea/terraform.feature.datadog.git//cloud/aws/elb?ref={revision}"
environment = "${var.environment}"
message = "${module.datadog-message-alerting.alerting-message}"
}
```
Purpose
-------
Creates DataDog monitors with the following checks :
* ELB no healthy hosts
* ELB latency too high
* ELB http code 4xx percent to high
* ELB http code 5xx percent to high
* ELB backend http code 4xx percent to high
* ELB backend http code 5xx percent to high
Inputs
------

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -305,4 +305,3 @@ Related documentation
DataDog documentation: [https://docs.datadoghq.com/integrations/azure/](https://docs.datadoghq.com/integrations/azure/)
Azure metrics documentation: [https://docs.microsoft.com/en-us/azure/monitoring-and-diagnostics/monitoring-overview-metrics](https://docs.microsoft.com/en-us/azure/monitoring-and-diagnostics/monitoring-overview-metrics)

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -1,38 +1,38 @@
Azure IOT Hubs DataDog monitors
===============================
How to use this module
----------------------
```
module "iothubs" {
source = "git::ssh://git@bitbucket.org/morea/terraform.feature.datadog.git//cloud/azure/iothubs?ref=MON-80-azure-hub-iot-monitors"
message = "${module.datadog-message-alerting.alerting-message}"
environment = "${var.environment}"
}
```
Purpose
-------
Creates a DataDog monitors with the following checks :
* Service status check
* Jobs failed average check
* Query Jobs failed average check
* List Jobs failed average check
* Total devices count check
* C2D methods failed average check
* C2D twin read failed average check
* C2D twin update failed average check
* D2C twin read failed average check
* D2C twin update failed average check
* D2C telemetry egress dropped count check
* D2C telemetry egress orphaned count check
* D2C telemetry egress invalid count check
* D2C telemetry egress fallback count check
* D2C telemetry ingress no sent count check
Azure IOT Hubs DataDog monitors
===============================
How to use this module
----------------------
```
module "iothubs" {
source = "git::ssh://git@bitbucket.org/morea/terraform.feature.datadog.git//cloud/azure/iothubs?ref=MON-80-azure-hub-iot-monitors"
message = "${module.datadog-message-alerting.alerting-message}"
environment = "${var.environment}"
}
```
Purpose
-------
Creates a DataDog monitors with the following checks :
* Service status check
* Jobs failed average check
* Query Jobs failed average check
* List Jobs failed average check
* Total devices count check
* C2D methods failed average check
* C2D twin read failed average check
* C2D twin update failed average check
* D2C twin read failed average check
* D2C twin update failed average check
* D2C telemetry egress dropped count check
* D2C telemetry egress orphaned count check
* D2C telemetry egress invalid count check
* D2C telemetry egress fallback count check
* D2C telemetry ingress no sent count check
Inputs
------
@ -109,10 +109,9 @@ Inputs
| total_devices_time_aggregator | Monitor aggregator for IoT Hub total devices [available values: min, max, sum or avg] | string | `min` | no |
| total_devices_timeframe | Monitor timeframe for IoT Hub total devices [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | `last_5m` | no |
Related documentation
---------------------
DataDog documentation: [https://docs.datadoghq.com/integrations/azure_iot_hub](https://docs.datadoghq.com/integrations/azure_iot_hub)
Azure IOT Hubs metrics documentation: [https://docs.microsoft.com/en-us/azure/iot-hub/iot-hub-monitor-resource-health](https://docs.microsoft.com/en-us/azure/iot-hub/iot-hub-monitor-resource-health)
Related documentation
---------------------
DataDog documentation: [https://docs.datadoghq.com/integrations/azure_iot_hub](https://docs.datadoghq.com/integrations/azure_iot_hub)
Azure IOT Hubs metrics documentation: [https://docs.microsoft.com/en-us/azure/iot-hub/iot-hub-monitor-resource-health](https://docs.microsoft.com/en-us/azure/iot-hub/iot-hub-monitor-resource-health)

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -102,4 +102,3 @@ DataDog blog: [https://www.datadoghq.com/blog/monitor-azure-storage-datadog/](ht
Azure Storage metrics documentation: [https://docs.microsoft.com/en-us/azure/storage/common/storage-monitor-storage-account](https://docs.microsoft.com/en-us/azure/storage/common/storage-monitor-storage-account)
Azure Storage metrics detailed documentation [https://docs.microsoft.com/en-us/rest/api/storageservices/storage-analytics-metrics-table-schema](https://docs.microsoft.com/en-us/rest/api/storageservices/storage-analytics-metrics-table-schema)

Binary file not shown.

View File

@ -1,24 +1,24 @@
Apache Middleware DataDog monitors
==================================
How to use this module
----------------------
```
module "datadog-monitors-apache-middleware" {
source = "git::ssh://git@bitbucket.org/morea/terraform.feature.datadog.git//middleware/apache?ref={revision}"
message = "${module.datadog-message-alerting.alerting-message}"
environment = "${var.environment}"
}
```
Purpose
-------
Creates a DataDog monitors with the following checks :
* Apache connect
Apache Middleware DataDog monitors
==================================
How to use this module
----------------------
```
module "datadog-monitors-apache-middleware" {
source = "git::ssh://git@bitbucket.org/morea/terraform.feature.datadog.git//middleware/apache?ref={revision}"
message = "${module.datadog-message-alerting.alerting-message}"
environment = "${var.environment}"
}
```
Purpose
-------
Creates a DataDog monitors with the following checks :
* Apache connect
Inputs
------

View File

@ -1,24 +1,24 @@
Nginx Middleware DataDog monitors
=================================
How to use this module
----------------------
```
module "datadog-monitors-nginx-middleware" {
source = "git::ssh://git@bitbucket.org/morea/terraform.feature.datadog.git//middleware/nginx?ref={revision}"
message = "${module.datadog-message-alerting.alerting-message}"
environment = "${var.environment}"
}
```
Purpose
-------
Creates a DataDog monitors with the following checks :
* Nginx connect
Nginx Middleware DataDog monitors
=================================
How to use this module
----------------------
```
module "datadog-monitors-nginx-middleware" {
source = "git::ssh://git@bitbucket.org/morea/terraform.feature.datadog.git//middleware/nginx?ref={revision}"
message = "${module.datadog-message-alerting.alerting-message}"
environment = "${var.environment}"
}
```
Purpose
-------
Creates a DataDog monitors with the following checks :
* Nginx connect
Inputs
------

View File

@ -1,25 +1,25 @@
PHP FPM Middleware DataDog monitors
===================================
How to use this module
----------------------
```
module "datadog-monitors-php-fpm-middleware" {
source = "git::ssh://git@bitbucket.org/morea/terraform.feature.datadog.git//middleware/php-fpm?ref={revision}"
message = "${module.datadog-message-alerting.alerting-message}"
environment = "${var.environment}"
}
```
Purpose
-------
Creates a DataDog monitors with the following checks :
* PHP FPM connect
* PHP FPM load
PHP FPM Middleware DataDog monitors
===================================
How to use this module
----------------------
```
module "datadog-monitors-php-fpm-middleware" {
source = "git::ssh://git@bitbucket.org/morea/terraform.feature.datadog.git//middleware/php-fpm?ref={revision}"
message = "${module.datadog-message-alerting.alerting-message}"
environment = "${var.environment}"
}
```
Purpose
-------
Creates a DataDog monitors with the following checks :
* PHP FPM connect
* PHP FPM load
Inputs
------

24
scripts/update_readme.sh Executable file
View File

@ -0,0 +1,24 @@
#!/bin/bash
script_dir=$(dirname $0)
if [[ "$script_dir" == "." ]]; then
cd ..
else
cd "$(dirname $script_dir)"
fi
for dir in $(find -mindepth 2 -name README.md); do
cd $(dirname $dir)
pwd
cp README.md README.md.bak
sed -i '/Inputs/,$d' README.md
terraform-docs md ./ | tail -n +2 >> README.md
sed -i 's/## Inputs/Inputs/g' README.md
sed -i '/Inputs/a ------' README.md
sed -i 's/## Outputs/Outputs/g' README.md
sed -i '/Outputs/a -------' README.md
grep -Pzo --color=never '.*Related documentation(.*\n)*' README.md.bak | head -n -1 >> README.md
dos2unix README.md
rm README.md.bak
cd - >> /dev/null
done

View File

@ -1,28 +1,28 @@
System Generic DataDog monitors
===============================
How to use this module
----------------------
```
module "datadog-monitors-system-generic" {
source = "git::ssh://git@bitbucket.org/morea/terraform.feature.datadog.git//system/generic?ref={revision}"
message = "${module.datadog-message-alerting.alerting-message}"
environment = "${var.environment}"
}
```
Purpose
-------
Creates a DataDog monitors with the following checks :
* CPU usage
* CPU load ratio
* Free memory
* Free disk inodes
* Free disk space
System Generic DataDog monitors
===============================
How to use this module
----------------------
```
module "datadog-monitors-system-generic" {
source = "git::ssh://git@bitbucket.org/morea/terraform.feature.datadog.git//system/generic?ref={revision}"
message = "${module.datadog-message-alerting.alerting-message}"
environment = "${var.environment}"
}
```
Purpose
-------
Creates a DataDog monitors with the following checks :
* CPU usage
* CPU load ratio
* Free memory
* Free disk inodes
* Free disk space
Inputs
------