Coder Social home page Coder Social logo

Comments (4)

MattHodge avatar MattHodge commented on August 16, 2024 2

Looks like what this will do: https://github.com/terraform-providers/terraform-provider-datadog/pull/18

To explain the reason why you would want this:

  • You have a single DataDog host that is running a PHP application for an online store.
    • The host is tagged as host:web_host and environment:production.
    • The host is sending two custom metrics from inside the PHP application:
      • online_checkout.products_purchased - increments every time a product is purchased
      • online_checkout.checkout_errors - incruments every time there is a failure when someone tries checking out.

You create a monitor for each case:

  • Monitor 1 - A product has been purchased in the last 10 minutes
  • Monitor 2 - Number of checkout errors < 1

Your online store doesn't have anyone buying from around 1am-8am each morning, so you want a downtime on this one (Monitor 1) between 1am-8am.

You never want a downtime on checkout errors though (Monitor 2), you want to get notified of this at all hours of the night if someone cannot checkout.

The way the resource is currently designed, you can only set downtimes on host tags, so you cannot just set Monitor 1 with a downtime.

If we can set downtimes by monitor_id this scenario is possible using this module.

Hopefully this explains why its needed :D

from terraform-provider-datadog.

nyanshak avatar nyanshak commented on August 16, 2024

Mute a single monitor forever:

resource "datadog_monitor" "foo" {
    ...
   silenced {
      '*' = 0
   }
}

Mute by scope (such as by host or role):

resource "datadog_monitor" "foo" {
    ...
   silenced {
      'host:i-1234' = 0
   }
}

resource "datadog_monitor" "foo" {
    ...
   silenced {
      'role:db' = 0
   }
}

I believe this is already supported. Docs for silencing via the provider: docs. Let me know if I didn't understand the comment and that's not what you're talking about.

@philax

from terraform-provider-datadog.

kikitux avatar kikitux commented on August 16, 2024

As #18 got merged, can we close this?

@philax ?

from terraform-provider-datadog.

tombuildsstuff avatar tombuildsstuff commented on August 16, 2024

Closing @kikitux's request

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.