S
S
Sergey2021-11-06 18:51:04
Monitoring
Sergey, 2021-11-06 18:51:04

How to specify a value as a percentage?

There is such a terraform file for working with datadog

resource "datadog_synthetics_test" "check-api" {
  type    = "api"
  subtype = "icmp"
  request_definition {
    number_of_packets = 4
    host    = "IP-my-service"
  }
   assertion {
    type     = "packetLossPercentage"
    operator = "lessThan"
    target   = "60"
  } 
  locations = ["aws:eu-west-2", "aws:ca-central-1", "aws:ap-south-1"]


  options_list {
    tick_every = 60

    retry {
      count    = 2
      interval = 300
    }

    monitor_options {
      renotify_interval = 100
    }
  }
  name    = "Check my service"
  message = "@slack-notify \n"
  tags    = ["check_status:live",  "env:test"]

  status = "live"
}

I can't find in the documentation how to give it the target value as a percentage.
In its current form, it swears that 60 is greater than 1.
6186a4321c6b9959345574.png
Also, I tried various variations in fractional form - zero sense. The scheme itself works - but in the dashboard it says that 0%.
6186a42688bb9023906338.png

Maybe someone already met how to solve this. Or tell me where to look in the documentation. And then I re-read everything about synthetic tests and did not find anything similar.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander Karabanov, 2021-11-07
@karabanov

Looks like a bug
. Otherwise, you can try writing 0.6 instead of 60

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question