Simple test showing that logstash port is reachable by filebeat

We are looking at larger number of filebeats installations in the production environments. One challenge is that in some cases logstash host:5044 is not reachable from the filebeat host. How do we check using curl (nc is not available) that filebeat will be able to talk to logstash? I tried in cases where that connectivity is working fine and curl -v will return 'connection refused'; in cases where it does not have connectivity it would hang - but is there a better way/more definitive? I need to tell users that are installing filebeat a definitive way so we do not even go with the install if the connectivity is not working (opening ports is separate task in a sense that we still need to figure out what exactly is needed to establish that connectivity).



If the telnet utility is available, that can easily be used to test for an open port.

$ telnet 443
Connected to
Escape character is '^]'.
Connection closed by foreign host. 

Let me know if that helps

Yes - that works well - thanks!

just for checking a tcp port being available I prefer netcat over telnet though (besides telnet client being available mostly on any system): $ nc -zv <host> <port>. Ncat is a modern netcat on steroids.

1 Like

Thank you - we do not have it installed on all VMs so I had to look for different approach - but thanks regardless.

This topic was automatically closed after 21 days. New replies are no longer allowed.