Skip to content
Snippets Groups Projects

Resolve "Actuator"

Merged Alžbeta Hajná requested to merge 11-actuator into develop
4 files
+ 3959
2
Compare changes
  • Side-by-side
  • Inline
Files
4
+ 20
1
@@ -164,10 +164,29 @@ docker-compose down
## Collecting Metrics
Create network for being able to communicate between two separate
docker images
```bash
docker network create grafana-prometheus
```
To collect the metrics in an automated way we use Prometheus.
First, make sure that every service you want to observe is running on predefined port.
Then run Prometheus in docker with respect to location of `prometheus.yml` file:
```bash
docker run --rm --name prometheus -p 9090:9090 -v ${PWD}/prometheus.yml:/etc/prometheus/prometheus.yml prom/prometheus:v2.43.0 --config.file=/etc/prometheus/prometheus.yml
docker run --rm --name prometheus --network grafana-prometheus --network-alias prometheus -p 9090:9090 -v ${PWD}/prometheus.yml:/etc/prometheus/prometheus.yml prom/prometheus:v2.43.0 --config.file=/etc/prometheus/prometheus.yml
```
## Grafana
Run Grafana in separate container:
```bash
docker run --rm --name grafana --network grafana-prometheus -p 3000:3000 grafana/grafana:9.1.7
```
1. Log into Grafana with default user and password is `admin`.
2. Add data source in Configuration -> Data sources (http://prometheus:9090)
3. Import Dashboard as JSON file (two options provided)
Loading