Your organization has a centralized logging solution, such as Sptunk.
Will this configure a Docker container to export container logs to the logging solution?
Solution.docker system events- -filter splunk
Correct Answer: B
Explanation
The command docker system events --filter splunk will not configure a Docker container to export container logs to the logging solution. The command docker system events will display real-time events from the Docker daemon, such as container creation, start, stop, etc. The --filter option will filter the events by various criteria, such as type, label, name, etc. However, there is no filter for splunk, and even if there was, it would only show the events related to Splunk, not the container logs. To configure a Docker container to export container logs to Splunk, you need to use the Splunk logging driver, which is a plugin that sends container logs to HTTP Event Collector in Splunk Enterprise and Splunk Cloud. You can use the --log-driver and --log-opt options when creating or running a container to specify the Splunk logging driver and its options, such as the Splunk token, URL, source, sourcetype, index, etc. Alternatively, you can configure the Splunk logging driver as the default logging driver for the Docker daemon by setting the log-driver and log-opts keys in the daemon.json file and restarting Docker. References:
* docker system events
* Splunk logging driver
* How to send Docker containers logs to Splunk?