Skip to content

Commit

Permalink
add basic Grafana integration setup and README.md
Browse files Browse the repository at this point in the history
Signed-off-by: fktkrt <fktkrt@gmail.com>
  • Loading branch information
fktkrt committed Aug 23, 2020
1 parent 09fde54 commit 66cf883
Show file tree
Hide file tree
Showing 3 changed files with 82 additions and 0 deletions.
14 changes: 14 additions & 0 deletions examples/grafana-integration/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Hot R.O.D. - Rides on Demand - Grafana integration

This is the Hot R.O.D. demo application that consists of the same components as the `examples/hotrod/`, only Grafana and Loki integration is added to this setup, so you can corralete metrics, logs and traces in one application.

## Running

### Run everything via `docker-compose`

* Download `docker-compose.yml` from https://github.com/jaegertracing/jaeger/blob/master/examples/grafana-integration/docker-compose.yml
* Download the `datasources.yaml` from the `examples/grafana-integration/` folder
* Run Grafana and Loki integration with Jaeger backend using HotROD demo with `docker-compose -f path-to-yml-file up`
* Access Grafana UI at http://localhost:3000 and HotROD app at http://localhost:8080
* Shutdown / cleanup with `docker-compose -f path-to-yml-file down`

14 changes: 14 additions & 0 deletions examples/grafana-integration/datasources.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
ApiVersion: 1

datasources:
- name: Loki
type: loki
access: proxy
url: http://loki:3100
editable: true
isDefault: true
- name: Jaeger
type: jaeger
access: browser
url: http://jaeger:16686
editable: true
54 changes: 54 additions & 0 deletions examples/grafana-integration/docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
All services will log to Loki via the loki docker logging plugin.
# To install run this on the host once:
# docker plugin install grafana/loki-docker-driver:latest --alias loki --grant-all-permissions
version: '2'
services:
grafana:
image: grafana/grafana:7.1.4
ports:
- '3000:3000'
volumes:
- ./datasources.yaml:/etc/grafana/provisioning/datasources/datasources.yaml
logging:
driver: loki
options:
loki-url: 'http://localhost:3100/api/prom/push'

loki:
image: grafana/loki:master
ports:
- '3100:3100'
command: -config.file=/etc/loki/local-config.yaml
environment:
- JAEGER_AGENT_HOST=jaeger
- JAEGER_AGENT_PORT=6831
- JAEGER_SAMPLER_TYPE=const
- JAEGER_SAMPLER_PARAM=1
logging:
driver: loki
options:
loki-url: 'http://localhost:3100/api/prom/push'

jaeger:
image: jaegertracing/all-in-one:latest
ports:
- '6831:6831'
- '16686:16686'
logging:
driver: loki
options:
loki-url: 'http://localhost:3100/api/prom/push'

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

0 comments on commit 66cf883

Please sign in to comment.