Coder Social home page Coder Social logo

Comments (2)

skarimo avatar skarimo commented on July 18, 2024

Hello, could you provide an example, is query referring to a value of a metric?

from terraform-provider-datadog.

clkelly-r7 avatar clkelly-r7 commented on July 18, 2024

Yes sorry I mean metric instead of query, I was trying to do something like(fake example but same idea):

locals {
critical_threshold = sum:aws.kafka.messages_in_per_sec{topic:${var.topic},cluster_name:${var.kafka_cluster},region:${var.region},consumer_group:${var.consumer_group}}
}
resource "datadog_monitor" "kafka_topic_high_offset_lag_warning" {
  # Alert if the kafka topic has more messages than the critical value
  name  = "${var.service}: Offset lag is above threshold for ${var.topic_name}"
  type  = "metric alert"
  query = "avg(last_30m): sum:aws.kafka.offset_lag{topic:${var.topic_name},cluster_name:${var.kafka_cluster},region:${var.region},consumer_group:${var.consumer_group}} >= ${local.critical_threshold}"
}

but kept getting an error because the threshold was not a constant, I was wondering if it would be possible to have a datasource that would grab the current value of a metric at the time of running a plan so that it could be used as a constant in the threshold of our monitor

from terraform-provider-datadog.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.