Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for "enable_logs_sample" in logs monitor. #139

Closed
kgrodzicki opened this issue Jan 4, 2019 · 7 comments
Closed

Support for "enable_logs_sample" in logs monitor. #139

kgrodzicki opened this issue Jan 4, 2019 · 7 comments

Comments

@kgrodzicki
Copy link

kgrodzicki commented Jan 4, 2019

Terraform Version

Terraform v0.11.11

  • provider.datadog v1.6.0

Terraform Configuration Files

resource "datadog_monitor" "log_errors" {
  name = "Errors detected in logs"
  type = "log alert"
  message = "Notifying @slack-team"
  query = "logs(\"status:error\").index(\"main\").rollup(\"count\").last(\"1m\") >= 1"
  notify_no_data = false
  include_tags = true
  enable_logs_sample = true
}

See https://docs.datadoghq.com/monitors/monitor_types/log/

@itmecho
Copy link

itmecho commented Mar 14, 2019

Any change of movement on this issue? I've just run into a problem that this would fix!

You get the log alert but it's not really useful without the log itself as the alert doesn't contain and information about where the event occurred.

@kgrodzicki
Copy link
Author

Not sure when it is going to be merged... PR got moved from milestone 1.7.0 to 1.8.0. @masci can I help somehow to speed up this process ?

@bkabrda
Copy link
Contributor

bkabrda commented Apr 17, 2019

Since #151 has been merged and is working correctly, this issue can be closed.

@nmuesch nmuesch closed this as completed Apr 17, 2019
@kgrodzicki
Copy link
Author

@bkabrda it looks like wrong PR has been merged. I added https://github.com/terraform-providers/terraform-provider-datadog/pull/140 from 4.01.2019 and you merged one from 13.02.2019 https://github.com/terraform-providers/terraform-provider-datadog/pull/151. 151 does not look like it is working, gives "Error: datadog_monitor.log_errors: : invalid or unknown key: enable_logs_sample" with provider provider.datadog v1.8.0

@bkabrda
Copy link
Contributor

bkabrda commented Apr 23, 2019

@kgrodzicki I'll take a look at this, but do note that the referenced PR has been merged after the 1.8.0 version of the provider was released, so this would only work after we do next release.

@bkabrda
Copy link
Contributor

bkabrda commented Apr 23, 2019

Yeah, using build of the provider from the current master branch works with the example from the original comment in this issue report. @kgrodzicki are you ok with me closing #140 as it's no longer necessary? FTR, I'm sorry for not noticing it. I should have merged your PR, because it was opened earlier, I just had not noticed.

@kgrodzicki
Copy link
Author

@bkabrda no worries and thank you for fast answer. It is up to you, you can close #140 or rollback #151 and merge the #140 since #151 has been merged after the 1.8.0 and it is not released yet. I am good with both solutions. Thanks again for your time !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants