DCA practice question 18 of 25
Your organization has a centralized logging solution, such as Splunk. 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 stream real-time events from the Docker daemon itself, such as container creation, destruction, or network attachment. It does not handle the application logs (i.e., stdout/stderr streams) generated by processes running inside a container. To configure a container to export its logs to Splunk, one must use the Splunk logging driver. This is achieved by specifying --log-driver=splunk and relevant options during the docker run command or by setting it in the daemon.json configuration file.
A. Yes: This command is for monitoring daemon activity, not for configuring or forwarding application logs from a container.
1. Docker Docs, docker system events command reference. "Get real time events from the server." The documentation shows examples of events like container create and network connect.
2. Docker Docs, "Splunk logging driver". "The splunk logging driver sends container logs to the HTTP Event Collector in Splunk." This page details the correct configuration method.
3. Docker Docs, "Configure logging drivers". "Docker includes multiple logging mechanisms... To configure the logging driver for a container, you use the --log-driver flag...".
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…
