Hi All,
I was wondering if there is a way with the Elastic Agent in standalone mode to validate a configuration?
Looking at the output of the Elastic Agent process:
elastic-agent help
Usage:
elastic-agent [subcommand] [flags]
elastic-agent [command]
Available Commands:
diagnostics Gather diagnostics information from the elastic-agent and running processes.
enroll Enroll the Agent into Fleet
help Help about any command
inspect Shows configuration of the agent
install Install Elastic Agent permanently on this system
restart Restart the currently running Elastic Agent daemon
run Start the elastic-agent.
status Status returns the current status of the running Elastic Agent daemon.
uninstall Uninstall permanent Elastic Agent from this system
upgrade Upgrade the currently running Elastic Agent to the specified version
version Display the version of the elastic-agent.
watch Watch watches Elastic Agent for failures and initiates rollback.
Flags:
-c, --c string Configuration file, relative to path.config (default "elastic-agent.yml")
-d, --d string Enable certain debug selectors
-e, --e Log to stderr and disable syslog/file output
--environment environmentVar set environment being ran in (default default)
-h, --help help for elastic-agent
--path.config string Config path is the directory Agent looks for its config file (default "/usr/share/elastic-agent")
--path.downloads string Downloads path contains binaries Agent downloads
--path.home string Agent root path (default "/usr/share/elastic-agent")
--path.install string Install path contains binaries Agent extracts
--path.logs string Logs path contains Agent log output (default "/usr/share/elastic-agent")
-v, --v Log at INFO level
Use "elastic-agent [command] --help" for more information about a command.
There doesn't appear to be an option for validating a configuration that is being passed to it.
I'm attempting to setup some automation for CI/CD and want to add a test to validate that a config is valid, but can't seem to find a good solution for this.