Here, I provide the Procedure what I follow to setup a Elastic Search and Kibana on GCP Vm's:
- Created a 2 Vm's of Es and Kibana with Reserved Internal and External Ip's.
- Successfully Deployed Es and Kibana Debian packages On respective Vm's.
- Successfully Reconfigured the YAML files for both ES and Kibana i.e;
elasticsearch.yml:
node.name: elasticsearch
path.data: /var/lib/elasticsearch
path.logs: /var/log/elasticsearch
network.host: Internal_ip addr of elasticseach
http.port: 9200
Kibana.yml:
server.port: 5601
server.host: "Internal_IP addr of Kibana"
server.publicBaseUrl: "http://Internal_IP addr Of Kibana:5601"
elasticsearch.hosts: ["https://Internal_IP Addr of Elasticsearch:9200"]
elasticsearch.username: "elastic"
elasticsearch.password: "xxxxxxxx"
elasticsearch.ssl.certificateAuthorities: [ "/etc/kibana/certs/http_ca.crt" ]
4.Successfully Set the required ports(9200 and 5601) on Respectve Vm's.
firewall-cmd --list-all
public
target: default
icmp-block-inversion: no
interfaces:
sources:
services: ssh dhcpv6-client
ports: 5601/tcp
protocols:
masquerade: no
forward-ports:
source-ports:
icmp-blocks:
rich rules:
public
target: default
icmp-block-inversion: no
interfaces:
sources:
services: ssh dhcpv6-client
ports: 9200/tcp 9200/udp
protocols:
masquerade: no
forward-ports:
source-ports:
icmp-blocks:
rich rules:
5. So, I saw the messages of Es and Kibana are active after the starting the services
6. When I connect to my elastic Instance from Terminal
curl -XGET -u elastic https://Internal_IP addr of elasticsearch:9200 -k
output:
```
{
"name" : "elasticsearch",
"cluster_name" : "elasticsearch",
"cluster_uuid" : "U0_1cpklQ2yitFxJZ5XJTA",
"version" : {
"number" : "8.7.0",
"build_flavor" : "default",
"build_type" : "deb",
"build_hash" : "09520b59b6bc1057340b55750186466ea715e30e",
"build_date" : "2023-03-27T16:31:09.816451435Z",
"build_snapshot" : false,
"lucene_version" : "9.5.0",
"minimum_wire_compatibility_version" : "7.17.0",
"minimum_index_compatibility_version" : "7.0.0"
},
"tagline" : "You Know, for Search"
}
- When I connect to my Kibana Instance from Terminal
curl -XGET "https://Internal_Ip Addr of Kibana:5601"
Output:
curl: (7) Failed to connect to 10.x.x.x port 5601: Connection refused
So can anyone help me to solve