Currently I have deployed Elasticstack (ELK) on AWS EKS and Im using NodePort service for all the application
My elasticsearch is running at- 54.2xx.xxx.xxx:30092/ (Which is the public IP address of EC2).
I have lambda function for functionbeat which is running in the same VPC, in a Private subnet with a NAT gateway.
I tried to connect with elasticsearch using Public and Private IP for EC2 instance but it is giving me error-
-
Error dialing dial tcp 172.xx.xxx.190:30092: i/o timeout
-
Failed to connect to backoff(elasticsearch(http://172.xx.xxx.190:30092)): Get \"http://172.xx.xxx.190:30092\": net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)
I have tried elasticsearch output config as-
output.elasticsearch:
# Array of hosts to connect to.
hosts: ["172.31.xxx.190:30092"]
# Protocol - either `http` (default) or `https`.
protocol: "http"
and
output.elasticsearch:
# Array of hosts to connect to.
hosts: ["54.242.xxx.146:30092"]
# Protocol - either `http` (default) or `https`.
protocol: "http"