# Logstash import file from url

**URL:** <https://discuss.elastic.co/t/logstash-import-file-from-url/281067>\
**Category:** Logstash\
**Created:** [August 11, 2021, 12:54pm UTC](https://discuss.elastic.co/t/logstash-import-file-from-url/281067 "2021-08-11T12:54:56Z")\
**Posts on this page:** 1\
**Showing post:** 8

<div class="post-metadata">

**Author:** ![Cad](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/cad/32/86661_2.png) [@Cad](https://discuss.elastic.co/u/Cad)\
**Post date:** [August 13, 2021, 10:35am UTC](https://discuss.elastic.co/t/logstash-import-file-from-url/281067/8 "2021-08-13T10:35:28Z")

</div>

Hi,

It seems that the [http input plugin](https://www.elastic.co/guide/en/logstash/current/plugins-inputs-http.html#plugins-inputs-http), the [http\_poller input plugin](https://www.elastic.co/guide/en/logstash/current/plugins-inputs-http_poller.html#plugins-inputs-http_poller) and the [exec input plugin](https://www.elastic.co/guide/en/logstash/current/plugins-inputs-exec.html#plugins-inputs-exec) are not compatible with the single reading of a URL.

So if you can do a curl and print the result in a file, try this :

1. Do a curl and print the result in a file
2. Configure your logstash to read the file  
input =\> use the multiline codec plugin to read the entire file in one time [example here](https://discuss.elastic.co/t/parsing-array-of-json-objects-with-logstash-and-injesting-to-elastic/203197/2).  
filter =\> use the json plugin to get all your data.  
output =\> do what you want.

You can even configure logstash before the curl command and configure it to make it read the file when it is edited.

Cad.

---

_[View the full topic](https://discuss.elastic.co/t/logstash-import-file-from-url/281067)._
