how to create alert per error in stackdriver

2019-05-11 03:58发布

问题:

Having created log-based metrics in cloud console, I then want to create alerts so that every time there is a new matching log entry, the alert triggers.

In trying to create a suitable metric, the most likely looking options seem to be threshold or rate of change, but I don't think either will work for a policy of 1 log message => 1 alert.

Help appreciated.

回答1:

Yes, today the only way to alert on the log message is to create a threshold condition on the log metric with a very small threshold (0.001) and a duration of 1 minute. Thanks for using Stackdriver.