Filebeat had issue with low open limits which was defaulted to 1024. It his this issue probably due to issue with elasticsearch having problem and connection wasn't established
After fixing the ulimit 'ulimit -n 65536' , i had to restart the filebeat. Once restarted, it was able to establish connection to elasticsearch and send logs.
However it didn't send logs that were missed during the time it had issues? Is filebeat not supposed to send olds logs