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.
Configuration
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
| type | string | yes | — | Constant value "websocket" |
| url | string | yes | — | WebSocket server URL, e.g. ws://host:8080/path or wss://host:8443/path |
| headers | map<string, string> | no | — | Request headers attached during the handshake |
| timeout | integer | no | — | 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_asyncagainsturl; it does not listen on a port. Server-side fields such asmode/host/port/pathdo not exist in the code, and the related descriptions from the old docs have been removed. - Automatically attaches the
__meta_sourceand__meta_ingest_timemetadata columns.