Basic API Help with http output plugin


#1

Hi all,

I am completely new to Logstash, so please forgive my simple question. I am having a little trouble understanding how to use the http output plugin to send some apache logs to a SaaS cloud based log aggregation tool using a basic API key that the tool provides.

I went through the http output plugin documentation but it only references certs and keystores. All I have is an API key string (and URL) for the log aggregator.

Can anyone point me in the right direction or give me some documentation on the config file format I need to use to leverage an API key? I looked through these forums but couldnt find any good examples.

Thanks!


#2

How does the aggregator want you pass the key to it? If it wants it in the query string include it in the URL. If it wants a header set a header. What does it want?


#3

It looks like it wants it as a header. I guess that means I need:

headers => ["Authorization", "Basic "]

in the http output -> http section of my config file?


#4

That's plausible.


#5

Looks like I had to go to the actual log aggregators documentation to get what the header needed to be: Authorization:Bearer key

I assumed there was some standard header to authenticate using an API key that I was missing. (Shows how green I am at this.)

Im all set now. Thank you.


(system) #6

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