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 questions
Answer options
A: Yes
B: No Correct answer
Correct Answer:
B. No
Explanation

The 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.

Why Incorrect

A. Yes: This command is for monitoring daemon activity, not for configuring or forwarding application logs from a container.

References

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...".

Scroll to Top