nerdexam
Google

PROFESSIONAL-CLOUD-DEVELOPER · Question #63

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…

The correct answer is C. Configure the application log file as a custom source. After installing the Stackdriver Logging Agent (based on fluentd), the first required step for ingesting a custom application log file is to configure that file as a custom log source. This means creating a configuration file (typically in /etc/google-fluentd/config.d/) that…

Monitoring, logging, and debugging applications

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?

Options

  • AEnable the Error Reporting API on the project.
  • BGrant the instance full access to all Cloud APIs.
  • CConfigure the application log file as a custom source.
  • DCreate a Stackdriver Logs Export Sink with a filter that matches the application's log entries.

How the community answered

(30 responses)
  • A
    7% (2)
  • B
    10% (3)
  • C
    80% (24)
  • D
    3% (1)

Explanation

After installing the Stackdriver Logging Agent (based on fluentd), the first required step for ingesting a custom application log file is to configure that file as a custom log source. This means creating a configuration file (typically in /etc/google-fluentd/config.d/) that tells the agent the file path to tail and the log format. Without this configuration, the agent will only collect default system logs. Option A (Error Reporting API) is unrelated to general log ingestion. Option B (full API access) is unnecessary if the VM already has the Logs Writer IAM role via its service account. Option D (creating a Logs Export Sink) is a downstream step that comes after logs are already flowing into Stackdriver Logging.

Topics

#Stackdriver Logging Agent#Application Logging#Logging Configuration#Compute Engine

Community Discussion

No community discussion yet for this question.

Full PROFESSIONAL-CLOUD-DEVELOPER Practice