Logatash input file from URL


(Navneet Mathpal) #1

Hi,

I have a requirement where I need to put the file path as URL . Is it possible in logatash to put the file path as a URL ? and will it be real time ?
ex:

input
{
file
{
path => https://www.google.com/jsonfile.log
}
}


(Mark Walkom) #2

Try https://www.elastic.co/guide/en/logstash/current/plugins-inputs-http.html or https://www.elastic.co/guide/en/logstash/current/plugins-inputs-http_poller.html


(Navneet Mathpal) #3

Hi warkolm,

Thank you for your reply
I tried like

input
{
http
{

  	host => "localhost"
  	port => 9200
  }

}

filter
{

}
output
{
stdout { codec => "rubydebug"}
}

so that I can get the simple response from elasticsearch port .. elastic is up and running ..
could you please let me know am I doing something wrong ?

It is showing an error : Address already in use - bind - Address already in use: bind


(Mark Walkom) #4

Try using the poller input instead.


(Navneet Mathpal) #5

Hi Warkolrn,

Thank you , I am able to do it with http pooler, could you please let me know how to do the same with http input .
and what are the differences between http input AND http_pooler ?


(Mark Walkom) #6

You can't do it with http, that is the point.

If you read the docs it does explain what each does.


(system) #7