Http Input Plugin - basic question

Hello team,

I am very new to to ELK stack and this is my first task which I am trying to do:

I am not understand a part of Http Input Plugin documentation here: https://www.elastic.co/blog/introducing-logstash-input-http-plugin

  http {
    host => "127.0.0.1" # default: 0.0.0.0
    port => 31311 # default: 8080
  }
} 

Question 1: What is the host? Is the host where the request is coming from?
Question 2: What is the REST URL I have to call if I am calling this plugin from another application. My LogStash is currently sitting on a windows server.
Documentation mentions: curl -XPUT 'http://127.0.0.1:8080/twitter/tweet/1' -d 'hello' this would work, and it works if I use this command from the server powershell. Which REST API to call if I am calling it from outside of my LogStash server.

I am very confused about it, any help would be appreciated.

Thank you,
Karanbir

No, it is the IP address to which the http listener binds. If you want to be able to call it remotely do not use 127.0.0.1. The default (0.0.0.0) means it will bind to the IP address of your server.

Thanks @Badger for your response :slight_smile:
Got it, if I bind it to 0.0.0.0 it means it will be binded to my server.
So, then I can directly put my server's hostname in my postman request? Should it work? Currently it doesn't seem to work ATM.
What do you think should go in the URI here?

I would expect that to work.

Thank you @Badger , your suggestion was really helpful! :slight_smile:

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.