A cloud administrator needs to track specific HTTP 500 error patterns contained within application log entries and receive automated notifications whenever the error frequency exceeds a set threshold within a 5-minute window. Which TWO actions should the administrator perform in Google Cloud Observability to meet these requirements?
- Create a counter log-based metric in Cloud Logging using a log filter matching the HTTP 500 error entries.Cevap
- Create an alerting policy in Cloud Monitoring that monitors the counter log-based metric and defines the threshold condition.Cevap
- CEnable the Google Cloud Observability API inside the Billing Account settings page rather than within the workload's Google Cloud project.
- DGrant the primitive Owner role to the logging service account at the resource level, assuming it overrides any inherited restrictive IAM permissions from parent folders.
Cevap
To track log patterns and receive alerts based on log occurrence frequency, the administrator must create a counter log-based metric in Cloud Logging filtered for the HTTP 500 errors and configure a Cloud Monitoring alerting policy that monitors this new metric.
Creating a counter log-based metric allows Cloud Logging to aggregate log occurrences matching a specific filter into a numeric time-series metric. Setting up an alerting policy in Cloud Monitoring based on this metric ensures that notifications are sent when the metric exceeds the defined rate threshold.
Adım Adım Çözüm
Anahtar Kavram
Log-based Metrics and Cloud Monitoring Alerting Policies
Tahmini Süre:1m 30s