Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Logstash to Logstash communication (http output plugin to http input plugin) #91

Open
sakshisaxena opened this issue Aug 1, 2018 · 2 comments

Comments

@sakshisaxena
Copy link

I am trying to send logs from one logstash instance to another instance using http output plugin and http input plugin.
I am able to to it with following configuration:

(Sending Instance) output { http { url => "http://x.x.x.x:5044" http_method => "post" } }
(Receiving Instance) input { http { id => "my_plugin_id" host => "0.0.0.0" port => 5044 } }

But when I try to setup 1-way SSL for the above communication with the following configuration:

output { http { url => "https://x.x.x.x:5044" http_method => "post" cacert => "/**/ca_cert.pem" } }

or
output { http { url => "https://x.x.x.x:5044" http_method => "post" truststore => "//truststore.jks" truststore_password => "*" } }

ca_cert.pem is the CA used to sign the certificate for the receiving instance

input { http { id => "my_plugin_id" host => "0.0.0.0" port => 5044 ssl => true keystore => "//truststore.jks" keystore_password => "*" } }

Error received-> Could not fetch URL {:url=>"https://x.x.x.x:5044", ---- :headers=>{"Content-Type"=>"application/json"}, :message=>"SSL peer shut down incorrectly", :class=>"Manticore::ClientProtocolException", :backtrace=>nil, :will_retry=>true}

Looks like the configuration in http output plugin is not taking effect ( cacert, truststore, truststore_password).

  • Version: 6.2.4
@jsvd
Copy link
Member

jsvd commented Aug 2, 2018

can you confirm your certificates work correctly at the tcp+tls level?

For example, you can use openssl to validate:

  1. the server tls setup through s_client:
openssl s_client -connect ip:port -CAfile /path/to/ca-certificates.crt
  1. the client tls setup through s_server:
openssl s_server -key key.pem -cert cert.pem -accept port

I have tried this locally with http input + http output both using certificates and it worked correctly.

@sakshisaxena
Copy link
Author

Hi,

Thanks for your reply.

Can you please share the http input plugin configurations?
I verified the certificates with openssl, they are working correctly but I guess I am not configuring them correctly in the http input + output plugin.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants