Getting 401 response while sending log to ELK using http


#1

I tried it from ELk server using command:
curl -H "content-type: application/json" -XPUT 'http://elk.example.net:5555' -d '{
"post_date" : "2015-10-29T15:20:34","message" : "Nowshad_amin" }' -v
Response:

upload completely sent off: 66 out of 66 bytes
< HTTP/1.1 401 Unauthorized
< Content-Type: text/plain
< WWW-Authenticate: Basic realm=""
< Content-Length: 0
<
Connection #0 to host elk.example.net left intact

Please take this into your consideration (For lumberjack I am using keys, but for http I am not using any keys and no authentication in my input file). I can send log using lumberjack but getting 401 response while sending log using http

input {
lumberjack {
port => 5000
type => "logs"
ssl_certificate => "/etc/pki/tls/certs/logstash-forwarder.crt"
ssl_key => "/etc/pki/tls/private/logstash-forwarder.key"
}
http {
port => 5555
}
}

Any help will be highly appreciated


(Mark Walkom) #2

401 is an authorisation problem, not an ELK one.
You need to sort out whatever is proxying these commands and wanting auth details.


(system) #3