
By default a configuration is fetched only at osquery load. All files within that optional directory will be read and merged in lexical order.Īn optional configuration refresh interval in seconds. If you want to read from multiple configuration paths, create a directory: /etc/osquery//. On macOS the default path is /var/osquery/nf. The filesystem config plugin's path to a JSON file.

The type of configuration retrieval, the default filesystem plugin reads a configuration JSON from disk.īuilt-in options include: filesystem, tls NOTICE: Flags in a flagfile should not be wrapped in quotes, shell-macro/variable expansion is not applied! Configuration control flagsĬonfig plugin name. Both the shell and daemon will discover and use the defaults. If no -flagfile is provided, osquery will try to find and use a "default" flagfile at /etc/osquery/. Include line-delimited switches to be interpreted and used as CLI-flags: -config_plugin=custom_plugin On macOS and Linux this -flagfile is the recommended way to add/remove the following CLI-only initialization flags. To see the flags that have been updated by your configuration, a flag file, or by the shell try: osquery> SELECT * FROM osquery_flags WHERE default_value value Ī special flag, part of Google Flags, can be used to read additional flags from a line-delimited file.
#OSQUERY JOIN NSLOOKUP FULL#
To see a full list of flags for your osquery version use -help or select from the osquery_flags table: $ osqueryi Google Flags enhances this to allow flags to be set within environment variables or via a "master" flag file. Essentially, any flag needed to help osquery determine and discover a configuration must be supplied via command-line arguments. Refer to the techniques below for obtaining ground truth and check other components of this Wiki.įlags that do not control startup settings may be included as "options" within configuration. Warning, this list is still not the 'complete set' of flags. Most platform specific flags will control the OS API and library integrations used by osquery.
#OSQUERY JOIN NSLOOKUP WINDOWS#
Expect Linux, macOS, and Windows to include platform specific flags too. The shell contains a few more to help with printing and other helpful one-off modes of operation. Most flags apply to both tools, osqueryi and osqueryd. Understanding how flags work in osquery will help with stability and greatly reduce issue debugging time. These flags are powered by Google Flags and are somewhat complicated. func FoobarColumns() table.The osquery shell and daemon use optional command-line (CLI) flags to control initialization, disable/enable features, and select plugins. FoobarColumns returns the columns that our table will return. NewPlugin( "foobar", FoobarColumns(), FoobarGenerate)) table.NewPlugin requires the table plugin name, // a slice of Columns and a Generate function. Create and register a new table plugin with the server.

Fatalf( "Error creating extension: %s \n", err) NewExtensionManagerServer( "foobar", * socket) Fatalf( `Usage: %s -socket SOCKET_PATH`, os. String( "socket", "", "Path to osquery socket file") "context" "log" "os" "flag" "/osquery/osquery-go" "/osquery/osquery-go/plugin/table" This library is compatible with Go Modules. For more information about how this process works at a lower level, see the osquery wiki. You can then have osquery load the extension in your desired context (ie: in a long running instance of osqueryd or during an interactive query session with osqueryi). To create an extension, you must create an executable binary which instantiates an ExtensionManagerServer and registers the plugins that you would like to be added to osquery. This project contains Go bindings for creating osquery extensions in Go. are implemented via a robust plugin and extensions API. In osquery, SQL tables, configuration retrieval, log handling, etc. If you're interested in learning more about osquery, visit the GitHub project, the website, and the users guide. With osquery, SQL tables represent abstract concepts such as running processes, loaded kernel modules, open network connections, browser plugins, hardware events or file hashes.

This allows you to write SQL-based queries to explore operating system data. Osquery exposes an operating system as a high-performance relational database.
