Google Cloud Professional Cloud Developer Practice Test

Question: 1 / 400

What should be installed on a Compute Engine instance to write logs to Cloud Logging?

Pipe the content of log files to the Linux Syslog daemon

Install a Google version of fluentd on the Compute Engine instance

To write logs to Cloud Logging from a Compute Engine instance, installing a Google version of fluentd on the instance is the most efficient and effective solution. Fluentd is a robust logging tool designed to unify the data collection and consumption for better use and understanding. It’s an open-source data collector that is highly adaptable and can be configured to monitor your application logs, process them, and then send them to various outputs, including Cloud Logging.

Using fluentd provides significant advantages because it can handle structured data better and allows for complex data routing, filtering, and buffering. This level of functionality makes it the ideal choice for sending logs directly to Cloud Logging, ensuring that all necessary logs can be collected, transformed if needed, and then securely sent to Google Cloud's logging services.

In contrast, piping log files to the Linux Syslog daemon, while potentially useful for standard logging mechanisms, does not directly integrate with Cloud Logging. It generally requires additional configuration to forward logs to the correct destination, which makes it less straightforward.

Collectd, though capable of collecting and sending metrics and logs, is not the best fit for structured log data intended for Cloud Logging. It primarily focuses on collecting metrics rather than logs.

Using cron jobs to copy log files to Cloud Storage is also

Get further explanation with Examzify DeepDiveBeta

Install a Google version of collectd on the Compute Engine instance

Use cron jobs to copy log files to Cloud Storage daily

Next Question

Report this question

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy