﻿---
title: Custom WebSocket Input
description: The WebSocket input integration enables ingestion of real-time data from WebSocket servers. WebSockets provide a full-duplex communication channel over...
url: https://www.elastic.co/docs/reference/integrations/websocket
products:
  - Elastic integrations
applies_to:
  - Serverless Observability projects: Generally available
  - Serverless Security projects: Generally available
  - Elastic Stack: Generally available since 9.0
---

# Custom WebSocket Input
|                                                                                                 |                                |
|-------------------------------------------------------------------------------------------------|--------------------------------|
| **Version**                                                                                     | 1.0.2 ([View all](#changelog)) |
| **Subscription level**[What's this?](https://www.elastic.co/subscriptions)                      | Basic                          |
| **Developed by**[What's this?](https://www.elastic.co/docs/reference/integrations/developed-by) | Elastic                        |
| **Minimum Kibana version(s)**                                                                   | 9.0.08.17.18.16.3              |

The WebSocket input integration enables ingestion of real-time data from WebSocket servers. WebSockets provide a full-duplex communication channel over a single, long-lived connection, which makes it suitable for scenarios where low latency data transmission is required.
This input type connects to a WebSocket URL, listens for messages sent by the server, and processes these messages as they arrive. The data is then published to Elasticsearch, making it searchable and analyzable in near real-time.

## Configuration

To configure the WebSocket input, refer to the [Streaming Input](https://www.elastic.co/docs/reference/beats/filebeat/filebeat-input-streaming) documentation.
To configure the WebSocket input, specify the connection URL and other optional parameters such as headers for authentication or protocol versions. Advanced options for connection handling, such as timeouts and subprotocols, can be configured in the "Advanced options" section.

### Example Configuration

Here is a basic example of how to configure the WebSocket input:
![Configuration Page](https://www.elastic.co/docs/reference/integrations/images/websocket/websocket_configuration.png)
This configuration establishes a WebSocket connection to ws://localhost:443/v1/stream and uses basic authentication.

## Data Processing

The WebSocket input will consume messages from the server as they are transmitted. These messages are expected to be in a format that Filebeat can process, such as JSON. If the message format is different, you may need to define a processor to parse and structure the data before it is sent to Elasticsearch.

## Connection Management

The WebSocket input manages the connection to the WebSocket server, including automatically reconnecting if the connection is lost. The input does not maintain any state between restarts, so if the server sends historical data, it will be re-ingested upon reconnection.

## Changelog

<dropdown title="Changelog">
  | Version   | Details                                                                                                                                                                                                                                | Minimum Kibana version |
  |-----------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------|
  | **1.0.2** | **Bug fix** ([View pull request](https://github.com/elastic/integrations/pull/19872))Fix kibana.version constraint to use tilde ranges for intermediate version bounds.                                                                | 9.0.08.17.18.16.3      |
  | **1.0.1** | **Bug fix** ([View pull request](https://github.com/elastic/integrations/pull/17998))Fix broken links for Websocket integration.                                                                                                       | 9.0.08.17.18.16.3      |
  | **1.0.0** | **Enhancement** ([View pull request](https://github.com/elastic/integrations/pull/15298))Release package as GA.**Enhancement** ([View pull request](https://github.com/elastic/integrations/pull/15298))ECS version updated to 8.17.0. | 9.0.08.17.18.16.3      |
  | **0.3.0** | **Enhancement** ([View pull request](https://github.com/elastic/integrations/pull/13657))Added support for retry configuration options.                                                                                                | 9.0.08.17.18.16.3      |
  | **0.2.0** | **Enhancement** ([View pull request](https://github.com/elastic/integrations/pull/12919))Update Kibana constraint to support 9.0.0.                                                                                                    | 9.0.08.13.0            |
  | **0.1.1** | **Bug fix** ([View pull request](https://github.com/elastic/integrations/pull/11896))Fix broken links for Websocket integration.                                                                                                       | 8.13.0                 |
  | **0.1.0** | **Enhancement** ([View pull request](https://github.com/elastic/integrations/pull/9926))Initial Implementation.                                                                                                                        | 8.13.0                 |
</dropdown>