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:
- Rebuilt URL to: http://elk.example.net:5555/
- Hostname was NOT found in DNS cache
- Trying 172.32.0.157...
- Connected to elk.startjobs.net (172.32.0.157) port 5555 (#0)
PUT / HTTP/1.1
User-Agent: curl/7.35.0
Host: elk.example.net:5555
Accept: /
content-type: application/json
Content-Length: 66
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