Soru

Zorluk: OrtaConfiguring Cloud Logging, Monitoring, and Operational Alerting

A Site Reliability Engineering (SRE) team needs to set up real-time operational alerting whenever application logs contain critical error events. Sequence the correct administrative steps required to construct a metric-based alerting workflow from Cloud Logging to Cloud Monitoring.

  1. 1Define a log filter query in Cloud Logging that isolates the specific application error log entries.
  2. 2Create a counter log-based metric using the defined log filter to export event counts into Cloud Monitoring.
  3. 3Configure a notification channel in Cloud Monitoring to define where operational alerts should be delivered.
  4. 4Construct a Cloud Monitoring alerting policy specifying the metric threshold condition and attaching the notification channel.

Cevap

The correct sequence begins with writing the log filter query in Cloud Logging to select error logs, followed by creating a counter log-based metric from that filter, configuring a notification channel in Cloud Monitoring, and finally constructing an alerting policy that evaluates the log-based metric threshold and targets the notification channel.
The operational workflow begins by isolating relevant log entries using a log filter in Cloud Logging. Once filtered, a counter log-based metric is created to translate these log events into time-series data. Next, a notification channel is defined in Cloud Monitoring to serve as the alert destination. Finally, an alerting policy is created that monitors the custom log-based metric against specified thresholds and dispatches notifications via the defined channel.

Adım Adım Çözüm

1
Write a log filter query in Cloud Logging.
Identifies and isolates relevant application error log entries.
Log entries must be selected via a log filter before a log-based metric can aggregate them.
2
Create a counter log-based metric in Cloud Logging.
Converts log count data into a time-series metric available in Cloud Monitoring.
Cloud Monitoring alerting policies operate on time-series metrics rather than unaggregated log streams.
3
Set up a notification channel in Cloud Monitoring.
Establishes a destination (e.g., Email, Webhook, PagerDuty) for operational notifications.
An alerting policy requires a valid notification channel to dispatch alerts when triggered.
4
Create an alerting policy referencing the log-based metric and notification channel.
Enables automated monitoring of the metric rate and triggers incidents when thresholds are crossed.
Combines the metric condition threshold and notification endpoint into an active operational monitoring rule.

Anahtar Kavram

Log-based metric creation and operational alerting workflow
Bu soruyu puanla