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?
- 1Construct a log filter in Cloud Logging to isolate log entries matching HTTP 5xx application errors.
- 2Create a custom log-based counter metric based on the defined log filter.
- 3Create a new Alerting Policy in Cloud Monitoring and select the custom log-based metric as the monitored resource.
- 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
Anahtar Kavram
Configuring custom log-based metrics and binding them to operational alerting policies in Google Cloud Observability.