
Answer-first summary for fast verification
Answer: Install a Google version of fluentd on the Compute Engine instance.
To send logs from local text files on a Compute Engine instance to Cloud Logging, the recommended approach is to install the Google version of fluentd (google-fluentd). This agent is specifically designed to collect logs from various sources, including custom log files, and forward them to Cloud Logging. Option B is correct because configuring google-fluentd allows direct ingestion of logs from the specified files. Option A (piping logs to Syslog) might work if the agent is already installed, but the question does not indicate that the logging agent is pre-installed. Option C (collectd) is for metrics, not logs. Option D copies logs to Cloud Storage but does not send them to Cloud Logging. Thus, the correct answer is B.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
You have a mix of packaged and custom applications running on a Linux-based Compute Engine instance. These applications generate logs as text files locally. How can you configure the system to send these logs to Cloud Logging?
A
Pipe the content of the files to the Linux Syslog daemon.
B
Install a Google version of fluentd on the Compute Engine instance.
C
Install a Google version of collectd on the Compute Engine instance.
D
Using cron, schedule a job to copy the log files to Cloud Storage once a day.
No comments yet.