Skip to content

Collect logs from MacOS' Unified Logging system #23993

@Japillow

Description

@Japillow

A note for the community

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

MacOS Unified Logging system

This Issue is here to track community request for the implementation of Unified Logging system streaming in Vector for MacOS.

In 2016, Apple moved away from file-based logging to it's own database-based Unified Logging system1

Use Cases

Unified Logging system logs are historically extensively used in an ad hoc manner by Incident Responders, as shown by:

However, querying and streaming the Unified Logging system has also number of non-IR use cases, as outlined in mac4n6's numerous blog posts, in Jamf examples, but also more generally when Mac apps or scripts (Python, shell) use the official Apple Logging APIs.

Attempted Solutions

Based on my research the following systems implement collection of Apple Unified Logs on MacOS

  • Commercial systems
  • Open-source:
    • Wazuh Agent implements sending to Wazuh server (source), but this requires setting up a Wazuh server.
    • Afaik, no open source project implements macOS Unified Logs streaming to generic outputs (syslog, webhooks, or else). This is where Vector's integration of this feature, as an OSS observability tool that is SIEM-independent, could be very valuable.

For now, apart from Jamf Protect, Splunk Universal Forwarder, Elastic Agent and Wazuh agent, streaming logs from the Unified logging system on MacOS requires:

osquery also allows querying the Unified Logs (which can be setup at regular intervals), but that is nowhere near as efficient as realtime log streaming.

Proposal

Notes on implementation:

  • As Apple Unified log is verbose, implementation requires adding support for Predicate Filter

References

Version

v0.50.0

Footnotes

  1. The Unified Logging system is sometimes unofficially abbreviated as ULS or AUL. However, contrary to the previous Apple System Logger (ASL), Apple never uses the abreviations ULS, AUL, or the terms Unified Logs or Unified logging.

Metadata

Metadata

Assignees

No one assigned

    Labels

    platform: macosAnything `macos` platform relatedtype: featureA value-adding code addition that introduce new functionality.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions