diff --git a/examples/grafana-integration/README.md b/examples/grafana-integration/README.md index 1f1f15b048d9..de9e957e37e1 100644 --- a/examples/grafana-integration/README.md +++ b/examples/grafana-integration/README.md @@ -8,8 +8,8 @@ This is the Hot R.O.D. demo application that consists of the same components as * Clone the Jaeger repository `git clone https://github.com/jaegertracing/jaeger.git`, then `cd examples/grafana-integration` -* All services will log to Loki via the loki docker logging plugin. -To install run this on the host: +* All services will log to Loki via the [official Docker driver plugin](https://grafana.com/docs/loki/latest/clients/docker-driver/). +Install the Loki logging plugin for Docker: ```bash docker plugin install \ @@ -18,13 +18,13 @@ grafana/loki-docker-driver:latest \ --grant-all-permissions ``` -### Deploy the services +### Run the services -Pull up the services: `docker-compose up` +`docker-compose up` ### Access the services * HotROD application at http://localhost:8080 -* Access Grafana UI at http://localhost:3000 +* Grafana UI at http://localhost:3000 ### Explore with Loki @@ -32,7 +32,7 @@ Currently the most powerful way to correlate application logs with traces can be After setting the datasource to Loki, all the log labels become available, and can be easily filtered using [Loki's LogQL query language](https://grafana.com/docs/loki/latest/logql/). -For example after selecting the compose project, errors can be filtered with the following expression: +For example, after selecting the compose project/service under Log labels , errors can be filtered with the following expression: ``` {compose-project="grafana-integration"} |= "error" @@ -44,7 +44,7 @@ which will list the redis timeout events. Since the HotROD application can expose its metrics in Prometheus' format, these can be also used during investigation. -This example includes a dashboard, which contains a log panel, which displays the logs for the selected services in real time. These can be also filtered by a search field. +This example includes a dashboard that contains a log panel for the selected services in real time. These can be also filtered by a search field, that provides `grep`-like features. There are also panels to display the ratio/percentage of errors in the current timeframe. @@ -52,5 +52,4 @@ Additionally, there are graphs for each service, visualing the rate of the reque ### Clean up -To stop the containers use `docker-compose -f path-to-yml-file down` - +`docker-compose down` diff --git a/examples/grafana-integration/docker-compose.yaml b/examples/grafana-integration/docker-compose.yaml index b3433ed94b4f..d83fab69f9cf 100644 --- a/examples/grafana-integration/docker-compose.yaml +++ b/examples/grafana-integration/docker-compose.yaml @@ -6,7 +6,9 @@ services: ports: - '3000:3000' volumes: - - ./grafana/provisioning/:/etc/grafana/provisioning/ + - ./grafana/datasources.yaml:/etc/grafana/provisioning/datasources/datasources.yaml + - ./grafana/dashboards.yml:/etc/grafana/provisioning/dashboards/dashboards.yml + - ./grafana/hotrod_metrics_logs.json:/etc/grafana/provisioning/dashboards/hotrod_metrics_logs.json logging: driver: loki options: diff --git a/examples/grafana-integration/grafana/provisioning/dashboards/dashboard.yml b/examples/grafana-integration/grafana/dashboard.yml similarity index 100% rename from examples/grafana-integration/grafana/provisioning/dashboards/dashboard.yml rename to examples/grafana-integration/grafana/dashboard.yml diff --git a/examples/grafana-integration/grafana/provisioning/datasources/datasources.yaml b/examples/grafana-integration/grafana/datasources.yaml similarity index 100% rename from examples/grafana-integration/grafana/provisioning/datasources/datasources.yaml rename to examples/grafana-integration/grafana/datasources.yaml diff --git a/examples/grafana-integration/grafana/provisioning/dashboards/hotrod_metrics_logs.json b/examples/grafana-integration/grafana/hotrod_metrics_logs.json similarity index 100% rename from examples/grafana-integration/grafana/provisioning/dashboards/hotrod_metrics_logs.json rename to examples/grafana-integration/grafana/hotrod_metrics_logs.json