ExamGecko
Question list
Search
Search

List of questions

Search

Related questions











Question 92 - 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 system events --filter splunk

A.

Yes

Answers
A.

Yes

B.

No

Answers
B.

No

Suggested answer: B

Explanation:

= The solution will not configure a Docker container to export container logs to the logging solution, such as Splunk. The commanddocker system events --filter splunkis not a valid command to send logs to a remote destination.The--filteroption fordocker system eventsonly accepts the following keys:container,daemon,event,image,label,network,plugin,type, andvolume1.splunkis not a valid key for filtering events.To configure a Docker container to export container logs to a logging solution, such as Splunk, you need to use the--log-driverand--log-optoptions when creating or running the container2. For example, to use the Splunk logging driver, you can use the following command:

docker run --log-driver=splunk --log-opt splunk-token=176FCEBF-4CF5-4EDF-91BC-703796522D20 --log-opt splunk-url=https://splunkhost:8088 ...

This command will send the container logs to the Splunk HTTP Event Collector (HEC) endpoint specified by thesplunk-urloption, using the authentication token provided by thesplunk-tokenoption3.You can also use other logging drivers, such assyslog,fluentd,gelf, etc., depending on your logging solution4.Reference:

1: docker system events | Docker Docs

2: Configure logging drivers | Docker Docs

3: Splunk logging driver | Docker Docs

4: Supported logging drivers | Docker Docs

asked 08/11/2024
Sunila Chugh
40 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first