Skip to main content
Version: 0.6.x
websocketINPUTBUFFERPROCESSOROUTPUT

WebSocket

The WebSocket input connects to a remote WebSocket server as a client, decodes each inbound message, and forwards it into the pipeline. The current implementation supports client mode only. As a channel-based input it follows the engine's cancellation-safety contract: dropping a pending read never loses an already-decoded message (see Input Delivery Semantics).

Configuration​

FieldTypeRequiredDefaultDescription
typestringyes—Constant value "websocket"
urlstringyes—WebSocket server URL, e.g. ws://host:8080/path or wss://host:8443/path
headersmap<string, string>no—Request headers attached during the handshake
timeoutintegerno—Connection timeout (seconds)

Examples​

input:
type: "websocket"
url: "ws://localhost:8080/ws"
input:
type: "websocket"
url: "wss://secure.example.com/ws"
headers:
Authorization: "Bearer ${TOKEN}"
timeout: 10

Notes​

  • Client mode only: the component actively calls connect_async against url; it does not listen on a port. Server-side fields such as mode/host/port/path do not exist in the code, and the related descriptions from the old docs have been removed.
  • Automatically attaches the __meta_source and __meta_ingest_time metadata columns.