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

Submit critical service check whenever connection fails #15208

Merged
merged 18 commits into from
Aug 8, 2023

Conversation

iliakur
Copy link
Contributor

@iliakur iliakur commented Jul 7, 2023

What does this PR do?

Before

We submit CRITICAL service check only if our first connection attempt to mongodb fails. If the connection breaks after the check has run a few times successfully, we continue sending OK service check even if the connection dies.

After

We submit the service check at the very end of the integration check run, at which point we can catch connection errors and submit a CRITICAL service check every time the connection fails.

Motivation

Several support cases. Folks are saying their service check remains OK even though the metric submissions are missing and the logs show connection errors.

Additional Notes

Review checklist (to be filled by reviewers)

  • Feature or bugfix MUST have appropriate tests (unit, integration, e2e)
  • PR title must be written as a CHANGELOG entry (see why)
  • Files changes must correspond to the primary purpose of the PR as described in the title (small unrelated changes should have their own PR)
  • PR must have changelog/ and integration/ labels attached
  • If the PR doesn't need to be tested during QA, please add a qa/skip-qa label.

@ghost ghost added the integration/mongo label Jul 7, 2023
@github-actions
Copy link

github-actions bot commented Jul 7, 2023

Test Results

  16 files    16 suites   3m 17s ⏱️
  92 tests   92 ✔️     0 💤 0
768 runs  580 ✔️ 188 💤 0

Results for commit fbbb024.

♻️ This comment has been updated with latest results.

@codecov
Copy link

codecov bot commented Aug 4, 2023

Codecov Report

Merging #15208 (fbbb024) into master (ca31f3c) will decrease coverage by 0.01%.
Report is 40 commits behind head on master.
The diff coverage is 88.23%.

Flag Coverage Δ
mongo 95.99% <88.23%> (-0.56%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

@iliakur iliakur marked this pull request as ready for review August 4, 2023 11:56
@iliakur iliakur requested a review from a team as a code owner August 4, 2023 11:56
FlorentClarret
FlorentClarret previously approved these changes Aug 4, 2023
Copy link
Member

@FlorentClarret FlorentClarret left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left some questions but looks good to me 👍

mongo/datadog_checks/mongo/mongo.py Outdated Show resolved Hide resolved
mongo/datadog_checks/mongo/mongo.py Outdated Show resolved Hide resolved
mongo/tests/test_unit.py Outdated Show resolved Hide resolved
alopezz
alopezz previously approved these changes Aug 4, 2023
Copy link
Contributor

@alopezz alopezz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

mongo/datadog_checks/mongo/mongo.py Outdated Show resolved Hide resolved
@iliakur iliakur dismissed stale reviews from alopezz and FlorentClarret via 646e664 August 4, 2023 12:36
Copy link
Contributor

@vivek-datadog vivek-datadog left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM if test failures are resolved 👍

vivek-datadog
vivek-datadog previously approved these changes Aug 7, 2023
Copy link
Contributor

@vivek-datadog vivek-datadog left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@iliakur iliakur merged commit c845677 into master Aug 8, 2023
27 checks passed
@iliakur iliakur deleted the ik/agent-9467/robust-svc-check branch August 8, 2023 12:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants