Http_poller authentication problem

  • Logstash 5.1
  • Problem: I cannot seem to get http_poller authentication working. For example I can use curl -u user:pass my_rest_api to get the output but the same always fail with the following logstash conf. The error is HTTP 401 - 'this request requires http authentication'.

Any insight of why?

input {
  http_poller {
    urls => {
      experiments => { 
        method => "get"
      	url => "my_rest_api" 
      	auth => {
      		user => "user"
      		password => "pass"
      	}
      }
    }
    request_timeout => 10
    interval => 3600
    codec => "plain"
  }
}

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