ExamGecko
Question list
Search
Search

List of questions

Search

Related questions











Question 93 - DCA discussion

Report
Export

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 logs <container-id>

A.

Yes

Answers
A.

Yes

B.

No

Answers
B.

No

Suggested answer: B

Explanation:

: = The commanddocker logs <container-id>will not configure a Docker container to export container logs to the logging solution, such as Splunk.This command only displays the logs of a specific container in the standard output or a file, but does not send them to any external system1.To export container logs to Splunk, you need to use the Docker Logger Drivers, which are plugins that provide logging capabilities for Docker containers2.The Splunk logging driver sends container logs to HTTP Event Collector in Splunk Enterprise and Splunk Cloud3.To use the Splunk logging driver for a specific container, you need to use the command-line flags--log-driverand--log-optwithdocker run, and provide the Splunk token and URL as options3. For example:

$ docker run --log-driver=splunk --log-opt splunk-token=VALUE --log-opt splunk-url=VALUE ...

docker logs | Docker Documentation

Logging drivers | Docker Documentation

Splunk logging driver | Docker Documentation

asked 08/11/2024
Sze Yenn Tan
36 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first