Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/gasperlf/spring-boot-monitoring

monitoring services with spring boot, prometheus and grafana
https://github.com/gasperlf/spring-boot-monitoring

actuator-spring-boot bash-script docker docker-compose grafana grafana-dashboard java11 maven postman-collection prometheus spring-boot

Last synced: 3 days ago
JSON representation

monitoring services with spring boot, prometheus and grafana

Awesome Lists containing this project

README

        

[![Twitter](https://img.shields.io/github/followers/gasperlf.svg?label=Follow%20Me&logo=twitter&style=social)](https://twitter.com/gasper_lf)

# spring-boot-monitoring
Example how to monitoring microservices with spring boot, Spring Actuator, Prometheus and Grafana.

## Getting Started
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

git clone https://github.com/gasperlf/spring-boot-monitoring.git

## Prerequisites

- Java 11
- Spring boot 2.2.4
- Docker
- Docker compose
- Prometheus
- Grafana
- YahooFinanceAPI Library (https://financequotes-api.com/)
- Postman

## Model
ms-model-1

## IDE's

1. Eclipse
2. Intellij IDEA

##Running
### Components

1. api-finance-service
2. api-finance-service-reactive
3. prometheus
4. Grafana

### Command

1. `mvn clean package` compile and create artifacts.

2. ` docker-compose up -d` create docker image and run in a container.

Also you can use bash script `start.sh` that contains both commands.

### See monitoring in grafana

First in your browser `http://localhost:3000`

next Log in with user and password admin/admin
then create a datasource, select prometheus.
in this step you need to set URL from prometheus service, in this case `http://[docker-container]:9090` (check docker compose name)
after that you can import a dashboard that I have included in Grafana folder, I prefer to use `jvm-micrometer_rev9.json`
check when you imported the dashboard choose the datasource created before.
and that is all.

ms-grafana-1

## Postman

#### Api-finance-service
ms-api-finance-service-1

#### Api-finance-service-reactive
ms-api-finance-service-reactibe-1

## Contributing

## Versioning

0.0.1-snapshot

## Authors

- Lewis Florez Renza

## License

## Acknowledgments