{"id":27241584,"url":"https://github.com/philkra/springboot2beat","last_synced_at":"2025-10-23T21:26:04.849Z","repository":{"id":57567476,"uuid":"144754976","full_name":"philkra/springboot2beat","owner":"philkra","description":"Springboot2beat is a Metricbeat that leverages the micrometer.io application metrics facade via web, which is an instrumentation framework integrated in the Spring Boot framework starting with version 2.","archived":false,"fork":false,"pushed_at":"2018-08-16T17:47:39.000Z","size":23400,"stargazers_count":10,"open_issues_count":1,"forks_count":4,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-06-20T05:07:56.869Z","etag":null,"topics":["beats","elastic","micrometer","spring-boot-2"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/philkra.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-08-14T18:00:40.000Z","updated_at":"2020-12-03T21:37:11.000Z","dependencies_parsed_at":"2022-08-28T07:40:16.135Z","dependency_job_id":null,"html_url":"https://github.com/philkra/springboot2beat","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/philkra%2Fspringboot2beat","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/philkra%2Fspringboot2beat/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/philkra%2Fspringboot2beat/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/philkra%2Fspringboot2beat/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/philkra","download_url":"https://codeload.github.com/philkra/springboot2beat/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248286524,"owners_count":21078508,"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":["beats","elastic","micrometer","spring-boot-2"],"created_at":"2025-04-10T19:58:24.473Z","updated_at":"2025-10-23T21:26:04.771Z","avatar_url":"https://github.com/philkra.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Springboot2beat\n\nWelcome to Springboot2beat.\n\nSpringboot2beat is a [Metricbeat](https://www.elastic.co/guide/en/beats/metricbeat/master/index.html) that leverages the [micrometer.io](http://micrometer.io/) application metrics facade via web, which is an instrumentation framework integrated in the [Spring Boot framework starting with version 2](https://spring.io/blog/2018/03/16/micrometer-spring-boot-2-s-new-application-metrics-collector). All by the endpoint exposed metrics are ingested.\n\n## Getting Started with Springboot2beat\n\n### Requirements\nIn order to allow access to Spring's metrics actuator endpoint, you need to add the following dependency:\n```xml\n\u003cdependency\u003e\n    \u003cgroupId\u003eorg.springframework.boot\u003c/groupId\u003e\n    \u003cartifactId\u003espring-boot-starter-actuator\u003c/artifactId\u003e\n\u003c/dependency\u003e\n```\nThe web app's application config `src/main/resources/application.yaml` must be adapted to expose the metrics endpoint. Please refer to the [Exposing Endpoints](https://docs.spring.io/spring-boot/docs/current/reference/html/production-ready-endpoints.html#production-ready-endpoints-exposing-endpoints) of the Spring Boot documentation to see which actuator endpoints are enabled for web access by default, in case you are depending on default functionality.\n```yaml\nmanagement:\n    endpoints:\n        web.exposure.include: metrics\n    server:\n        port: 9001\n        address: 127.0.0.1\n```\nA security based suggestion would be change the management port and accessible hosts to ensure the actuator endpoints are not accessible to the public, [documentation](https://docs.spring.io/spring-boot/docs/current/reference/html/production-ready-monitoring.html#production-ready-customizing-management-server-address).\n\nIn order to view all available metrics:\n```bash\ncurl -XGET http://HOST:PORT/actuator/metrics\n```\n\n### Config\nIn the `springboot2beat.yml` file you need to set the host name of the \"to be watched\" Spring Boot 2 web app. Furthermore, is this the place where you define the ingestion service, may that be logstash or elasticsearch.\n\n### Run\nTo run Springboot2beat:\n```\n./springboot2beat -c springboot2beat.yml -e\n```\n\n## Example Document\n```json\n{\n        \"_index\": \"springboot2beat-7.0.0-alpha1-2018.08.14\",\n        \"_type\": \"doc\",\n        \"_id\": \"T9MUOmUB2ZEe1SMHweUN\",\n        \"_score\": null,\n        \"_source\": {\n          \"@timestamp\": \"2018-08-14T20:16:02.339Z\",\n          \"tomcat_global_received_count\": 0,\n          \"tomcat_global_request_max_value\": 0.3569999933242798,\n          \"tomcat_sessions_active_current_value\": 0,\n          \"tomcat_sessions_active_max_value\": 0,\n          \"tomcat_sessions_expired_count\": 0,\n          \"tomcat_sessions_alive_max_value\": 0,\n          \"jvm_memory_committed_value\": 854982656,\n          \"jvm_gc_pause_max\": 0,\n          \"jvm_gc_pause_count\": 4,\n          \"jvm_memory_used_value\": 429412576,\n          \"tomcat_global_request_count\": 106,\n          \"host\": {\n            \"name\": \"webapp003.my.network.example.com\"\n          },\n          \"jvm_threads_peak_value\": 64,\n          \"jvm_memory_max_value\": 4518313984,\n          \"http_server_requests_total_time\": 0.7595910429954529,\n          \"system_cpu_usage_value\": 0.10866666585206985,\n          \"jvm_gc_memory_promoted_count\": 13190224,\n          \"type\": \"Philips-iMac.home\",\n          \"http_server_requests_max\": 0.011510051786899567,\n          \"tomcat_sessions_rejected_count\": 0,\n          \"beat\": {\n            \"name\": \"webapp003\",\n            \"hostname\": \"webapp003.my.network.example.com\",\n            \"version\": \"7.0.0-alpha1\"\n          },\n          \"tomcat_global_error_count\": 84,\n          \"http_server_requests_count\": 106,\n          \"jvm_buffer_count_value\": 101,\n          \"jvm_buffer_memory_used_value\": 843776,\n          \"system_load_average_1m_value\": 2.9775390625,\n          \"jvm_gc_memory_allocated_count\": 776123776,\n          \"jvm_gc_max_data_size_value\": 2147483648,\n          \"tomcat_global_request_total_time\": 0.9649999737739563,\n          \"jvm_buffer_total_capacity_value\": 835584,\n          \"jvm_threads_daemon_value\": 54,\n          \"jvm_gc_pause_total_time\": 0.652999997138977,\n          \"jvm_threads_live_value\": 61,\n          \"tomcat_sessions_created_count\": 0\n        }\n      }\n```\n\n## TODO's\n- [x] Option to add a list of metrics endpoints that can be excluded\n- [ ] Tests\n- [ ] leverage micrometer's [Percentiles, Histogram and SLA](https://micrometer.io/docs/concepts#_histograms_and_percentiles) feature, if possible\n- [ ] create Kibana dashboards\n\n## Developer Reference\nPlease refer to the developers guide using this link [here](https://github.com/philkra/springboot2beat/blob/development/docs/developer-guide.md).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphilkra%2Fspringboot2beat","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fphilkra%2Fspringboot2beat","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphilkra%2Fspringboot2beat/lists"}