Skip to content

Ddding troubleshooting doc link for Apache integration#22968

Draft
kelvin-lal wants to merge 2 commits intomasterfrom
adding-doc-link
Draft

Ddding troubleshooting doc link for Apache integration#22968
kelvin-lal wants to merge 2 commits intomasterfrom
adding-doc-link

Conversation

@kelvin-lal
Copy link

What does this PR do?

Adds a simple troubleshooting link to our docs when the check fails. Currently this doc only has Apache url troubleshooting, but as this is the main issue when our customers deal with the apache integration, a good one to add as soon as the check fails

Tested with a DDA sandbox that replicates the error and throws a warning message
image

Motivation

Project card: https://datadoghq.atlassian.net/jira/software/projects/BAEM/boards/14501?selectedIssue=BAEM-9

Review checklist (to be filled by reviewers)

  • Feature or bugfix MUST have appropriate tests (unit, integration, e2e)
  • Add the qa/skip-qa label if the PR doesn't need to be tested during QA.
  • If you need to backport this PR to another branch, you can add the backport/<branch-name> label to the PR and it will automatically open a backport PR once this one is merged

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 7e7e4d3e33

ℹ️ 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".

except Exception as e:
self.log.warning("Caught exception %s", e)
self.service_check(service_check_name, AgentCheck.CRITICAL, tags=service_check_tags)
self.warning("For Apache troubleshooting, please visit: https://docs.datadoghq.com/integrations/apache/?tab=host#troubleshooting")

Choose a reason for hiding this comment

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

P2 Badge Move the troubleshooting warning to the no-metrics failure path

This warning only runs when self.http.get() or raise_for_status() throws, so it misses the Apache status-URL misconfiguration that this check already treats specially. If the instance is pointed at /server-status without ?auto, the request succeeds, the code falls through to the metric_count == 0 branch in Apache.check, and the run raises "No metrics were fetched..." instead of ever reaching this new warning; apache/tests/test_apache.py:35-46 already covers that scenario. As written, users hitting the main bad-URL case still won't see the troubleshooting link.

Useful? React with 👍 / 👎.

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.

1 participant