{"id":18310716,"url":"https://github.com/srikanth-josyula/springboot-elk-stack-example","last_synced_at":"2025-09-03T05:35:51.513Z","repository":{"id":225651350,"uuid":"766508755","full_name":"srikanth-josyula/springboot-elk-stack-example","owner":"srikanth-josyula","description":"Sample Spring Boot application, integrated with the ELK (Elasticsearch, Logstash, Kibana) stack for centralized log management and analysis.","archived":false,"fork":false,"pushed_at":"2024-03-04T15:32:04.000Z","size":7790,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-15T05:45:45.355Z","etag":null,"topics":["elasticsearch","elk","elk-stack","kibana","logging","logstash","spring-boot"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/srikanth-josyula.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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-03-03T13:16:53.000Z","updated_at":"2025-01-19T08:00:53.000Z","dependencies_parsed_at":"2024-12-23T05:23:23.732Z","dependency_job_id":"cc44f842-58ff-4c14-9a98-64fbd5c73022","html_url":"https://github.com/srikanth-josyula/springboot-elk-stack-example","commit_stats":null,"previous_names":["srikanth-josyula/springboot-elk-example","srikanth-josyula/springboot-elk-stack-example"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/srikanth-josyula%2Fspringboot-elk-stack-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/srikanth-josyula%2Fspringboot-elk-stack-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/srikanth-josyula%2Fspringboot-elk-stack-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/srikanth-josyula%2Fspringboot-elk-stack-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/srikanth-josyula","download_url":"https://codeload.github.com/srikanth-josyula/springboot-elk-stack-example/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248035005,"owners_count":21037085,"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":["elasticsearch","elk","elk-stack","kibana","logging","logstash","spring-boot"],"created_at":"2024-11-05T16:15:19.741Z","updated_at":"2025-04-09T11:47:42.458Z","avatar_url":"https://github.com/srikanth-josyula.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Spring Boot ELK Example\n\nThis repository contains a simple example demonstrating how to set up logging with Spring Boot applications and integrate them with the ELK (Elasticsearch, Logstash, Kibana) stack for centralized log management and analysis.\n\n## Architecture Overview\n\nIn this setup, a Spring Boot application communicates with Logstash to send its logs. Logstash processes these logs and forwards them to Elasticsearch for storage and indexing. Kibana, running on a separate port, provides a user-friendly interface to visualize and analyze the logs stored in Elasticsearch.\n\n-  \u003cimg src=\"https://github.com/srikanth-josyula/springboot-elk-stack-example/blob/main/docs/ELK1.png\" width=\"750\" height=\"400\"\u003e\n\n- **Spring Boot Application:** Generates logs which are collected by Logstash. This is facilitated by the `logstash.conf` file, which needs to be created. In this configuration file, specify the input file path and the output Elasticsearch host along with its port.\n- **Logstash**: Collects logs from the Spring Boot application and sends them to Elasticsearch.\n- **Elasticsearch**: Stores and indexes the logs received from Logstash.\n- **Kibana**: Provides a web interface to interact with Elasticsearch, allowing users to visualize and analyze logs.\n\n-  \u003cimg src=\"https://github.com/srikanth-josyula/springboot-elk-stack-example/blob/main/docs/ELK3.png\" width=\"750\" height=\"400\"\u003e\n\n## ELK Setup\nFind Detailed Steps involved [Steps for ELK Setup](https://github.com/srikanth-josyula/springboot-elk-stack-example/blob/main/docs/Springboot%20%20ELKs%20Setup.pdf)\n\n### Starting the Spring Boot Application Locally\n1. Clone the repository containing the Spring Boot application to your local machine.\n2. Do a mvn clean install\n3. mvn spring-boot:run\n\n### Install Elasticsearch\n1. Visit [Elasticsearch Downloads](https://www.elastic.co/downloads/elasticsearch) and download the appropriate file for your system.\n2. Extract the downloaded tar file and navigate to the Elasticsearch bin directory (e.g., `${location}/elasticsearch-8.12.2/bin`)\n3. Run `./elasticsearch` to start Elasticsearch. Access `localhost:9200` in your browser to verify successful startup. If issues arise, consider disabling X-Pack security by running `./elasticsearch -E xpack.security.enabled=false`.\n4. Note that starting from Elasticsearch 8, SSL/TLS is enabled by default for HTTP clients. If you encounter a warning message regarding server certificate trust, ensure your browser trusts the certificate or disable SSL in the `elasticsearch.yml` configuration.\n\n### Install Logstash\n1. Get Logstash from [Logstash Downloads](https://www.elastic.co/downloads/logstash).\n2. Create a `logstash.conf` file specifying the location of your logs for Logstash to ingest.\n3. In `logstash.conf`, define the input source (e.g., file location) and the output destination (your Elasticsearch host).\n4. Launch Logstash by running `./logstash -f /path/to/logstash.conf`. Access Logstash console logs via `http://localhost:9600/`.\n\n### Install Kibana\n1. Download Kibana from [Kibana Downloads](https://www.elastic.co/downloads/kibana).\n2. Extract the tar file and navigate to the Kibana config directory. Open the `.yml` file and enable the Elasticsearch host to ensure Kibana can communicate with Elasticsearch.\n3. Navigate to the Kibana bin directory and start Kibana with `kibana.sh`. Access Kibana at `http://localhost:5601/`.\n\n## View Logs in Kibana\n1. Visit `http://localhost:9200/_cat` to view all available categories. Navigate to `http://localhost:9200/_cat/indices` to see the internally created indexes.\n2. Open Kibana and navigate to Analytics. Create a data view by selecting index patterns. Upon saving, access the logs via the Discover tab, where you can view logs and related details in JSON format.\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsrikanth-josyula%2Fspringboot-elk-stack-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsrikanth-josyula%2Fspringboot-elk-stack-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsrikanth-josyula%2Fspringboot-elk-stack-example/lists"}