Skip to content

Commit

Permalink
Fix example/grafana-integration
Browse files Browse the repository at this point in the history
* Update Grafana/Loki/Prom pinned versions (especially to get Grafana UI improvements)
* Pin Jaeger/hotrod tags to prevent future issues
* Fix traces endpoint config for hotrod (traces export: Post "http://localhost:4318/v1/traces":
  dial tcp 127.0.0.1:4318: connect: connection refused)
* Fix hotrod metrics scraping (endpoint has moved to the frontend service)
* Fix Grafana dashboard (metric names, labels, migrate to new time series panel)
* Add default Grafana credentials to README
* Fix the loki container being stuck on shutdown by setting shorter
  timeouts (bug with the driver: grafana/loki#2361 (comment))
  • Loading branch information
angristan committed Dec 1, 2023
1 parent 1dd4b60 commit 5ba0c11
Show file tree
Hide file tree
Showing 4 changed files with 481 additions and 1,922 deletions.
4 changes: 2 additions & 2 deletions examples/grafana-integration/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ grafana/loki-docker-driver:latest \

### Run the services

`docker-compose up`
`docker-compose up`

### Access the services
* HotROD application at http://localhost:8080
* Grafana UI at http://localhost:3000
* Grafana UI at http://localhost:3000 (default credentials: admin/admin)

### Explore with Loki

Expand Down
20 changes: 12 additions & 8 deletions examples/grafana-integration/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: '2'

services:
grafana:
image: grafana/grafana:7.1.4
image: grafana/grafana:10.2.2
ports:
- '3000:3000'
volumes:
Expand All @@ -15,7 +15,7 @@ services:
loki-url: 'http://localhost:3100/api/prom/push'

loki:
image: grafana/loki:master
image: grafana/loki:2.9.2
ports:
- '3100:3100'
command: -config.file=/etc/loki/local-config.yaml
Expand All @@ -29,9 +29,14 @@ services:
driver: loki
options:
loki-url: 'http://localhost:3100/api/prom/push'
# Prevent container from being stuck when shutting down
# https://github.com/grafana/loki/issues/2361#issuecomment-718024318
loki-timeout: 1s
loki-max-backoff: 1s
loki-retries: 1

jaeger:
image: jaegertracing/all-in-one:latest
image: jaegertracing/all-in-one:1.51
ports:
- '6831:6831'
- '16686:16686'
Expand All @@ -41,27 +46,26 @@ services:
loki-url: 'http://localhost:3100/api/prom/push'

hotrod:
image: jaegertracing/example-hotrod:latest
image: jaegertracing/example-hotrod:1.51
ports:
- '8080:8080'
- '8083:8083'
command: ["-m","prometheus","all"]
environment:
- JAEGER_AGENT_HOST=jaeger
- JAEGER_AGENT_PORT=6831
- OTEL_EXPORTER_OTLP_ENDPOINT=http://jaeger:4318
logging:
driver: loki
options:
loki-url: 'http://localhost:3100/api/prom/push'

prometheus:
image: prom/prometheus:v2.19.1
image: prom/prometheus:v2.48.0
volumes:
- ./prometheus/prometheus.yml:/etc/prometheus/prometheus.yml:ro
ports:
- '9090:9090'
command:
- --config.file=/etc/prometheus/prometheus.yml
- --config.file=/etc/prometheus/prometheus.yml
logging:
driver: loki
options:
Expand Down
Loading

0 comments on commit 5ba0c11

Please sign in to comment.