Soru

Zorluk: OrtaConfiguring Cloud Logging, Monitoring, and Operational Alerting

A Site Reliability Engineering (SRE) team needs to set up real-time operational alerting for high rates of HTTP 5xx application errors captured in Cloud Logging. What is the correct chronological sequence of steps to configure a log-based metric and activate an automated alerting policy in Google Cloud?

  1. 1Construct a log filter in Cloud Logging to isolate log entries matching HTTP 5xx application errors.
  2. 2Create a custom log-based counter metric based on the defined log filter.
  3. 3Create a new Alerting Policy in Cloud Monitoring and select the custom log-based metric as the monitored resource.
  4. 4Configure the condition threshold and attach the designated notification channel to activate the policy.

Cevap

The correct sequence is: first construct a log filter in Cloud Logging, second create a custom log-based counter metric from the filtered logs, third create an Alerting Policy in Cloud Monitoring referencing the custom metric, and fourth configure the condition threshold and attach the notification channel.
To create operational alerts based on log patterns in Google Cloud, you must first isolate the relevant log messages using a log filter in Cloud Logging. Next, convert those filtered log entries into a numeric metric by creating a log-based counter metric. Once the metric is registered, navigate to Cloud Monitoring to create an Alerting Policy that selects this metric as its target. Finally, define the numerical threshold condition and attach the target notification channel to enable automated alerting.

Adım Adım Çözüm

1
Construct a log filter in Cloud Logging.
HTTP 5xx application log events are accurately targeted and isolated from surrounding log streams.
Filters define the precise log criteria required to calculate operational metric counts.
2
Create a custom log-based counter metric.
Matching log occurrences are exposed as a numeric time-series metric to Cloud Monitoring.
Cloud Monitoring alerting policies operate on numerical metric time-series data rather than raw text logs.
3
Create an Alerting Policy referencing the log-based metric.
An alerting policy shell is bound to the new custom log metric resource.
The metric time-series must exist in Cloud Monitoring prior to selecting it within an alerting policy.
4
Specify threshold conditions and attach notification channels.
The alerting policy is fully configured and ready to trigger alerts upon threshold breaches.
Conditions define when an incident triggers, while notification channels dictate where alert notifications are routed.

Anahtar Kavram

Configuring custom log-based metrics and binding them to operational alerting policies in Google Cloud Observability.
Bu soruyu puanla