MON-472 Related documentation added to the README.md of the module. Name of the monitors improved with units.

This commit is contained in:
Rafael Romero Carmona 2019-09-05 16:22:17 +01:00
parent 4af3817970
commit f29736982a
2 changed files with 5 additions and 4 deletions

View File

@ -17,7 +17,7 @@ module "datadog-monitors-cloud-aws-sqs" {
Creates DataDog monitors with the following checks:
- SQS Age of the oldest message
- SQS Number of messages visible (disabled by default)
- SQS Visible Messages (disabled by default)
## Inputs
@ -54,4 +54,5 @@ Creates DataDog monitors with the following checks:
| visible\_messages\_id | id for monitor visible_messages |
## Related documentation
* [Datadog Documentation](https://docs.datadoghq.com/integrations/amazon_sqs/)
* [Service Documentation](https://docs.aws.amazon.com/sqs/index.html)

View File

@ -1,7 +1,7 @@
# Approximate Number of Visible Messages
resource "datadog_monitor" "visible_messages" {
count = var.visible_messages_enabled == "true" ? 1 : 0
name = "${var.prefix_slug == "" ? "" : "[${var.prefix_slug}]"}[${var.environment}] SQS Number of messages visible {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}"
name = "${var.prefix_slug == "" ? "" : "[${var.prefix_slug}]"}[${var.environment}] SQS Visible Messages {{#is_alert}}{{{comparator}}} {{threshold}} ({{value}}){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}} ({{value}}){{/is_warning}}"
type = "metric alert"
message = coalesce(var.visible_messages_message, var.message)
@ -36,7 +36,7 @@ EOQ
# Age of the Oldest Message
resource "datadog_monitor" "age_of_oldest_message" {
count = var.age_of_oldest_message_enabled == "true" ? 1 : 0
name = "${var.prefix_slug == "" ? "" : "[${var.prefix_slug}]"}[${var.environment}] SQS Age of the oldest message {{#is_alert}}{{{comparator}}} {{threshold}} ({{value}}){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}} ({{value}}){{/is_warning}}"
name = "${var.prefix_slug == "" ? "" : "[${var.prefix_slug}]"}[${var.environment}] SQS Age of the oldest message {{#is_alert}}{{{comparator}}} {{threshold}}s ({{value}}s){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}s ({{value}}s){{/is_warning}}"
type = "metric alert"
message = coalesce(var.age_of_oldest_message_message, var.message)