Logs send to Logstash Forwarder in http post request

Hello,

I use Logstash Forwarder to collect logs in files, but I would like to know if it's possible to collecte log which are sending in http post on the port of Logstash Forwarder ?

In fact, I have some logs that I collect with files, so with logstash formarder and the logstash input lumberjack, and now I have a new type of logs to collect in elasticsearch. And I want to collect those new logs without files. I find the logstash input http, it's work, but it need that I open a new port differents than the port that I use to Logstash Forwarder. I prefer to have only one port.

So, do you know if it's possible, if yes how can I test it ? I try with curl but I always have this error

curl: (52) Empty reply from server

Or have you any idea to use only the port of logstash forwarder .

Marjolaine

The Lumberjack protocol is quite different from HTTP so you will not be able to submit logs to a Lumberjack listener using an HTTP client.

Ok, Thank you for your answer. So If I understand, I am obliged to use two port :

  • One for logstash forwarder for files
  • And one for http

That's correct. Of course, if you're able to run Logstash instead of logstash-forwarder you could get rid of the Lumberjack protocol and use HTTP everywhere.