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 configuration option to customize query report cap #19600

Closed
2 of 7 tasks
rachaelshaw opened this issue Jun 7, 2024 · 7 comments
Closed
2 of 7 tasks

Add configuration option to customize query report cap #19600

rachaelshaw opened this issue Jun 7, 2024 · 7 comments
Assignees
Labels
~backend Backend-related issue. customer-pingali customer-rialto customer-ufa #g-endpoint-ops Endpoint ops product group P2 Prioritize as urgent :product Product Design department (shows up on 🦢 Drafting board) story A user story defining an entire feature
Milestone

Comments

@rachaelshaw
Copy link
Member

rachaelshaw commented Jun 7, 2024

Goal

User story
As a Fleet admin,
I want to customize the result cap for query reports
so that I can see results for all of my hosts.

Currently, for queries that run on >1000 hosts, query reports in the Fleet UI serve as previews of the data returned, rather than true reports of the latest results. (Those users need to send data to a log destination in order to build a complete up-to-date report, since reports in Fleet are clipped at 1,000.)

Context

Changes

Product

  • Config changes: Figma
  • REST API changes:
    • Add server_settings.query_report_cap to Fleet configuration API
    • Add report_clipped to GET /api/latest/fleet/queries/:query_id/report response
  • Outdated documentation changes: Update API docs to reflect REST API changes. Update GitOps reference PR to call out that you should enable reports for one query at time and monitor your infrastructure

Engineering

  • Database schema migrations: TODO
  • Load testing: TODO

ℹ️  Please read this issue carefully and understand it. Pay special attention to UI wireframes, especially "dev notes".

QA

Risk assessment

  • Requires load testing: TODO
  • Risk level: Low / High TODO
  • Risk description: TODO

Manual testing steps

  1. Step 1
  2. Step 2
  3. Step 3

Testing notes

Confirmation

  1. Engineer (@____): Added comment to user story confirming successful completion of QA.
  2. QA (@____): Added comment to user story confirming successful completion of QA.
@rachaelshaw rachaelshaw added story A user story defining an entire feature P2 Prioritize as urgent #g-endpoint-ops Endpoint ops product group :release Ready to write code. Scheduled in a release. See "Making changes" in handbook. ~backend Backend-related issue. labels Jun 7, 2024
@rachaelshaw rachaelshaw added this to the 4.52.0-tentative milestone Jun 7, 2024
@lucasmrod
Copy link
Member

@rachaelshaw It seems we had the 1000 hardcoded on the UI too.

export const QUERY_REPORT_RESULTS_LIMIT = 1000;

const isClipped =
(queryReport?.results?.length ?? 0) >= QUERY_REPORT_RESULTS_LIMIT;

So I added a report_clipped: boolean response field to the GET /api/latest/fleet/queries/$query_id/report API. (Same field we already have in GET /api/latest/fleet/hosts/$host_id/queries/$query_id.)

Let me know if this makes sense.

@rachaelshaw
Copy link
Member Author

@lucasmrod sounds good! Updated the API changes in the description

lucasmrod added a commit that referenced this issue Jun 14, 2024
#19600

- [X] Changes file added for user-visible changes in `changes/`,
`orbit/changes/` or `ee/fleetd-chrome/changes`.
See [Changes
files](https://fleetdm.com/docs/contributing/committing-changes#changes-files)
for more information.
- [X] Added/updated tests
- [X] Manual QA for all new/changed functionality
@lukeheath lukeheath added :product Product Design department (shows up on 🦢 Drafting board) and removed :release Ready to write code. Scheduled in a release. See "Making changes" in handbook. labels Jun 26, 2024
@noahtalerman
Copy link
Member

noahtalerman commented Jun 27, 2024

Hey @rachaelshaw, tracking the TODO from our discussion during product design review in this issue so we see it during confirm and celebrate:

TODO Rachael: Update GitOps reference docs to call out that you should enable reports for one query at time and monitor your infrastructure

UPDATE: Add PR for API changes.

@marko-lisica
Copy link
Member

Hey @zayhanlon & @Patagonia121 this story has shipped but before we notify customers we want to make sure docs PR is merged. See the comment above for TODO docs.

@rachaelshaw
Copy link
Member Author

Docs PR here: #20414

noahtalerman pushed a commit that referenced this issue Jul 15, 2024
- Add documentation for the `query_report_cap` config option. For #19600
@noahtalerman
Copy link
Member

noahtalerman commented Jul 19, 2024

Hey @zayhanlon & @Patagonia121 this story has shipped but before we notify customers we want to make sure docs PR is merged.

Hey @zayhanlon and @Patagonia121, the API reference docs are shipped!

Customers can now increase the max number of query report results (per query) Fleet stores.

From the PATCH /config API endpoint reference:

Screenshot 2024-07-19 at 12 27 09 PM

From the GitOps reference:
Screenshot 2024-07-19 at 12 30 05 PM

@fleet-release
Copy link
Contributor

Customize cap high,
More results in your eye.
Fleet expands the sky.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
~backend Backend-related issue. customer-pingali customer-rialto customer-ufa #g-endpoint-ops Endpoint ops product group P2 Prioritize as urgent :product Product Design department (shows up on 🦢 Drafting board) story A user story defining an entire feature
Development

No branches or pull requests

7 participants