fleet/tools/osquery-agent-options
2022-10-03 08:29:41 -04:00
..
main.go Add validations for agent options' command-line flags section. (#7979) 2022-10-03 08:29:41 -04:00
README.md Update osquery validations from 5.4.0 to 5.5.1 (#7960) 2022-09-27 08:35:57 -04:00

osquery-agent-options

This directory contains a script (a Go command) that generates the struct needed to unmarshal the Agent Options' options values that the current version of osquery supports. It extracts this information from osqueryd --help to identify which osquery command-line flags can be set via the options and which are only for the command-line (i.e. require a restart), and running a query in osqueryi to get the data type of those options.

It prints the resulting Go code to stdout (the osqueryOptions and the osqueryCommandLineFlags structs), you can just copy it and insert it in the proper location in the source code to replace the existing struct (in server/fleet/agent_options.go).

Note that the latest version of osquery should be installed for this tool to work properly (osqueryd and osqueryi must be in your $PATH).