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

Add documentation for the elastic-agent diagnostics pprof commands #1284

Merged
merged 6 commits into from
Dec 14, 2021

Conversation

michel-laterman
Copy link
Contributor

Add command reference docs for gathering pprof data with the
elastic-agent diagnostics collect and diagnostics pprof commands. Add
secrtion to troubleshooting guide for gathering pprof data into archive.

Add command reference docs for gathering pprof data with the
elastic-agent diagnostics collect and diagnostics pprof commands. Add
secrtion to troubleshooting guide for gathering pprof data into archive.
@michel-laterman michel-laterman added docs Improvements or additions to documentation Team:Elastic-Agent-Control-Plane Label for the Agent Control Plane team labels Nov 23, 2021
@michel-laterman michel-laterman requested a review from a team as a code owner November 23, 2021 18:36
@apmmachine
Copy link
Contributor

apmmachine commented Nov 23, 2021

A documentation preview will be available soon:

Copy link
Contributor

@dedemorton dedemorton left a comment

Choose a reason for hiding this comment

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

A few comment. Otherwise, looks great! Thanks for adding this.

docs/en/ingest-management/commands.asciidoc Outdated Show resolved Hide resolved
docs/en/ingest-management/commands.asciidoc Outdated Show resolved Hide resolved
docs/en/ingest-management/commands.asciidoc Outdated Show resolved Hide resolved
docs/en/ingest-management/commands.asciidoc Outdated Show resolved Hide resolved
docs/en/ingest-management/commands.asciidoc Outdated Show resolved Hide resolved
@EricDavisX
Copy link
Contributor

@dikshachauhan-qasource pinging you in the Docs PR - we should review docs as well as test out the diagnostics as part of it on the 3 OSes, with Endpoint and OSQuery enabled as test subjects.

@michel-laterman it will collect Endpoint, yes? And logs from any other sub-process (like OSQuery) or just Beats (like Filebeat/Metricbeat)?

Is there any environment where it is known not to work, like when deployed as a Docker container?

So very cool - so glad we have docs, thanks for working it.

@michel-laterman
Copy link
Contributor Author

@EricDavisX I know it will collect all *beats. I don't think it will collect from endpoint as it logs under a different path (and i don't know if the agent is aware of endpoint's install path). I have not tested if it interacts with other processes like OSQuery

@amolnater-qasource
Copy link

amolnater-qasource commented Dec 7, 2021

Hi @EricDavisX
We have revalidated elastic-agent diagnostics pprof command on below agents:

  • Windows
  • Linux
  • MAC

We added below integrations to these agents:

  • System
  • Endpoint Security
  • OS Query

Output for Windows:
9

Output for MAC:
11
12

Output for Linux:
10

Observations on running elastic-agent diagnostics pprof:

  • Data is available for filebeat
  • Data is available for metricbeat
  • Data is available for OS-Query module.
  • Name: Endpoint Security is there for all agents but it shows error: Get "http://npipe/": open \\.\pipe\default-endpoint-security: The system cannot find the file specified..

We have also tested this with sudo elastic-agent diagnostics collect command, referred from guide:
We get the desired zip file for logs on all 3 OS's:
MAC:
elastic-agent-diagnostics-2021-12-07T08-53-43Z-00-MAC.zip

Windows:
elastic-agent-diagnostics-2021-12-07T08-07-46Z-00-Windows.zip

Linux:
elastic-agent-diagnostics-2021-12-07T08-46-44Z-00-Linux.zip

I don't think it will collect from endpoint as it logs under a different path

As also confirmed by @michel-laterman we got same output:
These zip files do contains logs for filebeat, metricbeat and os-querybeat but no logs for Endpoint Security.

Further, we will be testing docs whenever this ticket will be merged.

Please let us know if we are missing anything.
Thanks

@mergify
Copy link
Contributor

mergify bot commented Dec 9, 2021

