ExamGecko
Question list
Search
Search

List of questions

Search

Related questions











Question 131 - 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 <eontainer-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.This command is used to fetch the logs of a container from the Docker daemon, not to send them to an external service1.To export container logs to a logging solution, such as Splunk, you need to use a Docker logging driver2.A logging driver is a way of plugging into the Docker engine to forward logs to a specific destination2.Docker supports several built-in logging drivers, including one for Splunk3.To use the Splunk logging driver, you need to specify the--log-driver splunkoption when running a container, and provide some additional options, such as the Splunk HTTP Event Collector token and URL3.Alternatively, you can configure the Splunk logging driver as the default logging driver for the Docker daemon by editing thedaemon.jsonfile4.Reference:

1: docker logs | Docker Docs

2: Configure logging drivers | Docker Docs

3: Splunk logging driver | Docker Docs

4: Collecting docker logs and stats with Splunk | Splunk

asked 08/11/2024
Jorge Pinto
30 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first