MON-234 add script to generate output id

This commit is contained in:
Quentin Manfroi 2018-07-14 04:45:33 +02:00
parent 02c54a223a
commit 0238d0fe2c
46 changed files with 665 additions and 3 deletions

View File

@ -14,12 +14,12 @@ pipelines:
- terraform init
- terraform validate
- step:
name: Readme update
name: Check auto update
script:
- apk update
- apk upgrade
- apk add --no-cache bash git grep
- go get github.com/segmentio/terraform-docs
- ./scripts/update_readme.sh
- ./scripts/auto_update.sh
- git status
- git diff --exit-code

View File

@ -67,6 +67,18 @@ Inputs
| latency_timeframe | Monitor timeframe for ALB latency [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | `last_5m` | no |
| message | Message sent when a monitor is triggered | string | - | yes |
Outputs
-------
| Name | Description |
|------|-------------|
| ALB_httpcode_4xx_id | id for monitor ALB_httpcode_4xx |
| ALB_httpcode_5xx_id | id for monitor ALB_httpcode_5xx |
| ALB_httpcode_target_4xx_id | id for monitor ALB_httpcode_target_4xx |
| ALB_httpcode_target_5xx_id | id for monitor ALB_httpcode_target_5xx |
| ALB_latency_id | id for monitor ALB_latency |
| ALB_no_healthy_instances_id | id for monitor ALB_no_healthy_instances |
Related documentation
---------------------

29
cloud/aws/alb/outputs.tf Normal file
View File

@ -0,0 +1,29 @@
output "ALB_no_healthy_instances_id" {
description = "id for monitor ALB_no_healthy_instances"
value = "${datadog_monitor.ALB_no_healthy_instances.id}"
}
output "ALB_latency_id" {
description = "id for monitor ALB_latency"
value = "${datadog_monitor.ALB_latency.id}"
}
output "ALB_httpcode_5xx_id" {
description = "id for monitor ALB_httpcode_5xx"
value = "${datadog_monitor.ALB_httpcode_5xx.id}"
}
output "ALB_httpcode_4xx_id" {
description = "id for monitor ALB_httpcode_4xx"
value = "${datadog_monitor.ALB_httpcode_4xx.id}"
}
output "ALB_httpcode_target_5xx_id" {
description = "id for monitor ALB_httpcode_target_5xx"
value = "${datadog_monitor.ALB_httpcode_target_5xx.id}"
}
output "ALB_httpcode_target_4xx_id" {
description = "id for monitor ALB_httpcode_target_4xx"
value = "${datadog_monitor.ALB_httpcode_target_4xx.id}"
}

View File

@ -49,6 +49,15 @@ Inputs
| latency_timeframe | Monitor timeframe for API latency [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | `last_5m` | no |
| message | Message sent when a monitor is triggered | string | - | yes |
Outputs
-------
| Name | Description |
|------|-------------|
| API_Gateway_latency_id | id for monitor API_Gateway_latency |
| API_http_4xx_errors_count_id | id for monitor API_http_4xx_errors_count |
| API_http_5xx_errors_count_id | id for monitor API_http_5xx_errors_count |
Related documentation
---------------------

View File

@ -0,0 +1,14 @@
output "API_Gateway_latency_id" {
description = "id for monitor API_Gateway_latency"
value = "${datadog_monitor.API_Gateway_latency.id}"
}
output "API_http_5xx_errors_count_id" {
description = "id for monitor API_http_5xx_errors_count"
value = "${datadog_monitor.API_http_5xx_errors_count.id}"
}
output "API_http_4xx_errors_count_id" {
description = "id for monitor API_http_4xx_errors_count"
value = "${datadog_monitor.API_http_4xx_errors_count.id}"
}

View File

@ -51,6 +51,15 @@ Inputs
| filter_tags_use_defaults | Use default filter tags convention | string | `true` | no |
| message | Message sent when an alert is triggered | string | - | yes |
Outputs
-------
| Name | Description |
|------|-------------|
| es_cluster_status_id | id for monitor es_cluster_status |
| es_cpu_90_15min_id | id for monitor es_cpu_90_15min |
| es_free_space_low_id | id for monitor es_free_space_low |
Related documentation
---------------------

View File

@ -0,0 +1,14 @@
output "es_cluster_status_id" {
description = "id for monitor es_cluster_status"
value = "${datadog_monitor.es_cluster_status.id}"
}
output "es_free_space_low_id" {
description = "id for monitor es_free_space_low"
value = "${datadog_monitor.es_free_space_low.id}"
}
output "es_cpu_90_15min_id" {
description = "id for monitor es_cpu_90_15min"
value = "${datadog_monitor.es_cpu_90_15min.id}"
}

View File

@ -67,3 +67,19 @@ Inputs
| filter_tags_use_defaults | Use default filter tags convention | string | `true` | no |
| message | Message sent when an alert is triggered | string | - | yes |
Outputs
-------
| Name | Description |
|------|-------------|
| ELB_backend_latency_id | id for monitor ELB_backend_latency |
| ELB_no_healthy_instances_id | id for monitor ELB_no_healthy_instances |
| ELB_too_much_4xx_backend_id | id for monitor ELB_too_much_4xx_backend |
| ELB_too_much_4xx_id | id for monitor ELB_too_much_4xx |
| ELB_too_much_5xx_backend_id | id for monitor ELB_too_much_5xx_backend |
| ELB_too_much_5xx_id | id for monitor ELB_too_much_5xx |
Related documentation
---------------------
DataDog documentation:

29
cloud/aws/elb/outputs.tf Normal file
View File

@ -0,0 +1,29 @@
output "ELB_no_healthy_instances_id" {
description = "id for monitor ELB_no_healthy_instances"
value = "${datadog_monitor.ELB_no_healthy_instances.id}"
}
output "ELB_too_much_4xx_id" {
description = "id for monitor ELB_too_much_4xx"
value = "${datadog_monitor.ELB_too_much_4xx.id}"
}
output "ELB_too_much_5xx_id" {
description = "id for monitor ELB_too_much_5xx"
value = "${datadog_monitor.ELB_too_much_5xx.id}"
}
output "ELB_too_much_4xx_backend_id" {
description = "id for monitor ELB_too_much_4xx_backend"
value = "${datadog_monitor.ELB_too_much_4xx_backend.id}"
}
output "ELB_too_much_5xx_backend_id" {
description = "id for monitor ELB_too_much_5xx_backend"
value = "${datadog_monitor.ELB_too_much_5xx_backend.id}"
}
output "ELB_backend_latency_id" {
description = "id for monitor ELB_backend_latency"
value = "${datadog_monitor.ELB_backend_latency.id}"
}

View File

@ -34,6 +34,13 @@ Inputs
| incoming_records_timeframe | Monitor timeframe for incoming records metrics evaluation [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | `last_15m` | no |
| message | Message sent when an alert is triggered | string | - | yes |
Outputs
-------
| Name | Description |
|------|-------------|
| firehose_incoming_records_id | id for monitor firehose_incoming_records |
Related documentation
---------------------

View File

@ -0,0 +1,4 @@
output "firehose_incoming_records_id" {
description = "id for monitor firehose_incoming_records"
value = "${datadog_monitor.firehose_incoming_records.id}"
}

View File

@ -43,6 +43,14 @@ Inputs
| filter_tags_use_defaults | Use default filter tags convention | string | `true` | no |
| message | Message sent when an alert is triggered | string | - | yes |
Outputs
-------
| Name | Description |
|------|-------------|
| rds_cpu_90_15min_id | id for monitor rds_cpu_90_15min |
| rds_free_space_low_id | id for monitor rds_free_space_low |
Related documentation
---------------------

9
cloud/aws/rds/outputs.tf Normal file
View File

@ -0,0 +1,9 @@
output "rds_cpu_90_15min_id" {
description = "id for monitor rds_cpu_90_15min"
value = "${datadog_monitor.rds_cpu_90_15min.id}"
}
output "rds_free_space_low_id" {
description = "id for monitor rds_free_space_low"
value = "${datadog_monitor.rds_free_space_low.id}"
}

View File

@ -34,6 +34,13 @@ Inputs
| vpn_status_time_aggregator | Monitor aggregator for VPN status [available values: min, max or avg] | string | `max` | no |
| vpn_status_timeframe | Monitor timeframe for VPN status [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | `last_5m` | no |
Outputs
-------
| Name | Description |
|------|-------------|
| VPN_status_id | id for monitor VPN_status |
Related documentation
---------------------

4
cloud/aws/vpn/outputs.tf Normal file
View File

@ -0,0 +1,4 @@
output "VPN_status_id" {
description = "id for monitor VPN_status"
value = "${datadog_monitor.VPN_status.id}"
}

View File

@ -57,6 +57,17 @@ Inputs
| unauthorized_requests_threshold_warning | Warning regarding acceptable percent of unauthorized requests | string | `50` | no |
| unauthorized_requests_timeframe | Monitor timeframe for API Management unauthorized requests [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | `last_5m` | no |
Outputs
-------
| Name | Description |
|------|-------------|
| apimgt_failed_requests_id | id for monitor apimgt_failed_requests |
| apimgt_other_requests_id | id for monitor apimgt_other_requests |
| apimgt_status_id | id for monitor apimgt_status |
| apimgt_successful_requests_id | id for monitor apimgt_successful_requests |
| apimgt_unauthorized_requests_id | id for monitor apimgt_unauthorized_requests |
Related documentation
---------------------

View File

@ -0,0 +1,24 @@
output "apimgt_status_id" {
description = "id for monitor apimgt_status"
value = "${datadog_monitor.apimgt_status.id}"
}
output "apimgt_failed_requests_id" {
description = "id for monitor apimgt_failed_requests"
value = "${datadog_monitor.apimgt_failed_requests.id}"
}
output "apimgt_other_requests_id" {
description = "id for monitor apimgt_other_requests"
value = "${datadog_monitor.apimgt_other_requests.id}"
}
output "apimgt_unauthorized_requests_id" {
description = "id for monitor apimgt_unauthorized_requests"
value = "${datadog_monitor.apimgt_unauthorized_requests.id}"
}
output "apimgt_successful_requests_id" {
description = "id for monitor apimgt_successful_requests"
value = "${datadog_monitor.apimgt_successful_requests.id}"
}

View File

@ -61,6 +61,17 @@ Inputs
| response_time_time_aggregator | Monitor aggregator for App Services response time [available values: min, max or avg] | string | `min` | no |
| response_time_timeframe | Monitor timeframe for App Services response time [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | `last_5m` | no |
Outputs
-------
| Name | Description |
|------|-------------|
| appservices_http_4xx_errors_count_id | id for monitor appservices_http_4xx_errors_count |
| appservices_http_5xx_errors_count_id | id for monitor appservices_http_5xx_errors_count |
| appservices_http_success_status_rate_id | id for monitor appservices_http_success_status_rate |
| appservices_memory_usage_count_id | id for monitor appservices_memory_usage_count |
| appservices_response_time_id | id for monitor appservices_response_time |
Related documentation
---------------------

View File

@ -0,0 +1,24 @@
output "appservices_response_time_id" {
description = "id for monitor appservices_response_time"
value = "${datadog_monitor.appservices_response_time.id}"
}
output "appservices_memory_usage_count_id" {
description = "id for monitor appservices_memory_usage_count"
value = "${datadog_monitor.appservices_memory_usage_count.id}"
}
output "appservices_http_5xx_errors_count_id" {
description = "id for monitor appservices_http_5xx_errors_count"
value = "${datadog_monitor.appservices_http_5xx_errors_count.id}"
}
output "appservices_http_4xx_errors_count_id" {
description = "id for monitor appservices_http_4xx_errors_count"
value = "${datadog_monitor.appservices_http_4xx_errors_count.id}"
}
output "appservices_http_success_status_rate_id" {
description = "id for monitor appservices_http_success_status_rate"
value = "${datadog_monitor.appservices_http_success_status_rate.id}"
}

View File

@ -46,6 +46,15 @@ Inputs
| status_time_aggregator | Monitor aggregator for Event Hub status [available values: min, max or avg] | string | `max` | no |
| status_timeframe | Monitor timeframe for Event Hub status [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | `last_5m` | no |
Outputs
-------
| Name | Description |
|------|-------------|
| eventhub_errors_id | id for monitor eventhub_errors |
| eventhub_failed_requests_id | id for monitor eventhub_failed_requests |
| eventhub_status_id | id for monitor eventhub_status |
Related documentation
---------------------

View File

@ -0,0 +1,14 @@
output "eventhub_status_id" {
description = "id for monitor eventhub_status"
value = "${datadog_monitor.eventhub_status.id}"
}
output "eventhub_failed_requests_id" {
description = "id for monitor eventhub_failed_requests"
value = "${datadog_monitor.eventhub_failed_requests.id}"
}
output "eventhub_errors_id" {
description = "id for monitor eventhub_errors"
value = "${datadog_monitor.eventhub_errors.id}"
}

View File

@ -109,6 +109,26 @@ 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 |
Outputs
-------
| Name | Description |
|------|-------------|
| status_id | id for monitor status |
| too_many_c2d_methods_failed_id | id for monitor too_many_c2d_methods_failed |
| too_many_c2d_twin_read_failed_id | id for monitor too_many_c2d_twin_read_failed |
| too_many_c2d_twin_update_failed_id | id for monitor too_many_c2d_twin_update_failed |
| too_many_d2c_telemetry_egress_dropped_id | id for monitor too_many_d2c_telemetry_egress_dropped |
| too_many_d2c_telemetry_egress_invalid_id | id for monitor too_many_d2c_telemetry_egress_invalid |
| too_many_d2c_telemetry_egress_orphaned_id | id for monitor too_many_d2c_telemetry_egress_orphaned |
| too_many_d2c_telemetry_ingress_nosent_id | id for monitor too_many_d2c_telemetry_ingress_nosent |
| too_many_d2c_twin_read_failed_id | id for monitor too_many_d2c_twin_read_failed |
| too_many_d2c_twin_update_failed_id | id for monitor too_many_d2c_twin_update_failed |
| too_many_jobs_failed_id | id for monitor too_many_jobs_failed |
| too_many_list_jobs_failed_id | id for monitor too_many_list_jobs_failed |
| too_many_query_jobs_failed_id | id for monitor too_many_query_jobs_failed |
| total_devices_id | id for monitor total_devices |
Related documentation
---------------------

View File

@ -0,0 +1,69 @@
output "too_many_jobs_failed_id" {
description = "id for monitor too_many_jobs_failed"
value = "${datadog_monitor.too_many_jobs_failed.id}"
}
output "too_many_list_jobs_failed_id" {
description = "id for monitor too_many_list_jobs_failed"
value = "${datadog_monitor.too_many_list_jobs_failed.id}"
}
output "too_many_query_jobs_failed_id" {
description = "id for monitor too_many_query_jobs_failed"
value = "${datadog_monitor.too_many_query_jobs_failed.id}"
}
output "status_id" {
description = "id for monitor status"
value = "${datadog_monitor.status.id}"
}
output "total_devices_id" {
description = "id for monitor total_devices"
value = "${datadog_monitor.total_devices.id}"
}
output "too_many_c2d_methods_failed_id" {
description = "id for monitor too_many_c2d_methods_failed"
value = "${datadog_monitor.too_many_c2d_methods_failed.id}"
}
output "too_many_c2d_twin_read_failed_id" {
description = "id for monitor too_many_c2d_twin_read_failed"
value = "${datadog_monitor.too_many_c2d_twin_read_failed.id}"
}
output "too_many_c2d_twin_update_failed_id" {
description = "id for monitor too_many_c2d_twin_update_failed"
value = "${datadog_monitor.too_many_c2d_twin_update_failed.id}"
}
output "too_many_d2c_twin_read_failed_id" {
description = "id for monitor too_many_d2c_twin_read_failed"
value = "${datadog_monitor.too_many_d2c_twin_read_failed.id}"
}
output "too_many_d2c_twin_update_failed_id" {
description = "id for monitor too_many_d2c_twin_update_failed"
value = "${datadog_monitor.too_many_d2c_twin_update_failed.id}"
}
output "too_many_d2c_telemetry_egress_dropped_id" {
description = "id for monitor too_many_d2c_telemetry_egress_dropped"
value = "${datadog_monitor.too_many_d2c_telemetry_egress_dropped.id}"
}
output "too_many_d2c_telemetry_egress_orphaned_id" {
description = "id for monitor too_many_d2c_telemetry_egress_orphaned"
value = "${datadog_monitor.too_many_d2c_telemetry_egress_orphaned.id}"
}
output "too_many_d2c_telemetry_egress_invalid_id" {
description = "id for monitor too_many_d2c_telemetry_egress_invalid"
value = "${datadog_monitor.too_many_d2c_telemetry_egress_invalid.id}"
}
output "too_many_d2c_telemetry_ingress_nosent_id" {
description = "id for monitor too_many_d2c_telemetry_ingress_nosent"
value = "${datadog_monitor.too_many_d2c_telemetry_ingress_nosent.id}"
}

View File

@ -55,6 +55,16 @@ Inputs
| status_time_aggregator | Monitor aggregator for Redis status [available values: min, max or avg] | string | `max` | no |
| status_timeframe | Monitor timeframe for Redis status [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | `last_5m` | no |
Outputs
-------
| Name | Description |
|------|-------------|
| evictedkeys_id | id for monitor evictedkeys |
| percent_processor_time_id | id for monitor percent_processor_time |
| server_load_id | id for monitor server_load |
| status_id | id for monitor status |
Related documentation
---------------------

View File

@ -0,0 +1,19 @@
output "status_id" {
description = "id for monitor status"
value = "${datadog_monitor.status.id}"
}
output "evictedkeys_id" {
description = "id for monitor evictedkeys"
value = "${datadog_monitor.evictedkeys.id}"
}
output "percent_processor_time_id" {
description = "id for monitor percent_processor_time"
value = "${datadog_monitor.percent_processor_time.id}"
}
output "server_load_id" {
description = "id for monitor server_load"
value = "${datadog_monitor.server_load.id}"
}

View File

@ -34,6 +34,13 @@ Inputs
| status_time_aggregator | Monitor aggregator for Service Bus status [available values: min, max or avg] | string | `max` | no |
| status_timeframe | Monitor timeframe for Service Bus status [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | `last_15m` | no |
Outputs
-------
| Name | Description |
|------|-------------|
| servicebus_status_id | id for monitor servicebus_status |
Related documentation
---------------------

View File

@ -0,0 +1,4 @@
output "servicebus_status_id" {
description = "id for monitor servicebus_status"
value = "${datadog_monitor.servicebus_status.id}"
}

View File

@ -55,6 +55,16 @@ Inputs
| filter_tags_use_defaults | Use default filter tags convention | string | `true` | no |
| message | Message sent when an alert is triggered | string | - | yes |
Outputs
-------
| Name | Description |
|------|-------------|
| sql-database_cpu_90_15min_id | id for monitor sql-database_cpu_90_15min |
| sql-database_deadlocks_count_id | id for monitor sql-database_deadlocks_count |
| sql-database_dtu_consumption_high_id | id for monitor sql-database_dtu_consumption_high |
| sql-database_free_space_low_id | id for monitor sql-database_free_space_low |
Related documentation
---------------------

View File

@ -0,0 +1,19 @@
output "sql-database_cpu_90_15min_id" {
description = "id for monitor sql-database_cpu_90_15min"
value = "${datadog_monitor.sql-database_cpu_90_15min.id}"
}
output "sql-database_free_space_low_id" {
description = "id for monitor sql-database_free_space_low"
value = "${datadog_monitor.sql-database_free_space_low.id}"
}
output "sql-database_dtu_consumption_high_id" {
description = "id for monitor sql-database_dtu_consumption_high"
value = "${datadog_monitor.sql-database_dtu_consumption_high.id}"
}
output "sql-database_deadlocks_count_id" {
description = "id for monitor sql-database_deadlocks_count"
value = "${datadog_monitor.sql-database_deadlocks_count.id}"
}

View File

@ -92,6 +92,21 @@ Inputs
| timeout_error_requests_time_aggregator | Monitor aggregator for Storage timeout [available values: min, max or avg] | string | `min` | no |
| timeout_error_requests_timeframe | Monitor timeframe for Storage timeout [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | `last_5m` | no |
Outputs
-------
| Name | Description |
|------|-------------|
| authorization_error_requests_id | id for monitor authorization_error_requests |
| availability_id | id for monitor availability |
| client_other_error_requests_id | id for monitor client_other_error_requests |
| latency_id | id for monitor latency |
| network_error_requests_id | id for monitor network_error_requests |
| server_other_error_requests_id | id for monitor server_other_error_requests |
| successful_requests_id | id for monitor successful_requests |
| throttling_error_requests_id | id for monitor throttling_error_requests |
| timeout_error_requests_id | id for monitor timeout_error_requests |
Related documentation
---------------------

View File

@ -0,0 +1,44 @@
output "availability_id" {
description = "id for monitor availability"
value = "${datadog_monitor.availability.id}"
}
output "successful_requests_id" {
description = "id for monitor successful_requests"
value = "${datadog_monitor.successful_requests.id}"
}
output "latency_id" {
description = "id for monitor latency"
value = "${datadog_monitor.latency.id}"
}
output "timeout_error_requests_id" {
description = "id for monitor timeout_error_requests"
value = "${datadog_monitor.timeout_error_requests.id}"
}
output "network_error_requests_id" {
description = "id for monitor network_error_requests"
value = "${datadog_monitor.network_error_requests.id}"
}
output "throttling_error_requests_id" {
description = "id for monitor throttling_error_requests"
value = "${datadog_monitor.throttling_error_requests.id}"
}
output "server_other_error_requests_id" {
description = "id for monitor server_other_error_requests"
value = "${datadog_monitor.server_other_error_requests.id}"
}
output "client_other_error_requests_id" {
description = "id for monitor client_other_error_requests"
value = "${datadog_monitor.client_other_error_requests.id}"
}
output "authorization_error_requests_id" {
description = "id for monitor authorization_error_requests"
value = "${datadog_monitor.authorization_error_requests.id}"
}

View File

@ -51,6 +51,17 @@ Inputs
| su_utilization_time_aggregator | Monitor aggregator for Stream Analytics utilization [available values: min, max or avg] | string | `min` | no |
| su_utilization_timeframe | Monitor timeframe for Stream Analytics utilization [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | `last_5m` | no |
Outputs
-------
| Name | Description |
|------|-------------|
| conversion_errors_id | id for monitor conversion_errors |
| failed_function_requests_id | id for monitor failed_function_requests |
| runtime_errors_id | id for monitor runtime_errors |
| status_id | id for monitor status |
| su_utilization_id | id for monitor su_utilization |
Related documentation
---------------------

View File

@ -0,0 +1,24 @@
output "status_id" {
description = "id for monitor status"
value = "${datadog_monitor.status.id}"
}
output "su_utilization_id" {
description = "id for monitor su_utilization"
value = "${datadog_monitor.su_utilization.id}"
}
output "failed_function_requests_id" {
description = "id for monitor failed_function_requests"
value = "${datadog_monitor.failed_function_requests.id}"
}
output "conversion_errors_id" {
description = "id for monitor conversion_errors"
value = "${datadog_monitor.conversion_errors.id}"
}
output "runtime_errors_id" {
description = "id for monitor runtime_errors"
value = "${datadog_monitor.runtime_errors.id}"
}

View File

@ -84,3 +84,14 @@ Inputs
| mongodb_replicaset_time_aggregator | Monitor aggregator for Mongodb replicaset [available values: min, max or avg] | string | `max` | no |
| mongodb_replicaset_timeframe | Monitor timeframe for Mongodb replicaset [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | `last_5m` | no |
Outputs
-------
| Name | Description |
|------|-------------|
| mongodb_replicaset_state_id | id for monitor mongodb_replicaset_state |
Related documentation
---------------------
DataDog documentation:

View File

@ -0,0 +1,4 @@
output "mongodb_replicaset_state_id" {
description = "id for monitor mongodb_replicaset_state"
value = "${datadog_monitor.mongodb_replicaset_state.id}"
}

View File

@ -32,3 +32,14 @@ Inputs
| filter_tags_use_defaults | Use default filter tags convention | string | `true` | no |
| message | Message sent when an alert is triggered | string | - | yes |
Outputs
-------
| Name | Description |
|------|-------------|
| datadog_apache_process_id | id for monitor datadog_apache_process |
Related documentation
---------------------
DataDog documentation:

View File

@ -0,0 +1,4 @@
output "datadog_apache_process_id" {
description = "id for monitor datadog_apache_process"
value = "${datadog_monitor.datadog_apache_process.id}"
}

View File

@ -32,3 +32,14 @@ Inputs
| nginx_connect_message | Custom message for Nginx process monitor | string | `` | no |
| nginx_connect_silenced | Groups to mute for Nginx process monitor | map | `<map>` | no |
Outputs
-------
| Name | Description |
|------|-------------|
| datadog_nginx_process_id | id for monitor datadog_nginx_process |
Related documentation
---------------------
DataDog documentation:

View File

@ -0,0 +1,4 @@
output "datadog_nginx_process_id" {
description = "id for monitor datadog_nginx_process"
value = "${datadog_monitor.datadog_nginx_process.id}"
}

View File

@ -39,3 +39,15 @@ Inputs
| php_fpm_connect_message | Custom message for PHP FPM process monitor | string | `` | no |
| php_fpm_connect_silenced | Groups to mute for PHP FPM process monitor | map | `<map>` | no |
Outputs
-------
| Name | Description |
|------|-------------|
| datadog_fpm_process_id | id for monitor datadog_fpm_process |
| datadog_php_fpm_connect_idle_id | id for monitor datadog_php_fpm_connect_idle |
Related documentation
---------------------
DataDog documentation:

View File

@ -0,0 +1,9 @@
output "datadog_php_fpm_connect_idle_id" {
description = "id for monitor datadog_php_fpm_connect_idle"
value = "${datadog_monitor.datadog_php_fpm_connect_idle.id}"
}
output "datadog_fpm_process_id" {
description = "id for monitor datadog_fpm_process"
value = "${datadog_monitor.datadog_fpm_process.id}"
}

27
scripts/01_update_output.sh Executable file
View File

@ -0,0 +1,27 @@
#!/bin/bash
set -xeo pipefail
script_dir=$(dirname $0)
if [[ "$script_dir" == "." ]]; then
cd ..
else
cd "$(dirname $script_dir)"
fi
for file in $(find . -path ./incubator -prune -o -name 'monitors-*.tf' -print); do
cd $(dirname $file)
echo $file
> outputs.tf
for monitor in $(grep 'resource "datadog_monitor"' $(basename $file) | awk '{print $3}' | tr -d '"' ); do
echo $monitor
cat <<EOF >> outputs.tf
output "${monitor}_id" {
description = "id for monitor $monitor"
value = "\${datadog_monitor.${monitor}.id}"
}
EOF
done
cd - >> /dev/null
done
terraform fmt

View File

@ -1,4 +1,5 @@
#!/bin/bash
set -xeo pipefail
script_dir=$(dirname $0)
if [[ "$script_dir" == "." ]]; then
@ -7,6 +8,8 @@ else
cd "$(dirname $script_dir)"
fi
PATTERN_DOC="Related documentation"
for dir in $(find -mindepth 2 -name README.md); do
cd $(dirname $dir)
pwd
@ -17,7 +20,11 @@ for dir in $(find -mindepth 2 -name README.md); do
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
if ! grep "${PATTERN_DOC}" README.md.bak; then
echo "Error: missing documentation section in README"
exit 1
fi
grep -Pzo --color=never ".*${PATTERN_DOC}(.*\n)*" README.md.bak | head -n -1 >> README.md
dos2unix README.md
rm README.md.bak
cd - >> /dev/null

7
scripts/auto_update.sh Executable file
View File

@ -0,0 +1,7 @@
#!/bin/bash
set -xeo pipefail
cd $(dirname $0)
for script in [0-9][0-9]_*.sh; do
./${script}
done

View File

@ -64,3 +64,18 @@ Inputs
| free_memory_timeframe | Monitor timeframe for Free memory [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | `last_5m` | no |
| message | Message sent when an alert is triggered | string | - | yes |
Outputs
-------
| Name | Description |
|------|-------------|
| datadog_cpu_too_high_id | id for monitor datadog_cpu_too_high |
| datadog_free_disk_space_inodes_too_low_id | id for monitor datadog_free_disk_space_inodes_too_low |
| datadog_free_disk_space_too_low_id | id for monitor datadog_free_disk_space_too_low |
| datadog_free_memory_id | id for monitor datadog_free_memory |
| datadog_load_too_high_id | id for monitor datadog_load_too_high |
Related documentation
---------------------
DataDog documentation:

24
system/generic/outputs.tf Normal file
View File

@ -0,0 +1,24 @@
output "datadog_cpu_too_high_id" {
description = "id for monitor datadog_cpu_too_high"
value = "${datadog_monitor.datadog_cpu_too_high.id}"
}
output "datadog_load_too_high_id" {
description = "id for monitor datadog_load_too_high"
value = "${datadog_monitor.datadog_load_too_high.id}"
}
output "datadog_free_disk_space_too_low_id" {
description = "id for monitor datadog_free_disk_space_too_low"
value = "${datadog_monitor.datadog_free_disk_space_too_low.id}"
}
output "datadog_free_disk_space_inodes_too_low_id" {
description = "id for monitor datadog_free_disk_space_inodes_too_low"
value = "${datadog_monitor.datadog_free_disk_space_inodes_too_low.id}"
}
output "datadog_free_memory_id" {
description = "id for monitor datadog_free_memory"
value = "${datadog_monitor.datadog_free_memory.id}"
}