Skip to content

Monitor performance for queries that don't have automations enabled #467

Description

@mikermcneil
User story
As a Fleet user,
I want to see the performance impact any of my queries (not just those that have been automated),
so that I don't see the word "Undetermined" over and over again in the UI where I'm expecting query performance to exist, and so that i don't have to be using Splunk etc. to be able to see the promised query performance feature.

✅ Monitor performance for queries

Why do I want it? Because I'm worried about end user experience on my hosts and I want to know whether it's safe to run given queries across wider sections of my Fleet. Also, if there are performance isues reported by end users, this way I can find and correct queries that might be causing those issues.

  • In the UI, where relevant, show the live query performance impact.
  • UPDATE: Bring back adding the performance impact in the activity feed. Just show this for saved queries.

Related

Changes

This issue's estimation includes completing:

  • UI changes: Figma
    • Update activities
      • Update copy to conditionally include performance impact
      • Conditionally add performance impact + tooltip to show query modal
    • Queries page
      • Update tooltip for "Performance impact" column
      • Update tooltip for "Undetermined" cells in Performance impact column
    • Host details > Queries tab: Update tooltip for "Undetermined" cells in Performance impact column
  • REST API changes: Draft PR
  • Database schema migrations: TODO

QA Test Plan

  • Load testing required -- save a query and run it as a live query during load test. (Load test agents now send back stats.)

Manual Steps

  • Have an existing scheduled query that shows up in Host Details Schedule with stats. Restart the host. Refresh host details after it comes back up. The stats should still be there -- they should not have been cleared.
  • Create a scheduled query with automations. Run it as a live query. The Queries page should now have stats for that query. The Host Details Schedule page should now have stats for that query (for host(s) that ran the query). The Query edit page should now have stats for that query (see Figma). The activity feed should be updated with stats after query finishes running.
    • Repeat this step running live query with fleetctl and running live query with REST API.
  • Delete 1 query with stats.
  • Delete multiple queries with stats.

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions