node.js - 当我的 API 出现故障时,如何收到电子邮件?

标签 node.js amazon-web-services express amazon-ec2 amazon-cloudwatch

我有一些使用 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/

相关文章:

node.js - 将音频 Blob 数据从 React 前端发送到 Express 后端

node.js - 无服务器离线 - 在 MacBook 16"M1 Pro(运行 Mac OS Monterey)上运行时无法命中端点

javascript - Nestjs:将提供者注入(inject)到由关键字 new 创建的对象中

node.js - 对象 #<Namespace> 没有方法 'socket'

amazon-web-services - AWS Data Lake 解决方案云形成模板中的访问 IP 参数是什么?

amazon-web-services - EC2 负载均衡器 : What is the Difference Between LB and Instance Protocol

amazon-web-services - 从单个 aws s3 存储桶托管多个子域

node.js - 表达多个静态路由正则表达式解析

node.js - 在 Express 中获取 POST 和 GET 请求的表单数据

forms - 如何在 express.js 中获取嵌套表单数据?