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 questionsThe 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.
A. This command only streams Docker daemon events to the console; it does not configure or manage container log shipping to an external system.
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.
Keep practicing
Take the free DCA practice test
Ten exam-style questions with answers and explanations, plus the exam facts and study guides.
More questions
Other DCA practice questions
- Question 1Does this command create a swarm service that only listens on port 53 using the UDP proto…
- Question 2Will this command ensure that overlay traffic between service tasks is encrypted? Solutio…
- Question 4Does this describe the role of Control Groups (cgroups) when used with a Docker container…
- Question 5Can this set of commands identify the published port(s) for a container? Solution: docker…
- Question 6Will this command mount the host's '/data' directory to the ubuntu container in read-only…
- Question 7A company's security policy specifies that development and production containers must run…
