MON-313 add missing multiplication by 100

This commit is contained in:
Quentin Manfroi 2018-09-26 19:15:25 +02:00
parent bbc695e491
commit 0b8d46f3d2
2 changed files with 3 additions and 3 deletions

View File

@ -16,8 +16,8 @@ module "datadog-monitors-cloud-aws-elasticache-memcached" {
Creates DataDog monitors with the following checks: Creates DataDog monitors with the following checks:
- Elasticache memcached cache hit ratio
- Elasticache memcached CPU - Elasticache memcached CPU
- Elasticache memcached get hit ratio
## Inputs ## Inputs

View File

@ -1,6 +1,6 @@
resource "datadog_monitor" "memcached_get_hits" { resource "datadog_monitor" "memcached_get_hits" {
count = "${var.get_hits_enabled ? 1 : 0}" count = "${var.get_hits_enabled ? 1 : 0}"
name = "[${var.environment}] Elasticache memcached get hit ratio {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}" name = "[${var.environment}] Elasticache memcached cache hit ratio {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}"
message = "${coalesce(var.get_hits_message, var.message)}" message = "${coalesce(var.get_hits_message, var.message)}"
type = "metric alert" type = "metric alert"
@ -10,7 +10,7 @@ resource "datadog_monitor" "memcached_get_hits" {
avg:aws.elasticache.get_hits${module.filter-tags.query_alert} by {region,cacheclusterid,cachenodeid}.as_count() / avg:aws.elasticache.get_hits${module.filter-tags.query_alert} by {region,cacheclusterid,cachenodeid}.as_count() /
(avg:aws.elasticache.get_hits${module.filter-tags.query_alert} by {region,cacheclusterid,cachenodeid}.as_count() + (avg:aws.elasticache.get_hits${module.filter-tags.query_alert} by {region,cacheclusterid,cachenodeid}.as_count() +
avg:aws.elasticache.get_misses${module.filter-tags.query_alert} by {region,cacheclusterid,cachenodeid}.as_count()) avg:aws.elasticache.get_misses${module.filter-tags.query_alert} by {region,cacheclusterid,cachenodeid}.as_count())
) < ${var.get_hits_threshold_critical} ) * 100 < ${var.get_hits_threshold_critical}
EOF EOF
thresholds { thresholds {