This pull request does not have a backport label. Could you fix it @michel-laterman? 🙏
To fixup this pull request, you need to add the backport labels for the needed
branches, such as:

  • backport-/d./d is the label to automatically backport to the /d./d branch. /d is the digit
    NOTE: backport-skip has been added to this pull request.

@mergify mergify bot added the backport-skip Skip notification from the automated backport with mergify label Dec 9, 2021
Copy link
Contributor

@dedemorton dedemorton left a comment

Choose a reason for hiding this comment

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

LGTM.

@dedemorton dedemorton added the backport-7.16 Automated backport with mergify label Dec 13, 2021
@mergify mergify bot removed the backport-skip Skip notification from the automated backport with mergify label Dec 13, 2021
@dedemorton dedemorton added backport-8.0 Automated backport with mergify backport-skip Skip notification from the automated backport with mergify labels Dec 13, 2021
@mergify mergify bot removed the backport-skip Skip notification from the automated backport with mergify label Dec 13, 2021
@dedemorton
Copy link
Contributor

@michel-laterman Not sure if you need to make any more content changes, but what's here looks good to me. I've added the backport labels, but can't remember if this is valid for 7.16. Just remove that backport label if it's not. Thanks!

@michel-laterman michel-laterman removed the backport-7.16 Automated backport with mergify label Dec 14, 2021
@mergify
Copy link
Contributor

mergify bot commented Dec 14, 2021

This pull request is now in conflict. Could you fix it @michel-laterman? 🙏
To fixup this pull request, you can check out it locally. See documentation: https://help.github.com/articles/checking-out-pull-requests-locally/

git fetch upstream
git checkout -b agent-diagnostics-pprof upstream/agent-diagnostics-pprof
git merge upstream/main
git push upstream agent-diagnostics-pprof

@michel-laterman michel-laterman merged commit baea492 into elastic:main Dec 14, 2021
mergify bot pushed a commit that referenced this pull request Dec 14, 2021
…1284)

* Add documentation for the elastic-agent diagnostics pprof commands

Add command reference docs for gathering pprof data with the
elastic-agent diagnostics collect and diagnostics pprof commands. Add
secrtion to troubleshooting guide for gathering pprof data into archive.

* Apply suggestions from code review

Co-authored-by: DeDe Morton <[email protected]>

* rename monitoring.pprof to monitoring.pprof.enabled

* set example to false

Co-authored-by: DeDe Morton <[email protected]>
(cherry picked from commit baea492)
@michel-laterman michel-laterman deleted the agent-diagnostics-pprof branch December 14, 2021 20:23
michel-laterman added a commit that referenced this pull request Dec 15, 2021
…1284) (#1373)

* Add documentation for the elastic-agent diagnostics pprof commands

Add command reference docs for gathering pprof data with the
elastic-agent diagnostics collect and diagnostics pprof commands. Add
secrtion to troubleshooting guide for gathering pprof data into archive.

* Apply suggestions from code review

Co-authored-by: DeDe Morton <[email protected]>

* rename monitoring.pprof to monitoring.pprof.enabled

* set example to false

Co-authored-by: DeDe Morton <[email protected]>
(cherry picked from commit baea492)

Co-authored-by: Michel Laterman <[email protected]>
bmorelli25 pushed a commit to bmorelli25/observability-docs that referenced this pull request Apr 11, 2023
…lastic#1284)

* Add documentation for the elastic-agent diagnostics pprof commands

Add command reference docs for gathering pprof data with the
elastic-agent diagnostics collect and diagnostics pprof commands. Add
secrtion to troubleshooting guide for gathering pprof data into archive.

* Apply suggestions from code review

Co-authored-by: DeDe Morton <[email protected]>

* rename monitoring.pprof to monitoring.pprof.enabled

* set example to false

Co-authored-by: DeDe Morton <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-8.0 Automated backport with mergify docs Improvements or additions to documentation Team:Elastic-Agent-Control-Plane Label for the Agent Control Plane team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants