About
Search osquery scheduled query results and osqueryd status logs in Sazabi. osqueryd keeps writing to local files with its defaultfilesystem logger, and an OpenTelemetry Collector or Fluent Bit on each host parses those files and forwards them to Sazabi over OTLP/HTTPS.
Sazabi receives two streams:
- Query results: one record per scheduled query row from
osqueryd.results.logandosqueryd.snapshots.log, covering differential results (addedandremoved) and snapshot results. The full osquery result line (name,hostIdentifier,columns,decorations,counter,epoch,unixTime) is the log body, timestamped fromunixTime. - Status logs: osqueryd’s own messages from
osqueryd.INFO, with severity (INFO,WARN,ERROR,FATAL), source location, and message parsed out of glog’s text format.
This setup covers Linux and macOS. Windows hosts write to different paths and the Windows Event Log, which it doesn’t read.
Prerequisites
- osqueryd on Linux or macOS with the
filesystemlogger plugin (the default) writing to/var/log/osquery - An OpenTelemetry Collector contrib distribution (
otelcol-contrib), or Fluent Bit v3.0 or later, on each osquery host - Read access to
/var/log/osqueryfor the shipper. osqueryd writes its logs readable only by root, so run the shipper as root or grant its group read access. - Your Sazabi intake URL, shown above. Open the log source and copy the Intake URL from its setup screen (the public key is embedded in the URL).
Set up in the dashboard
1
Set osquery logging flags
Add these lines to your osquery flagfile (usually/etc/osquery/osquery.flags):osquery.flags
--host_identifier=uuid gives each host a stable ID that becomes host.id. --logger_snapshot_event_type=true writes one line per snapshot row instead of one large array. If --logger_plugin already lists other plugins, keep them and add filesystem with a comma.To cap disk use, also add --logger_rotate=true, --logger_rotate_size=26214400, and --logger_rotate_max_files=25. Both shippers keep reading across rotations.2
Add the shipper configuration
Use the OpenTelemetry Collector config for per-query and per-host attributes. Replace<your intake hostname> with the hostname portion of your intake URL (shown above), without the https:// scheme or path.- OpenTelemetry Collector
- Fluent Bit
Create
/var/lib/otelcol/file_storage so read offsets survive restarts, then add:otelcol-contrib config.yaml
3
Restart osqueryd and the shipper
Restart osqueryd so it picks up the new flags, then restart the Collector or Fluent Bit. Check the shipper’s logs for permission, TLS, or DNS errors during startup.4
Hand off the change
If the flagfile and shipper config are version-controlled or deployed by config management, commit them on a new branch, push it, and open a pull request. Otherwise apply them directly to each host. Keep the intake URL in a secret store or environment variable where your tooling supports it.Set up with the CLI
You can also register the osquery log source with the Sazabi CLI (installed and authenticated — see CLI reference). Registering the source mints the same intake URL the dashboard shows above (the public key is embedded in its hostname):sazabi log-sources setup-instructions osquery to print the setup steps with your intake URL filled in, or sazabi log-sources get <log-source-id> to reprint the endpoint.
Verify
osqueryd logsExecuting scheduled query ... status messages as soon as it runs its schedule, so status logs appear within a minute of restarting. Query results appear after each scheduled query’s interval elapses. Open the Intake page in the Sazabi dashboard and confirm records from the osquery source appear.
Troubleshooting
No records at all — Confirm the shipper can read/var/log/osquery/osqueryd.results.log; a permission error is the most common cause. Then check the shipper’s logs for TLS, DNS, or 401/403 errors and confirm the hostname matches your intake URL exactly.
Status logs arrive but no query results — The schedule may not have run yet; check each query’s interval in osquery.conf. Confirm --logger_plugin includes filesystem and --logger_path matches the paths in the shipper config.
Results have no osquery.query.name attribute — The Fluent Bit config doesn’t set attributes. Search the body’s name field instead, or switch to the Collector config.
Duplicate results after a restart — The shipper lost its read offsets. Confirm /var/lib/otelcol/file_storage or /var/lib/fluent-bit exists and persists across restarts.
Numbers compare as strings — osquery writes columns values as strings unless osqueryd runs with --logger_numerics=true.
Further reading
Intake
See per-source ingestion volume and health.
OpenTelemetry Collector
Send other host and application logs through the same Collector.
Log sources
Browse the full log source catalog.