Custom logger plugin is written using osquery-go. When the osquery daemon is auto-loaded with this extension, then the logs are received by the custom logger plugin.
But if the osqueryd is running as a daemon and custom logger plugin is run independently, then it is not receiving the logs from osqueryd.
- Implemented a custom logger plugin using osquery-go. https://github.com/osquery/osquery-go#creating-logger-and-config-plugins. After receiving the log, it just prints the event.
- Build this logger with .ext and changed the owner to 'root' & gave appropriate permissions
- Configured osqueryd to capture file-events
- Started the osquery daemon.
- Ran the .ext --socket /var/osquery/osquery.em --timeout 3
- In the /var/log/osquery/osqueryd.INFO can see that registered to osquery daemon.
- When any file activity is done, can see the FILE_EVENTS in /var/log/osquery/osqueryd.results.log but same result is not seen in the custom logger plugin which is also registered to osquery daemon.
If the osquery daemon is run using auto load extension, then the extension receives the FILE_EVENTS log.
When osqueryd and extension are running as separate process, then why isn't the osqueryd not redirecting the logs to extension?
Environment: MacOS Monterey. Have added both osquery and the custom logger extension in Security Preferences -> Full Disk Access