Search code examples
macosdiskspaceosquery

Osquery takes too much space


I got some osquery on mac os and there is a file /private/var/log/osquery/osquery-output.log. This file takes almost 16 Gb of disk space. What is it? Can i delete it safely?


Solution

  • By itself, osquery does very little. It can be configured to run a variety of queries to examine system state. Depending on configuration, these results might be stored locally or sent to a log aggregator. The configuration can either be from a local file, or from a remote server.

    It sounds like you have an osquery install that is configured to log to local disk, but nothing is collecting those results.

    osquery itself does not do anything with that file. So you can certainly truncate it. (Just deleting it will likely leave an unlinked file). But that file implies a misconfigured setup.

    Should it be logging to local disk? What consumes those logs? Etc.