From e37024dfc6a0095b2e208565701f442dde964d5a Mon Sep 17 00:00:00 2001 From: TwiN Date: Thu, 9 Oct 2025 13:28:34 -0400 Subject: [PATCH] docs: Use working websocket example --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 57b48a41..6ac7ba9f 100644 --- a/README.md +++ b/README.md @@ -2965,20 +2965,20 @@ This works for SCTP based application. ### Monitoring a WebSocket endpoint -By prefixing `endpoints[].url` with `ws://` or `wss://`, you can monitor WebSocket endpoints at a very basic level: +By prefixing `endpoints[].url` with `ws://` or `wss://`, you can monitor WebSocket endpoints: ```yaml endpoints: - name: example - url: "wss://example.com/" + url: "wss://echo.websocket.org/" body: "status" conditions: - "[CONNECTED] == true" - - "[BODY].result >= 0" + - "[BODY] == pat(*served by*)" ``` The `[BODY]` placeholder contains the output of the query, and `[CONNECTED]` shows whether the connection was successfully established. You can use Go template -syntax. The functions LocalAddr and RandomString with a length can be used. +syntax. ### Monitoring an endpoint using ICMP