How to send headers using http input plugin in logstash

Hi
am new in ES and logstash
I want to do POST call
Url:- https://dm-dev-authenticationservice-serviceapps-use-rg.azurewebsites.net/api/v1/Token

Headers:-
Content-Type :- application/json

Body :- {
"ClientId": "sdmtSG9BOap6aLn5oxoaCrfLHQCIUMLF",
"ClientSecret": "SqN4ywxCu6ylvn7ecoViEWB2NlUk9hup0eBn5VquT0XutSXCh6VKXC82dREeGIi2",
"Audience": "https://InventoryService/"
}

can some one help me to create input plugin for this.

any example will also work

Thanks in advance

Hi,
You can just use the logstash http plugin, which create an object "headers" by default.

can you please help me an example

input {
  http {
    port => 5045
  }
}

And then send your requests to port 5045.

There is also a possibility to index directly in Elasticsearch if you don't want filter with logstash.

Anyway you should give a look to the docs :slight_smile:

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