Create a email notification for specific JsonPayload value severity => WARNING and JsonPayload reason: "FailedGetResourceMetric"
You can create a log-based metric using that particular JsonPayload
. Using Stackdriver logging, you can click on the FailedGetResourceMetric
string and select "Show matching entries" to update your filter and once you have an accurate filter, you can create the metric.
When you have a log-based metric, you can create an Alerting Policy to match a condition based on your metric.
For instance, you can use the log-based metric to count the number of occurences (how many log entries are matching this FailedGetResourceMetric
) to trigger a notification.
Stackdriver allows you to send notification via various channels, including emails, when creating these kind of policies.