---
# System prepended metadata

title: ELK installation

---

# ELK installation 

## elasticsearch :-

link:- https://www.elastic.co/guide/en/elasticsearch/reference/current/rpm.html (Install ES with RPM)
in elasticsearh.yml
/etc/elasticsearch/elasticsearch.yml
change the below 
network.host: "localhost"
http.port: 9200
cluster.initial_master_nodes: ["<PrivateIP"]
https://logz.io/blog/install-elk-stack-amazon-aws/

## kibana :-

link:- https://www.elastic.co/guide/en/kibana/current/rpm.html#rpm-running-init (Install Kibana with RPM)
Notes:- 
1). Open the Kibana configuration file for editing:
           sudo vi /opt/kibana/config/kibana.yml
 
2). In the Kibana configuration file, find the line that specifies server.host, and replace the IP address (“0.0.0.0” by   default) with “localhost”:
   
   server.host: "localhost" replace with server.host: "0.0.0.0"
 
3). Save and exit.

## logstash :-

link:- https://www.elastic.co/guide/en/logstash/current/installing-logstash.html (Install Logstash with RPM)

## filebeat 


link : https://www.elastic.co/guide/en/beats/filebeat/7.11/filebeat-installation-configuration.html
Important : Please use rpm tab for the installation 
Steps : 
        link : <ip:port>/app/home#/tutorial/elasticsearchLogs  >> steps 
        1. installation 
        2. go to /etc/filebeat/filebeat.yml
            output.elasticsearch:
              hosts: ["<es_url>"]
              username: "elastic"
              password: "<password>"
            setup.kibana:
              host: "<kibana_url>"   #kibana URL = <AWS_privateIP:PORT>
              in our case  : filebeat export config
                setup:
                  kibana:
                    host: http://172.31.45.225:5601
        3. filebeat modules enable elasticsearch 
       
       
       
       
      ## Kafka run the below command from bin folder 
       /home/ec2-user/kafka/bin
      ./zookeeper-server-start.sh -daemon ../config/zookeeper.properties
      ./kafka-server-start.sh -daemon ../config/server.properties
      
      
      kubernetes
      
      https://www.magalix.com/blog/kubernetes-observability-log-aggregation-using-elk-stack