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

[Fleet] enabling diagnostics feature flag and changed query for files to use upload_id #149575

Merged
merged 7 commits into from
Jan 27, 2023

Conversation

juliaElastic
Copy link
Contributor

@juliaElastic juliaElastic commented Jan 26, 2023

Summary

Closes #141074

Enabled feature flag and tweaked implementation to find file by upload_id rather than doc id.

How to test:

  • Start local kibana, start Fleet Server, enroll Elastic Agent from local (pull these changes )
  • Click on Request Diagnostics action on the Agent
  • The diagnostics file should appear on Agent Details / Diagnostics tab.
  • The action should be completed on Agent activity

image

image

The file metadata and binary can be queried from these indices:

GET .fleet-files-agent/_search

GET .fleet-file-data-agent/_search

Tweaked the implementation so that the pending actions are showing up as soon as the .fleet-actions record is created (it can take several minutes until the action result is ready)
Plus added a tooltip for error status

image

Checklist

@juliaElastic juliaElastic added release_note:feature Makes this part of the condensed release notes v8.7.0 labels Jan 26, 2023
@juliaElastic juliaElastic requested a review from a team as a code owner January 26, 2023 09:47
@juliaElastic juliaElastic self-assigned this Jan 26, 2023
@botelastic botelastic bot added the Team:Fleet Team label for Observability Data Collection Fleet team label Jan 26, 2023
@elasticmachine
Copy link
Contributor

Pinging @elastic/fleet (Team:Fleet)

Copy link
Member

@kpollich kpollich left a comment

Choose a reason for hiding this comment

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

Code changes LGTM - did not test locally. Will do E2E tests when everything lands for diagnostics 🚀

@michel-laterman
Copy link

I changed the diagnostics (agent) PR to upload file_id in the ack data

@juliaElastic
Copy link
Contributor Author

I changed the diagnostics (agent) PR to upload file_id in the ack data

As discussed we decided to change it back to upload_id so that it is consistent in Agent and Fleet Server.

@kibana-ci
Copy link
Collaborator

💚 Build Succeeded

Metrics [docs]

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
fleet 922.7KB 922.7KB +90.0B

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

cc @juliaElastic

@juliaElastic juliaElastic merged commit 2d67837 into elastic:main Jan 27, 2023
@kibanamachine kibanamachine added the backport:skip This commit does not require backporting label Jan 27, 2023
kqualters-elastic pushed a commit to kqualters-elastic/kibana that referenced this pull request Feb 6, 2023
… to use upload_id (elastic#149575)

## Summary

Closes elastic#141074

Enabled feature flag and tweaked implementation to find file by
`upload_id` rather than doc id.

How to test:
- Start local kibana, start Fleet Server, enroll Elastic Agent from
local (pull [these
changes](elastic/elastic-agent#1703) )
- Click on Request Diagnostics action on the Agent
- The diagnostics file should appear on Agent Details / Diagnostics tab.
- The action should be completed on Agent activity

<img width="1585" alt="image"
src="https://user-images.githubusercontent.com/90178898/214805187-2b1abe34-ba7e-4612-9fad-7ef1f5942f47.png">
<img width="745" alt="image"
src="https://user-images.githubusercontent.com/90178898/214805997-20fdaa01-e4c5-461c-b395-1b1e43117f8a.png">

The file metadata and binary can be queried from these indices:

```
GET .fleet-files-agent/_search

GET .fleet-file-data-agent/_search
```

Tweaked the implementation so that the pending actions are showing up as
soon as the `.fleet-actions` record is created (it can take several
minutes until the action result is ready)
Plus added a tooltip for error status

<img width="948" alt="image"
src="https://user-images.githubusercontent.com/90178898/214841337-eacbb1fc-4934-4d8b-9d52-8db4502d2493.png">



### Checklist

- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:skip This commit does not require backporting release_note:feature Makes this part of the condensed release notes Team:Fleet Team label for Observability Data Collection Fleet team v8.7.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Fleet] Add workflow for requesting and downloading agent diagnostics from Fleet UI
6 participants