I have schedule a HTTP call type job using Google Cloud Scheduler. How do I send out email alert if the job failed?
I have read the Cloud Scheduler documentation, and google around but the answer is not obvious. I had also attempted the stackdriver alert policy but can't find the corresponding metrics for the failed log entry.
I expect an email notification can be configured to send out if the scheduled job failed.
In this alerting policy, the condition is monitoring the HTTP response latency. If this latency is higher than two seconds continuously for five minutes, then the condition is met and an incident is created. A transient spike in latency doesn't cause the condition to be met or an incident to be created.
Cloud Scheduler is a fully managed enterprise-grade cron job scheduler. It allows you to schedule virtually any job, including batch, big data jobs, cloud infrastructure operations, and more. You can automate everything, including retries in case of failure to reduce manual toil and intervention.
One way to handle this is to create a new Log-Based Metric with this filter:
resource.type="cloud_scheduler_job" severity != INFO
.
Then you can create an alert based on this new metric.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With