{"id":15169936,"url":"https://github.com/alexanderlapygin/spring-boot-prometheus","last_synced_at":"2026-01-23T13:47:23.490Z","repository":{"id":165147052,"uuid":"640524911","full_name":"AlexanderLapygin/spring-boot-prometheus","owner":"AlexanderLapygin","description":"Spring Boot HelloWorld with monitoring on Prometheus","archived":false,"fork":false,"pushed_at":"2023-05-31T20:33:03.000Z","size":77,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-12-25T12:21:00.927Z","etag":null,"topics":["actuator","java","monitoring","prometheus","softspiders","spring","spring-boot","ss","starter","template"],"latest_commit_sha":null,"homepage":"","language":"Java","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/AlexanderLapygin.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":"2023-05-14T11:38:30.000Z","updated_at":"2023-05-26T14:03:37.000Z","dependencies_parsed_at":null,"dependency_job_id":"2aae91b2-8a68-4497-b9d2-df80f3a647a3","html_url":"https://github.com/AlexanderLapygin/spring-boot-prometheus","commit_stats":null,"previous_names":[],"tags_count":0,"template":true,"template_full_name":"AlexanderLapygin/spring-boot-actuator","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlexanderLapygin%2Fspring-boot-prometheus","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlexanderLapygin%2Fspring-boot-prometheus/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlexanderLapygin%2Fspring-boot-prometheus/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlexanderLapygin%2Fspring-boot-prometheus/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AlexanderLapygin","download_url":"https://codeload.github.com/AlexanderLapygin/spring-boot-prometheus/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239194978,"owners_count":19598032,"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":["actuator","java","monitoring","prometheus","softspiders","spring","spring-boot","ss","starter","template"],"created_at":"2024-09-27T07:41:20.368Z","updated_at":"2026-01-23T13:47:23.423Z","avatar_url":"https://github.com/AlexanderLapygin.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n    \u003ca href=\"https://github.com/softspiders/softspiders\"\u003e\n      \u003cimg src=\"https://avatars.githubusercontent.com/u/47006425?v=4\"width=\"100\" height=\"100\"/\u003e\n    \u003c/a\u003e\n\u003c/div\u003e \n\n# Spring Boot application starter exporting metrics for Prometheus\n\n\n## Feature tags\n\n- actuator\n- maven\n- prometheus\n- spring-boot\n- starter\n- swagger\n- template\n\n---\n\n## Direct ancestor\n\n[- prometheus](https://github.com/AlexanderLapygin/spring-boot-actuator#readme)\n\n---\n\n## Author\n\n[Alexander Lapygin](https://github.com/AlexanderLapygin) \u003c\u003calexanderlapygin@gmail.com\u003e\u003e\n\n---\n\n## Run\n\n```sh\nmvnw spring-boot:run\n```\n\n# Check Swagger\n\nTake a look at http://localhost:8080/swagger-ui.html.\n\n# Check Actuator\n\nTake a look at actuator endpoints at http://localhost:8080/actuator.\n\n# Check how the actuator exports metrics for Prometheus\n\nTake a look at actuator endpoints at http://localhost:8080/actuator/prometheus.\n\n# Setting up and running Prometheus locally\n\nTo set up Prometheus for monitoring your Spring Boot application, follow these steps:\n\n1. Download the [latest release](https://prometheus.io/download/) of Prometheus for your operating system.\n2. Extract the files from the archive.\n3. Open the `prometheus.yml` configuration file in a text editor.\n4. Add the following job to the `scrape_configs` section:\n```yaml\n- job_name: 'spring'\n  metrics_path: '/actuator/prometheus'\n  static_configs:\n    - targets: ['localhost:8080']\n```\nThis configuration tells Prometheus to scrape metrics from the `/actuator/prometheus` endpoint of your Spring Boot application running on `localhost:8080`.\n5. Save the `prometheus.yml` file and start Prometheus locally by running the `prometheus` executable:\n```shell\nprometheus --config.file=prometheus.yml\n```\n6. Open Prometheus in your web browser by going to `http://localhost:9090`.\n7. In the query field (\"Expression\"), enter the name of the metric associated with the /hello query. For example, if you used the following configuration to enable /hello monitoring:\n```\nhttp_server_requests_seconds_bucket{uri=\"/hello\"}\n```\n8. Select \"Graph\" from the top menu.\n9. Click the \"Execute\" button.\n\nThat's it! Now you have Prometheus set up to monitor your Spring Boot application and collect metrics.\n\n# Setting up and running Grafana locally\n\nTo set up Grafana for monitoring your Spring Boot application, follow these steps:\n\n1. Download the [latest release](https://grafana.com/grafana/download) of Grafana for your operating system.\n2. Run the installer and follow the instructions on the screen. Select the installation path and other settings as needed.\n3. Start Grafana located in the bin directory from the command line:\n```sh\ngrafana-server\n```\n4. Open a browser and enter http://localhost:3000/ to open the Grafana web interface.\n5. On first launch, you will be prompted to log in. The default administrator username and password is *admin*.\n6. After logging in, you can set up data sources and create dashboards to visualize metrics.\n\n### License\n\nLicensed under the [MIT license](./LICENSE)\n\n---\n\n[SOFTSPIDERS](https://github.com/softspiders/softspiders)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falexanderlapygin%2Fspring-boot-prometheus","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falexanderlapygin%2Fspring-boot-prometheus","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falexanderlapygin%2Fspring-boot-prometheus/lists"}