Stackdriver Logging Agent Installation Guide

Stackdriver Logging Agent Installation

Question

You want to use the Stackdriver Logging Agent to send an application's log file to Stackdriver from a Compute Engine virtual machine instance.

After installing the Stackdriver Logging Agent, what should you do first?

Answers

Explanations

Click on the arrows to vote for the correct answer

A. B. C. D.

B.

The correct answer is C. Configure the application log file as a custom source.

After installing the Stackdriver Logging Agent on the Compute Engine virtual machine instance, the first step is to configure the application log file as a custom source. This is because the Logging Agent uses a configuration file to specify which log files to monitor and send to Stackdriver.

To configure the application log file as a custom source, you need to edit the configuration file, located at /etc/google-fluentd/config.d/ on the virtual machine instance. You can use a text editor to modify the file, adding a new source section for the application log file.

The source section should include the following information:

  • The path to the application log file
  • The log format (e.g., Apache, JSON, syslog)
  • Any additional configuration options (e.g., tags, labels, buffer settings)

Once you have configured the application log file as a custom source, you can restart the Stackdriver Logging Agent to start sending log entries to Stackdriver. You can verify that the logs are being sent by checking the Stackdriver Logging page in the Google Cloud Console.

Answers A, B, and D are not correct because they are not the first step required after installing the Stackdriver Logging Agent. Enabling the Error Reporting API, granting full access to Cloud APIs, and creating a Logs Export Sink are all tasks that can be performed after configuring the custom log source.