DCA practice question 16 of 25

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

Full set: 191 questions
Answer options
A: Yes
B: No Correct answer
Correct Answer:
B. No
Explanation

The command docker system events is used to get real-time events from the Docker daemon, such as container creation, start, stop, or image pulls. It does not configure logging for a container. To configure a container to export logs to a solution like Splunk, you must use the --log-driver option (e.g., docker run --log-driver splunk ...) when creating the container, or configure the Docker daemon's daemon.json file to use Splunk as the default logging driver.

Why Incorrect

A. This command only streams Docker daemon events to the console; it does not configure or manage container log shipping to an external system.

References

1. Docker Documentation, docker system events command reference. Describes the command's purpose as "Get real time events from the server".

2. Docker Documentation, "Configure logging drivers". Explains that logging is configured per-container using the --log-driver flag with docker run or globally in the daemon.json file.

3. Docker Documentation, "Splunk logging driver". Provides specific instructions on how to configure and use the Splunk driver with --log-driver=splunk and various --log-opt options.

Scroll to Top