{"id":17941785,"url":"https://github.com/Ibrahimghali/ELK_setup_auto","last_synced_at":"2025-03-24T13:33:20.964Z","repository":{"id":259210753,"uuid":"876355169","full_name":"Ibrahimghali/ELK_setup_auto","owner":"Ibrahimghali","description":"The repository provides an automated way to set up an Elasticsearch cluster across multiple nodes with kibana using encoded setup scripts. The project includes Python scripts for node configuration and Shell scripts to trigger the setup process.","archived":false,"fork":false,"pushed_at":"2024-11-16T23:40:27.000Z","size":40,"stargazers_count":7,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-17T19:04:38.756Z","etag":null,"topics":["bash","elasticsearch","kibana","nosql-database"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Ibrahimghali.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-10-21T20:34:27.000Z","updated_at":"2024-12-30T22:30:44.000Z","dependencies_parsed_at":null,"dependency_job_id":"2fd24062-4a7a-464b-a155-5533523bf24c","html_url":"https://github.com/Ibrahimghali/ELK_setup_auto","commit_stats":null,"previous_names":["ibrahimghali/elasticsearch_setup_auto","ibrahimghali/elk_setup_auto"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ibrahimghali%2FELK_setup_auto","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ibrahimghali%2FELK_setup_auto/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ibrahimghali%2FELK_setup_auto/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ibrahimghali%2FELK_setup_auto/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Ibrahimghali","download_url":"https://codeload.github.com/Ibrahimghali/ELK_setup_auto/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245031146,"owners_count":20549912,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bash","elasticsearch","kibana","nosql-database"],"created_at":"2024-10-29T02:04:10.851Z","updated_at":"2025-03-24T13:33:20.955Z","avatar_url":"https://github.com/Ibrahimghali.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ELK Setup Automation\n\nThis repository provides an automated way to set up an Elasticsearch cluster across multiple nodes using obfuscated setup scripts. The project includes encoded scripts for node configuration and multiple trigger scripts to execute them.\n\n## Project Structure\n\n```plaintext\nelasticsearch_setup_auto/\n├── LICENSE\n├── README.md\n├── src\n│   ├── kibana_setup.py\n│   ├── logstash_setup.py\n│   ├── node1_setup.py\n│   ├── node2_setup.py\n│   └── node3_setup.py\n└── trigger\n    ├── kibana_runner.sh\n    ├── logstash_runner.sh\n    ├── node1_runner.sh\n    ├── node2_runner.sh\n    └── node3_runner.sh\n```\n\n## How to Use\n\nFollow the steps below to set up your Elasticsearch cluster.\n\n### 1. Clone the Repository\n\nFirst, clone the repository to your local machines (3 nodes):\n\n```bash\ngit clone https://github.com/Ibrahimghali/elasticsearch_setup_auto.git\n```\n\nNavigate to the project directory:\n\n```bash\ncd elasticsearch-setup\n```\n\n### 2. Know Your Node IP Addresses\n\nBefore running the setup scripts, ensure you know the IP addresses of the three nodes you will be configuring. This is crucial for the proper setup and communication between the nodes.\n\n```bash\nip a\n```\n\n### 3. Run the Trigger Script\n\nNavigate to the `trigger/` directory, which contains the encoded setup scripts:\n\n```bash\ncd trigger\n```\n\nRun the trigger script to decode and execute the node setup scripts. Choose the appropriate trigger script based on the node you want to set up:\n\n```bash\nbash node1_runner.sh  # For node-1 (elasticsearch)\nbash node2_runner.sh # For node-2 (elasticsearch)\nbash node3_runner.sh # For node-3 (elasticsearch)\nbash kibana_runner.sh # For Kibana node\n```\n\nThe selected script will automatically decode and set up the Elasticsearch cluster for the corresponding node based on the encoded files. Ensure the IP addresses of your nodes are properly configured during the process.\n\n### 4. Verify the Cluster\n\n#### 4.1. Check the Cluster Health\n\nAfter executing the setup scripts, verify the cluster's health by running the following command on any node:\n\n```bash\ncurl -X GET \"localhost:9200/_cluster/health?pretty\"\n```\n\nThis command provides details about the health and status of your Elasticsearch cluster.\n\n#### 4.2. Check Node Information\n\nTo get detailed information about the nodes in your Elasticsearch cluster, use the following command:\n\n```bash\ncurl -X GET \"localhost:9200/_cat/nodes?v\"\n```\n\nThis command displays a tabular view of the nodes, including their IP addresses, roles, and other relevant details.\n\n### 5. Restart Elasticsearch if Nodes Are Not Running\n\nIf you find that not all nodes are running, restart the Elasticsearch service on the affected nodes using the following command:\n\n```bash\nsudo systemctl restart elasticsearch.service\n```\n\nIf you find that not all three nodes are running, you can restart the Elasticsearch service on the affected nodes using the following command:\n\n```bash\nsudo systemctl restart elasticsearch.service\n```\n\nIf you find that not all three nodes are running, you can restart the Elasticsearch service on the affected nodes using the following command:\n\n```bash\nsudo systemctl restart elasticsearch.service\n```\n\nTo check the status and verify Kibana is properly running, you can add the following note to the README file:\n\n### 6. Verify Kibana\n\nAfter setting up Kibana and Elasticsearch, you can verify Kibana's status by checking if the Kibana service is running and then accessing its web interface.\n\n#### 6.1. Check Kibana Service Status\n\nRun the following command on the machine where Kibana is installed to check if the service is active:\n\n```bash\nsudo systemctl status kibana\n```\n\nIf Kibana is running, you should see output indicating that the service is active (running).\n\n#### 6.2. Access Kibana Web Interface\n\nKibana provides a web-based interface that you can access using a web browser. By default, Kibana runs on port 5601. Open a browser and go to the following URL:\n\n```bash\nhttp://\u003cKIBANA_NODE_IP\u003e:5601\n```\n\nReplace `\u003cKIBANA_NODE_IP\u003e` with the IP address of the node where Kibana is installed. You should be able to see the Kibana dashboard.\n\n#### 6.3. Verify Kibana's Connection to Elasticsearch\n\nOnce you're in the Kibana web interface, you can check if Kibana is properly connected to Elasticsearch by navigating to **Stack Monitoring** or **Dev Tools**. In **Dev Tools**, run the following command:\n\n```bash\nGET _cat/health?v\n```\n\nThis will return the health of your Elasticsearch cluster, and if Kibana is properly connected, it should display the cluster's health status.\n\n## Logs\n\nThe setup scripts generate logs for each step of the process, providing details about success or failure. These logs help track the progress and troubleshoot any issues during setup.\n\n## Additional Notes\n\n- Make sure to review the [Elasticsearch documentation](https://www.elastic.co/guide/en/elasticsearch/reference/index.html) for detailed configuration options and best practices.\n\n## License\n\nThis project is licensed under the MIT License. See the [LICENSE](LICENSE) file for more details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FIbrahimghali%2FELK_setup_auto","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FIbrahimghali%2FELK_setup_auto","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FIbrahimghali%2FELK_setup_auto/lists"}