org.opensearch.transport.ConnectTransportException: [opensearch-cluster-master-18][10.42.2.20:9300] connect_timeout[30s]

I don’t recommend sending logs directly to opensearch from filebeat at big scale. You’ll want some kind of messaging queue, like kafka.