Hi,
I am trying to get logstash to produce the same output as the following curl command that connects to a test server's REST API but it is always failing authentication.
curl -H "X-API-KEY: api_key_id" -H "X-SECRET: api_key_value" http://localhost:5000/items
My logstash filter is as follows:
input {
http_poller {
schedule => { cron => "* * * * * UTC" }
urls => {
my_url => {
method => get
url => "http://localhost:5000/items"
headers => {
"x-api-key" => "api_key_id"
"x-api-secret" => "api_key_value"
"Content-Type" => "application/json"
}
request_timeout => 60
}
}
# Other input configurations...
}
}
filter {
# Add your filters here if needed
}
output {
stdout {
codec => rubydebug
}
}
it produces the following error thats coming from the test server
I have tried using basic authentication but it fails as well.
api_key => "<api_key_id>:<api_key_value>
AND
auth => {
user => "api_key_id"
password => "api_key_value"
}
I feel like it something simple that being overlooked here.