我有一些使用 Express 用 NodeJs 编写的 API,这些 API 托管在 AWS EC2 上,当我的 API 出现故障时,我该怎么做才能收到电子邮件?当我的 API 崩溃时,我可以使用 CloudWatch 等 AWS 的任何服务发送电子邮件吗?
最佳答案
考虑使用 CloudWatch 的 synthetic monitoring至:
create canaries, configurable scripts that run on a schedule, to monitor your endpoints and APIs. Canaries follow the same routes and perform the same actions as a customer, which makes it possible for you to continually verify your customer experience even when you don't have any customer traffic on your applications. By using canaries, you can discover issues before your customers do.
您可以monitor canary events使用 EventBridge 并发送自定义通知,包括电子邮件。
关于node.js - 当我的 API 出现故障时,如何收到电子邮件?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/73464026/