Emit Warning Events for Consul Integration#23779
Conversation
🎉 All green!🧪 All tests passed 🎯 Code Coverage (details) 🔗 Commit SHA: e0e082d | Docs | Datadog PR Page | Give us feedback! |
|
@codex review |
|
Codex Review: Didn't find any major issues. Swish! ℹ️ About Codex in GitHubCodex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback". |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 03110884da
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| "msg_text": f"Check {check_id} for service {service_name}, id: {service_id}" | ||
| f"{label} on node {node_name}: {check_output}", |
There was a problem hiding this comment.
Add separator before status label in event message
When a warning event is emitted, msg_text concatenates service_id and label without any delimiter, producing strings like id: server-loadbalancerwarning on node .... This is a user-visible regression in the new warning-event path and can break downstream parsing or simple text matching for event content. Add a space (or punctuation) between service_id and the status word.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
It was like this before my change so I did not change it in case customer's monitors would be affected. I can fix the the typo if need be
Review from janine-c is dismissed. Related teams and files:
- documentation
- consul/assets/configuration/spec.yaml
- consul/datadog_checks/consul/data/conf.yaml.example
Validation ReportAll 21 validations passed. Show details
|
What does this PR do?
Adds optional warning events when Consul health checks transition to warning, via a new config option
health_check_warning_events. The config option makes it so existing customers do not have their monitors interferred withWhen
collect_health_checksis enabled, the check already emits events on transitions to critical (consul.check_failed, alert_type: error). Withhealth_check_warning_events: true, it also emits events on transitions to warning (consul.check_warning,alert_type: warning).Motivation
Customer FR for the need to have warning events emitted as well.
Review checklist (to be filled by reviewers)
qa/requiredif this PR needs QA validation, orqa/skip-qaif it does not. Exactly one of the two is required.backport/<branch-name>label to the PR and it will automatically open a backport PR once this one is merged