Skip to content

Automated multi-node Elasticsearch cluster deployment with Kibana and Logstash using Python and shell scripts.

License

Notifications You must be signed in to change notification settings

Malek-logh/ELK_setup_auto

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ELK Cluster Automated Deployment

This project provides a fully automated method to deploy a 3-node Elasticsearch cluster along with Kibana and Logstash. All setup tasks are handled through Python automation scripts and lightweight runner scripts that execute the installation steps on each node.

Project Structure

ELK_setup_auto/
│
├── LICENSE
├── README.md
├── src/
│   ├── kibana_setup.py
│   ├── logstash_setup.py
│   ├── node1_setup.py
│   ├── node2_setup.py
│   └── node3_setup.py
│
└── trigger/
    ├── kibana_runner.sh
    ├── logstash_runner.sh
    ├── node1_runner.sh
    ├── node2_runner.sh
    └── node3_runner.sh

Overview

Each node (Elasticsearch 1–3, Kibana, and Logstash) is configured using Python scripts that handle installation, configuration, and service setup. The trigger scripts execute the appropriate setup logic for the target node.

Setup Instructions

1. Determine Node IPs

Before running any script, identify each machine's IP address:

ip a

Correct IP assignment is required for cluster formation.

2. Run Node Setup

Navigate to the trigger directory containing the runner scripts:

cd trigger

Execute the script for the corresponding node:

bash node1_runner.sh      # Elasticsearch node 1
bash node2_runner.sh      # Elasticsearch node 2
bash node3_runner.sh      # Elasticsearch node 3
bash kibana_runner.sh     # Kibana node
bash logstash_runner.sh   # Logstash node

Each script decodes its setup logic and configures the full ELK stack for that node.

3. Verify Cluster Status

Check cluster health:

curl -X GET "localhost:9200/_cluster/health?pretty"

List nodes:

curl -X GET "localhost:9200/_cat/nodes?v"

4. Restart Services

If any Elasticsearch node fails to join:

sudo systemctl restart elasticsearch.service

If Kibana fails:

sudo systemctl status kibana
sudo systemctl restart kibana

Access Kibana web interface at:

http://<KIBANA_IP>:5601

5. Logs

All scripts generate logs to help track progress and troubleshoot any setup issues.

License

This project is licensed under the MIT License. See the LICENSE file for details.

About

Automated multi-node Elasticsearch cluster deployment with Kibana and Logstash using Python and shell scripts.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published