Open device management
Find a file
Lucas Manuel Rodriguez feb4e65be6
Optimize macOS CIS query 5.1.5 (#12506)
#10292

The query was processing *every* file under `/Applications/`, which
makes it super expensive both in CPU usage and Memory footprint. This
query was the main culprit of triggering worker process kills by the
watchdog.

On some runs it triggered CPU usage alerts:
```
7716:W0623 15:38:05.402959 221732864 watcher.cpp:415] osqueryd worker (72976) stopping:
Maximum sustainable CPU utilization limit 1200ms exceeded for 12 seconds
```
And on other runs it triggered memory usage alerts:
```
4431 W0626 07:28:50.868021 147312640 watcher.cpp:424] osqueryd worker (21453) stopping:
Memory limits exceeded: 214020096 bytes (limit is 200MB)
```

For the above logs I used a custom osqueryd branch to be able to print
more information: https://github.com/osquery/osquery/pull/8070

The metrics for the old query were CPU usage: ~4521 ms
```
435:level=warn ts=2023-06-26T09:58:29.665712Z query=fleet_policy_query_1233 queryTime=4521 memory=12226560 msg="distributed query performance is excessive" hostID=308 platform=darwin
```
With the new query, CPU usage: ~210 ms.
```
23893:level=debug ts=2023-06-26T18:06:08.242456Z query=fleet_policy_query_1233 queryTime=210 msg=stats memory=0 hostID=308 platform=darwin
```
Basically a ~20x improvement.

- [X] Changes file added for user-visible changes in `changes/` or
`orbit/changes/`.
See [Changes
files](https://fleetdm.com/docs/contributing/committing-changes#changes-files)
for more information.
- ~[ ] Documented any API changes (docs/Using-Fleet/REST-API.md or
docs/Contributing/API-for-contributors.md)~
- ~[ ] Documented any permissions changes~
- ~[ ] Input data is properly validated, `SELECT *` is avoided, SQL
injection is prevented (using placeholders for values in statements)~
- ~[ ] Added support on fleet's osquery simulator `cmd/osquery-perf` for
new osquery data ingestion features.~
- ~[ ] Added/updated tests~
- [X] Manual QA for all new/changed functionality
  - For Orbit and Fleet Desktop changes:
- ~[ ] Manual QA must be performed in the three main OSs, macOS, Windows
and Linux.~
- ~[ ] Auto-update manual QA, from released version of component to new
version (see [tools/tuf/test](../tools/tuf/test/README.md)).~
2023-06-27 11:06:26 -03:00
.github Bump github/codeql-action from 2.2.4 to 2.20.1 (#12437) 2023-06-23 12:40:54 -07:00
.storybook add figma to storybook and a couple new stories (#11521) 2023-05-09 16:53:43 +01:00
.vscode generate js coverage report in CI (#12029) 2023-06-01 17:46:25 +01:00
articles Update verbiage (#12331) 2023-06-15 13:57:54 +09:00
assets Fleet UI: Update icons (6 icons only) (#11907) 2023-06-02 09:48:17 -04:00
changes Optimize macOS CIS query 5.1.5 (#12506) 2023-06-27 11:06:26 -03:00
charts/fleet Prepare v4.33.0 (#12302) 2023-06-12 20:35:28 -05:00
cmd Pushing initial support for MS-MDE2 Discovery message (#12387) 2023-06-22 17:31:17 -03:00
cypress UI: Remove unused 'Issuer URI' field from UI (#10766) 2023-03-27 10:31:30 -07:00
docs Pushing initial support for MS-MDE2 Discovery message (#12387) 2023-06-22 17:31:17 -03:00
ee Optimize macOS CIS query 5.1.5 (#12506) 2023-06-27 11:06:26 -03:00
frontend Add disk_info table to chromeos (#12344) 2023-06-26 15:40:37 -04:00
handbook Add engineering accounts section to handbook (#12516) 2023-06-26 14:40:53 -06:00
infrastructure Bump github.com/gin-gonic/gin from 1.8.1 to 1.9.1 in /infrastructure/sandbox/JITProvisioner/lambda (#12098) 2023-06-26 11:03:23 -04:00
mdm_profiles Apply custom setup assistants (if present) when ingesting new devices (#11563) 2023-05-09 13:00:18 -04:00
orbit Add --verbose flag to fleetd_tables (needed when osqueryd runs in verbose mode) (#12504) 2023-06-27 10:42:48 -03:00
pkg Add TestMDMClient to simulate MDM clients in osquery-perf (#11672) 2023-05-12 13:50:20 -03:00
proposals Add proposal for fleetctl trigger (#8127) 2022-12-02 10:05:16 -06:00
schema Add disk_info table to chromeos (#12344) 2023-06-26 15:40:37 -04:00
scripts add on-call script (#4781) 2022-03-28 10:00:33 -06:00
server Trigger Windows MDM host enrollment on device when notified that it is enabled (#12426) 2023-06-26 12:13:17 -04:00
terraform fleet tf module config (#12304) 2023-06-22 21:06:59 -04:00
test/upgrade Bump github.com/docker/docker from 20.10.23+incompatible to 23.0.4+incompatible (#11259) 2023-04-21 14:53:55 -07:00
tools Trigger Windows MDM host enrollment on device when notified that it is enabled (#12426) 2023-06-26 12:13:17 -04:00
website Added new user under humans for receive-from-github webhook (#12468) 2023-06-26 20:43:53 -05:00
.dockerignore Added support to read jwt and mysql password from a file (#141) 2021-01-04 07:58:43 -08:00
.eslintrc.js update storybook to work with webpack 5 and move babelrc into its own file out of package.json (#11499) 2023-05-03 17:50:17 +01:00
.gitattributes Windows friendly changes after walking through getting started guide (#1441) 2021-07-21 20:49:44 -04:00
.gitignore Add --verbose flag to fleetd_tables (needed when osqueryd runs in verbose mode) (#12504) 2023-06-27 10:42:48 -03:00
.gitpod.yml Add gitpod yml (#2915) 2021-11-19 10:03:56 -03:00
.golangci.yml Enable errcheck linter for golangci-lint (#8899) 2022-12-05 16:50:49 -06:00
.goreleaser-snapshot.yml use image containing installer deps for fleetdm/fleetctl (#7040) 2022-08-24 12:10:16 +00:00
.goreleaser.yml use image containing installer deps for fleetdm/fleetctl (#7040) 2022-08-24 12:10:16 +00:00
.npmignore Move fleetdm.com into main Fleet repo (#83) 2020-12-02 14:48:03 -06:00
.prettierignore move policies to own constants and allow escaping on DEFAULT_POLICIES (#8121) 2022-10-07 14:31:57 +01:00
.prettierrc.json add prettier and have it format all fleet application code (#625) 2021-04-12 14:32:25 +01:00
.trivyignore 8241 trivy ignore file action (#8345) 2022-10-31 10:50:29 -04:00
babel.config.json Fleet Frontend: Create integration tests QuerySidePanel.tests.tsx (#12179) 2023-06-07 12:01:59 -04:00
CHANGELOG.md Prepare v4.33.0 (#12302) 2023-06-12 20:35:28 -05:00
CODE_OF_CONDUCT.md Remove @fleetdm.com emails from fleetdm/fleet repo (#882) 2021-05-27 17:19:14 -04:00
codecov.yml generate js coverage report in CI (#12029) 2023-06-01 17:46:25 +01:00
CODEOWNERS add a puppet module to manage MDM features (#12032) 2023-05-31 17:26:12 -03:00
docker-compose-redis-cluster.yml Move Redis cluster docker yml to separate file (#11162) 2023-04-12 15:14:28 -04:00
docker-compose.yml gate DEP enrollment behind SSO when configured (#11309) 2023-04-27 09:43:20 -03:00
Dockerfile Bump alpine from 3.17.3 to 3.18.2 (#12367) 2023-06-23 12:33:29 -07:00
Dockerfile-desktop-linux Bump golang from 1.20.3-alpine to 1.20.5-alpine (#12206) 2023-06-23 12:31:37 -07:00
Dockerfile.osquery-perf Bump golang from 1.20.3-alpine to 1.20.5-alpine (#12206) 2023-06-23 12:31:37 -07:00
go.mod Bump github.com/aws/aws-sdk-go from 1.43.16 to 1.44.288 (#12466) 2023-06-23 12:43:29 -07:00
go.sum Bump github.com/aws/aws-sdk-go from 1.43.16 to 1.44.288 (#12466) 2023-06-23 12:43:29 -07:00
LICENSE Update LICENSE (#10) 2020-11-04 19:57:51 -06:00
Makefile enhance the build process for the fleetd-tables (#11968) 2023-05-26 17:25:32 -03:00
manifest.yml.cloudgov.example cloud.gov deployment (#7611) 2022-09-07 13:30:06 -05:00
package.json ChromeOS privacy_preferences table (#12441) 2023-06-23 14:52:16 -07:00
postcss.config.js Upgrade Bourbon to 5.1.0 and fix deprecation warnings (#1973) 2019-01-03 12:46:55 -08:00
README.md keep it simple (#11955) 2023-05-24 23:58:01 -05:00
SECURITY.md Editing security policy (#5333) 2022-05-05 20:29:06 -05:00
tools.go Update notarization to use notarytool (#7962) 2022-09-27 08:25:42 -07:00
tsconfig.json Feat/update query doc sidepanel (#8214) 2022-10-14 17:45:57 +01:00
webpack.config.js Upgrade webpack to v5 (#11173) 2023-04-14 07:58:54 -07:00
yarn.lock ChromeOS privacy_preferences table (#12441) 2023-06-23 14:52:16 -07:00

Fleet logo, landscape, dark text, transparent background

News   ·   Report a bug   ·   Handbook   ·   Why open source?   ·   Art

Open-source platform for IT and security teams with thousands of computers. Designed for APIs, GitOps, webhooks, YAML, and humans.

Wallpaper featuring a futuristic cloud city with the Fleet logo

What's it for?

Organizations like Fastly and Gusto use Fleet for vulnerability reporting, detection engineering, device management (MDM), device health monitoring, posture-based access control, managing unused software licenses, and more.

Explore data

To see what kind of data you can use Fleet to gather, check out the table reference documentation.

Out-of-the-box policies

Fleet includes out-of-the box support for all CIS benchmarks for macOS and Windows, as well as many simpler queries.

Take as much or as little as you need for your organization.

Supported platforms

Here are the platforms Fleet currently supports:

  • Linux (all distros)
  • macOS
  • Windows
  • Chromebooks
  • Amazon Web Services (AWS)
  • Google Cloud (GCP)
  • Azure (Microsoft cloud)
  • Data centers
  • Containers (kube, etc)
  • Linux-based IoT devices

Lighter than air

Fleet is lightweight and modular. You can use it for security without using it for MDM, and vice versa. You can turn off features you are not using.

Openness

Fleet is dedicated to flexibility, accessibility, and clarity. We think everyone can contribute and that tools should be as easy as possible for everyone to understand.

Good neighbors

Fleet has no ambition to replace all of your other tools. (Though it might replace some, if you want it to.) Ready-to-use, enterprise-friendly integrations exist for Snowflake, Splunk, GitHub Actions, Vanta, Elastic Jira, Zendesk, and more.

Fleet plays well with Munki, Chef, Puppet, and Ansible, as well as with security tools like Crowdstrike and SentinelOne. For example, you can use the free version of Fleet to quickly report on what hosts are actually running your EDR agent.

While most folks prefer to use one or the other, Fleet can also coexist peacefully with Rapid7 and other agent-based vulnerability scanners. This can be useful during migrations.

Free as in free

The free version of Fleet will always be free. Fleet is independently backed and actively maintained with the help of many amazing contributors.

Longevity

The company behind Fleet is founded (and majority-owned) by true believers in open source. The company's business model is influenced by GitLab (NYSE: GTLB), with great investors, happy customers, and the capacity to become profitable at any time.

In keeping with Fleet's value of openness, Fleet Device Management's company handbook is public and open source. You can read about the history of Fleet and osquery and our commitment to improving the product.

Is it any good?

Fleet is used in production by IT and security teams with thousands of laptops and servers. Many deployments support tens of thousands of hosts, and a few large organizations manage deployments as large as 400,000+ hosts.

Chat

Please join us in MacAdmins Slack or in osquery Slack.

The Fleet community is full of kind and helpful people. Whether or not you are a paying customer, if you need help, just ask.

Contributing   Run Tests   Go Report Card   CII Best Practices   Twitter Follow  

The landscape of cybersecurity and IT is too complex. Let's open it up.

Contributions are welcome, whether you answer questions on Slack / GitHub / StackOverflow / LinkedIn / Twitter, improve the documentation or website, write a tutorial, give a talk at a conference or local meetup, give an interview on a podcast, troubleshoot reported issues, or submit a patch. The Fleet code of conduct is on GitHub.

What's next?

To see what Fleet can do, head over to fleetdm.com and try it out for yourself, grab time with one of the maintainers to discuss, or visit the docs and roll it out to your organization.

Production deployment

Fleet is simple enough to spin up for yourself. Or you can have us host it for you. Premium features are available either way.

Documentation

Complete documentation for Fleet can be found at https://fleetdm.com/docs.

License

The free version of Fleet is available under the MIT license. The commercial license is also designed to allow contributions to paid features for users whose employment agreements allow them to contribute to open source projects. (See LICENSE.md for details.)

Fleet is built on osquery, nanoMDM, and Nudge.