Skip to content

Agent diagnostics#5254

Open
stefnestor wants to merge 6 commits intoelastic:mainfrom
stefnestor:stef_AgentDiag
Open

Agent diagnostics#5254
stefnestor wants to merge 6 commits intoelastic:mainfrom
stefnestor:stef_AgentDiag

Conversation

@stefnestor
Copy link
Contributor

Summary

👋 howdy, team! Furthering our standardization of product diagnostic guidance, this ports the existing troubleshooting section into its own page & makes "contact us for Agent" a first-class citizen.

It partially pulls from this top Support article, but mostly just rephrases existing links into one easy-access location.

Generative AI disclosure

  1. Did you use a generative AI (GenAI) tool to assist in creating this contribution?
  • Yes
  • No

@stefnestor stefnestor requested a review from a team as a code owner February 21, 2026 22:11
@stefnestor stefnestor added the enhancement New feature or request label Feb 21, 2026
@stefnestor stefnestor requested a review from a team as a code owner February 21, 2026 22:11
@github-actions
Copy link
Contributor

github-actions bot commented Feb 21, 2026

Vale Linting Results

Summary: 2 warnings found

⚠️ Warnings (2)
File Line Rule Message
troubleshoot/ingest/fleet/diagnostics.md 54 Elastic.Spelling 'prefered' is a possible misspelling.
troubleshoot/ingest/fleet/diagnostics.md 92 Elastic.DontUse Don't use 'Note that'.

The Vale linter checks documentation changes against the Elastic Docs style guide.

To use Vale locally or report issues, refer to Elastic style guide for Vale.

Co-authored-by: Visha Angelova <91186315+vishaangelova@users.noreply.github.com>
Co-authored-by: Visha Angelova <91186315+vishaangelova@users.noreply.github.com>

If your symptoms are not covered by these guides, review the open issues in these GitHub repositories:

| Repository | To review or report issues about |
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
| Repository | To review or report issues about |
| Repository | Review or report issues about |

* [Retrieve the {{agent}} version](#trb-retrieve-agent-version)
* [Check the {{agent}} status](#trb-check-agent-status)
* [Collect {{agent}} diagnostics bundle](#trb-collect-agent-diagnostics)
* [Collect {{agent}} diagnostics bundle](/troubleshoot/ingest/fleet/diagnostics.md)
Copy link
Contributor

Choose a reason for hiding this comment

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

To match the title of the new page:

Suggested change
* [Collect {{agent}} diagnostics bundle](/troubleshoot/ingest/fleet/diagnostics.md)
* [Capture {{agent}} diagnostics](/troubleshoot/ingest/fleet/diagnostics.md)


## Which information do I need? [agent-diagnostic-type]

As explained under [What is {{fleet}} Server?](/reference/fleet/fleet-server.md), for [{{fleet}}-managed {{agent}}](/reference/fleet/install-fleet-managed-elastic-agent.md), related settings and states can by surfaced by:
Copy link
Contributor

Choose a reason for hiding this comment

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

This part is not relevant here and can only confuse users:

Suggested change
As explained under [What is {{fleet}} Server?](/reference/fleet/fleet-server.md), for [{{fleet}}-managed {{agent}}](/reference/fleet/install-fleet-managed-elastic-agent.md), related settings and states can by surfaced by:
For [{{fleet}}-managed {{agent}}](/reference/fleet/install-fleet-managed-elastic-agent.md), related settings and states can by surfaced by:


[Standalone {{agent}}s](/reference/fleet/install-standalone-elastic-agent.md) are not associated to {{kib}} nor {{fleet}}, but their diagnostics are still accessible from the CLI.

To pull data from the respective applicable locations, you will refer to:
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
To pull data from the respective applicable locations, you will refer to:
To pull data from the respective applicable locations, refer to:


To pull data from the respective applicable locations, you will refer to:

* [Capture {{kib}} diagnostics](/troubleshoot/kibana/capturing-diagnostics.md) {applies_to}`stack: ga`
Copy link
Contributor

@vishaangelova vishaangelova Feb 27, 2026

Choose a reason for hiding this comment

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

We already have a page-level applies_to, and the inline applies_to here does not differ from the page-level one, so there’s no need for it.

Suggested change
* [Capture {{kib}} diagnostics](/troubleshoot/kibana/capturing-diagnostics.md) {applies_to}`stack: ga`
* [Capture {{kib}} diagnostics](/troubleshoot/kibana/capturing-diagnostics.md)

kubectl exec --stdin --tty POD_NAME -n NAMESPACE -- elastic-agent diagnostics
```

Take note of the output diagnostic filename and location.
Copy link
Contributor

@vishaangelova vishaangelova Feb 27, 2026

Choose a reason for hiding this comment

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

Suggested change
Take note of the output diagnostic filename and location.
Note the filename and location of the output file.


Take note of the output diagnostic filename and location.

3. [`cp`](https://kubernetes.io/docs/reference/kubectl/generated/kubectl_cp/) the outputted diagnostic filename to your local machine, replacing placeholders `NAMESPACE`, `POD_NAME`. and `FILE_NAME`.
Copy link
Contributor

@vishaangelova vishaangelova Feb 27, 2026

Choose a reason for hiding this comment

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

Suggested change
3. [`cp`](https://kubernetes.io/docs/reference/kubectl/generated/kubectl_cp/) the outputted diagnostic filename to your local machine, replacing placeholders `NAMESPACE`, `POD_NAME`. and `FILE_NAME`.
3. Use [`cp`](https://kubernetes.io/docs/reference/kubectl/generated/kubectl_cp/) to copy the diagnostic file to your local machine, replacing the `NAMESPACE`, `POD_NAME`, and `FILE_NAME` placeholders.


### Sanitize [agent-diagnostics-sanitize]

{{agent}} attempts to automatically redact credentials and API keys when creating [its diagnostic files](/reference/fleet/agent-command-reference.md#elastic-agent-diagnostics-command). Review the contents of the archive before sharing to ensure that all forms of organizationally-private information is censored as needed. For example, ensure:
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
{{agent}} attempts to automatically redact credentials and API keys when creating [its diagnostic files](/reference/fleet/agent-command-reference.md#elastic-agent-diagnostics-command). Review the contents of the archive before sharing to ensure that all forms of organizationally-private information is censored as needed. For example, ensure:
{{agent}} attempts to automatically redact credentials and API keys when creating [its diagnostic files](/reference/fleet/agent-command-reference.md#elastic-agent-diagnostics-command). Review the contents of the archive before sharing it to ensure that all forms of organizational private information is censored as needed. For example, ensure:


{{agent}} attempts to automatically redact credentials and API keys when creating [its diagnostic files](/reference/fleet/agent-command-reference.md#elastic-agent-diagnostics-command). Review the contents of the archive before sharing to ensure that all forms of organizationally-private information is censored as needed. For example, ensure:

* There are no credentials in plain text in [its `*.yaml` diagnostic files](/reference/fleet/agent-command-reference.md#elastic-agent-diagnostics-command).
Copy link
Contributor

@vishaangelova vishaangelova Feb 27, 2026

Choose a reason for hiding this comment

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

Suggested change
* There are no credentials in plain text in [its `*.yaml` diagnostic files](/reference/fleet/agent-command-reference.md#elastic-agent-diagnostics-command).
* There are no credentials in plain text in the [`*.yaml` diagnostic files](/reference/fleet/agent-command-reference.md#elastic-agent-diagnostics-command).


* There are no credentials in plain text in [its `*.yaml` diagnostic files](/reference/fleet/agent-command-reference.md#elastic-agent-diagnostics-command).

* The raw form of event's failing to output can show under `*.ndjson`. By default only `warn` log. When the `debug` logging level is enabled, all events are logged. If you want to omit the raw events from the diagnostic, add the flag `--exclude-events`.
Copy link
Contributor

@vishaangelova vishaangelova Feb 27, 2026

Choose a reason for hiding this comment

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

The first sentence was not very clear, so I’m making a guess here. Please correct me if I’m wrong.

Suggested change
* The raw form of event's failing to output can show under `*.ndjson`. By default only `warn` log. When the `debug` logging level is enabled, all events are logged. If you want to omit the raw events from the diagnostic, add the flag `--exclude-events`.
* The raw form of events failing to output is shown in `*.ndjson`. By default, only `warn` logs are registered. To log all events, enable the `debug` logging level. If you want to omit the raw events from the diagnostics, add the flag `--exclude-events`.

@vishaangelova vishaangelova requested review from a team as code owners February 27, 2026 14:08
@github-actions
Copy link
Contributor

github-actions bot commented Feb 27, 2026

@vishaangelova
Copy link
Contributor

Hey @stefnestor, I renamed the diagnostic.md file to diagnostics.md file and fixed the remaining references in 6085079. This resolved the build issues. I also left some suggestions for improvements to the content.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants