I want to create an alert in Cloud Monitoring using alerting policies when the number of 5xx errors over the last 5 mins across all proxies exceeds a certain threshold. Currently, am getting an alert for each error code and for each proxy separately. This is resulting in too many alerts. Can you please let me know how to send an aggregated alert ? Also is it possible to list the proxies, their error codes and a count of it in the Incident details ?
Hi there,
Let's say we want to create an alert any time your Apigee org experiences 300 or more 5XX errors over 5 minutes. Follow the steps below:
Next configure the alert trigger
Finally, define your notification channel and alert name as you see fit before saving the policy. This should cover your request of an aggregated alert. For more examples of alerts, see here.
As for your other request, "is it possible to list the proxies, their error codes and a count of it in the Incident details", no I don't see a way to add this to the aggregated alert I described above. There are restrictions on the types of variables that you can add to an alert notification body. Manual workarounds surely exist, but they'd take a fair bit of effort to engineer and would warrant a separate post.
There is no option of response code for metrics option: Apigee proxy (v2) > Proxyv2 > Apigee proxy request cumulative count
Instead source-code option is available in: Apigee proxy > Proxy > Apigee proxy response count
and:
Apigee target (v2) > Targetv2 > Apigee target response cumulative count