You have not done what i requested and shown as an example in my last post.
This will not work - the last argument must be the host you want to connect to.
from the help
usage: agent_elasticsearch [-h] [-u USER] [-s PASSWORD] [-P PROTO] [-p PORT] [-m MODULES] [--debug] HOSTNAME [HOSTNAME ...]
Please do this and provide the output. What you can do to test if you can reach the elasticsearch instance ist the very easy curl to the isntance.
curl host-ip:port/
This must work if you have no username and password for authentication.