WebSocket monitoring
Live updates, chat and trading feeds run over WebSocket, where an HTTP check sees nothing. Check the connection the way your app uses it.
What each check does
- Opens the ws:// or wss:// connection and checks that the handshake succeeds.
- Optionally sends a text message, and then a message must come back within the timeout.
- Optionally checks that the first message, or the reply, contains or lacks a keyword.
When it alerts
- The handshake fails or is rejected, or no reply arrives in time.
- The keyword check does not pass.
Example
wss://ws.example.com/feedGood to know
- Send handshake headers, such as a token or an Origin your server requires.
- Put credentials in headers, not in the message, which is not stored as a secret.
On every monitor
- Alerts by email, Slack, Discord, Teams, Telegram, PagerDuty, webhooks, Lark, ntfy and the mobile app.
- Recovery thresholds, so an incident closes only after the service has answered several times in a row.
- Dependencies: a monitor that depends on another stays quiet while that one is down.
- Maintenance windows, incident history and public status pages built from the same monitors.
Try it on the Free plan
The Free plan includes 3 monitors checked every 5 minutes, with every alert channel. No card needed.
Questions
Is a successful handshake enough?
Often not: a server can accept connections while the feed behind it has stopped. Sending a ping or a subscribe message and expecting a reply checks the part your users depend on.
Does it keep the connection open?
No. Each check connects, does its exchange and closes, so it measures a fresh connection every time.
WebSocket 监控
实时更新、聊天和行情推送都跑在 WebSocket 上,HTTP 检查看不到它们。按照应用的实际用法检查连接。
每次检查做什么
- 建立 ws:// 或 wss:// 连接,检查握手是否成功。
- 可以发送一条文本消息,之后必须在超时时间内收到回复。
- 可以检查第一条消息或回复中是否包含某个关键词。
什么时候告警
- 握手失败或被拒绝,或没有按时收到回复。
- 关键词检查没有通过。
示例
wss://ws.example.com/feed使用说明
- 可以发送握手请求头,例如服务器要求的令牌或 Origin。
- 凭据请放在请求头里,不要放在消息中——消息不会作为密钥保存。
所有监控通用
- 通过邮件、Slack、Discord、Teams、Telegram、PagerDuty、Webhook、飞书、ntfy 和手机 App 告警。
- 可设置恢复阈值,服务连续多次正常后故障才结束。
- 依赖关系:依赖另一个监控的监控,在被依赖方宕机期间不会告警。
- 维护窗口、故障历史,以及由同一组监控生成的公开状态页。
常见问题
握手成功就够了吗?
往往不够:服务器可能还在接受连接,但背后的数据推送已经停了。发送一条 ping 或订阅消息并等待回复,检查的才是用户真正依赖的部分。
它会一直保持连接吗?
不会。每次检查都会连接、完成一次收发后关闭,所以每次测量的都是一个新的连接。