# How can we use web socket

**URL:** <https://discuss.elastic.co/t/how-can-we-use-web-socket/1795>\
**Category:** Logstash\
**Created:** [June 3, 2015, 5:14am UTC](https://discuss.elastic.co/t/how-can-we-use-web-socket/1795 "2015-06-03T05:14:14Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dan](https://avatars.discourse-cdn.com/v4/letter/d/eada6e/32.png) [@Dan](https://discuss.elastic.co/u/Dan)\
**Post date:** [June 3, 2015, 5:14am UTC](https://discuss.elastic.co/t/how-can-we-use-web-socket/1795/1 "2015-06-03T05:14:14Z")

</div>

Hi All,

Can i know what is exactly purpose of websocket plugin.

I wan't to import data from one URL.  
With above plugin can i able to import data from URL???  
If possible please give me step by step procedure OR give me any other better solution for the same.

Thanks & Regards,  
Dan.

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [June 3, 2015, 5:58am UTC](https://discuss.elastic.co/t/how-can-we-use-web-socket/1795/2 "2015-06-03T05:58:40Z")

</div>

The [WebSocket input plugin](https://www.elastic.co/guide/en/logstash/current/plugins-inputs-websocket.html) can connect to WebSocket endpoints and receive data streamed over such connections. Most URLs don't support this so you can't just pass any URL. If you have a URL that returns data that you'd like to get into Logstash your best bet is to download the data to a local file and read that file. If the data can be updated over time and you want to ingest only the updates that requires some work.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 6, 2017, 5:38am UTC](https://discuss.elastic.co/t/how-can-we-use-web-socket/1795/3 "2017-07-06T05:38:40Z")

</div>


