Типы мониторов
WebSocket monitors
Check that a WebSocket endpoint completes the handshake, optionally send a message and verify the reply, with TLS validation and response-time warnings.
- API type
websocket- You enter
- URL
- Runs at most every
- Plan minimum
- Needs
- None
- FastPing opens the URL and sends a WebSocket upgrade request. For
wss://, the certificate is validated like an HTTPS check. - The server must answer
101 Switching Protocolswith the rightUpgrade,ConnectionandSec-WebSocket-Acceptheaders. Redirects are not followed: the URL must be the WebSocket endpoint itself. - If you set a message, FastPing sends it as one text frame. If you set "Must contain", it waits for the server's first text message and looks for that text in it. Pings from the server are answered; binary messages are skipped.
- The connection is closed normally (close code 1000).
The response time is the duration of the handshake. The monitor is down when the handshake fails or the expected text is missing, and in warning when the handshake is slower than your threshold or the server accepts none of the subprotocols you asked for.
Enter wss:// (encrypted) or ws:// URLs. An https:// or http:// URL is converted to wss:// or ws://, and a bare host name becomes wss://host/. Query strings are kept, so endpoints such as /socket?token=… work.
| Field | API option | Default | Notes |
|---|---|---|---|
| URL | url | Required | ws:// or wss:// address. An https:// or http:// URL is converted to wss:// or ws:// |
| Message to send (optional) | wsMessage | None | Up to 2,000 characters |
| Must contain (optional) | expected | None | Up to 300 characters |
| Subprotocol (optional) | wsProtocol | None | Up to 200 characters |
| Timeout (seconds) | timeout | 15 | 2 to 60 |
| Warn if slower than (ms) | maxMs | None | 0 to 60,000 |
| Request headers | headers | None | Up to 4,000 characters. One per line, "Name: value". |
| Check interval | interval | Your plan's minimum | From your plan's minimum up to 24 hours |
Request headers are useful for an Authorization header or a token your endpoint expects. Headers that belong to the WebSocket handshake itself, such as Host, Upgrade or Sec-WebSocket-Key, cannot be overridden. Compression extensions are not offered.
| Endpoint | Settings |
|---|---|
| A plain echo or ping endpoint | Message {"type":"ping"}, Must contain pong. |
| GraphQL over WebSocket (graphql-transport-ws) | Subprotocol graphql-transport-ws, message {"type":"connection_init"}, Must contain connection_ack. |
| Socket.IO (Engine.IO v4) | URL wss://example.com/socket.io/?EIO=4&transport=websocket, no message, Must contain "sid": the server opens the session by itself. |
| Message | What it means | What to do |
|---|---|---|
HTTP 200 instead of 101 Switching Protocols | The URL answered as a normal web page, not as a WebSocket endpoint. | Check the path; proxies must forward the Upgrade and Connection headers. |
HTTP 301 instead of 101 Switching Protocols (redirect to …) | The endpoint redirects, and WebSocket handshakes do not follow redirects. | Use the final URL. |
Invalid Sec-WebSocket-Accept: the server did not complete the WebSocket handshake | Something answered 101 but did not complete the handshake correctly. | Usually a misconfigured proxy in front of the server. |
First text message does not contain "pong" | The server answered with a different message. | Check the message your endpoint expects and the reply format. |
The server closed the connection before sending a text message | The server hung up while FastPing waited for the expected reply. | Check authentication and the message format. |
No subprotocol accepted (requested graphql-transport-ws) | Warning: the handshake worked, but without your subprotocol. | Check the subprotocol name your server supports. |
The free WebSocket tester performs the same handshake once, optionally sends your message and shows the reply.