fleet/articles/how-to-install-osquery-and-enroll-macos-devices-into-fleet.md
Mike Thomas a60d2afd9f
docs-tutorials-and-guides-update (#23377)
Closes https://github.com/fleetdm/fleet/issues/22951

- Updated the guides listed on
https://fleetdm.com/docs/get-started/tutorials-and-guides to only
include the most essential onboarding guides. Guides are listed in the
following order:
    - Deploying Fleet
    - Organizational units
    - Controls
    - Installing software
    - Admin
- Added archive notices to the three "How to install osquery..."
articles
- Added "Further reading" links to the bottom of the Queries guide and
Policies guide to point to related advanced topics
- Renamed "Managing labels in Fleet" to "Labels" for parallelism with
our other guides (left the URL as is, no redirect necessary)
- Renamed "What are Fleet policies" to "Policies" for parallelism with
our other guides (left the URL as is, no redirect necessary)
2024-10-30 11:34:44 -05:00

3.6 KiB
Raw Permalink Blame History

How to install osquery and enroll macOS devices into Fleet

Archived While still usable, this guide has not been updated recently. See the Enroll hosts guide.

Here, we will cover enrolling macOS devices to an existing Fleet server. If you dont have a Fleet server configured already, check out Deploying Fleet on Render. If youre still getting to know Fleet and would like to skip the server setup process and try Fleet, you can run Fleet in a preview environment.

Prerequisites

  1. Access to an existing Fleet server
  2. The fleetctl command line tool

If you dont already have it, fleetctl can be installed via npm by running the following command:

npm i -g fleetctl

After the above command has run successfully, you can confirm that you now have the fleetctl CLI tool by running:

fleetctl --version

This should return an output similar to the example below:

fleetctl.exe - version 4.8.0
  branch:  HEAD
  revision:  09654d77eedbf9ed181bc8188a3d2be0324b29a5
  build date:  2021-12-31
  build user:  runner
  go version:  go1.17.2

You can generate an osquery installer using fleetctl for macOS on Windows and even Linux distributions, but for this article we are assuming generating on a macOS device. To generate an osquery installer for a different OS, check out the guides for Windows and Linux.

Installing osquery

Head to the Fleet UI Hosts page and click the "Add hosts" button. From the pop-up, choose the type of installer you want to generate. Make sure you are on the "macOS" tab and click on the clipboard icon to copy the installation command for macOS.

Generate installer Generate installer for osquery on macOS

Head over to your command line, paste the copied command, and then hit enter.

Once fleetctl has finished creating your osquery installer, it will produce an installer file called fleet-osquery.pkg in your current directory, and display instructions on how to proceed.

Running the installer

Double-click the installer and follow the guided steps to successfully install osquery on your macOS device and enrol it onFleet!

Alternatively, you can run open fleet-osquery.pkg from your command line to launch the installer.

Deploying at scale?

Fleet makes it easy to install osquery and enrol macOS devices with fleetctl. If youre managing an enterprise environment with multiple hosts, you likely have an enterprise deployment tool like Munki, [Jamf Pro] (https://www.jamf.com/products/jamf-pro/), Chef, Ansible, or Puppet to deliver software to your hosts. You can distribute your osquery installer and add all your devices to Fleet using your software management tool of choice.