Ddding troubleshooting doc link for Apache integration#22968
Ddding troubleshooting doc link for Apache integration#22968kelvin-lal wants to merge 2 commits intomasterfrom
Conversation
There was a problem hiding this comment.
💡 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") |
There was a problem hiding this comment.
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 👍 / 👎.
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

Motivation
Project card: https://datadoghq.atlassian.net/jira/software/projects/BAEM/boards/14501?selectedIssue=BAEM-9
Review checklist (to be filled by reviewers)
qa/skip-qalabel if the PR doesn't need to be tested during QA.backport/<branch-name>label to the PR and it will automatically open a backport PR once this one is merged