From 2a6e9ba195c4f266e6fde61ef189f74459ea9558 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joan=20L=C3=B3pez=20de=20la=20Franca=20Beltran?= Date: Thu, 28 Apr 2022 09:23:50 +0200 Subject: [PATCH] Contents for lecture 4-3 --- 4-3-logql-metric-queries/docker-compose.yml | 22 +++++++++++++++++++ .../provisioning/datasources/loki.yml | 8 +++++++ 2 files changed, 30 insertions(+) create mode 100644 4-3-logql-metric-queries/docker-compose.yml create mode 100644 4-3-logql-metric-queries/provisioning/datasources/loki.yml diff --git a/4-3-logql-metric-queries/docker-compose.yml b/4-3-logql-metric-queries/docker-compose.yml new file mode 100644 index 0000000..5774a8e --- /dev/null +++ b/4-3-logql-metric-queries/docker-compose.yml @@ -0,0 +1,22 @@ +version: "3.9" + +services: + grafana: + image: "grafana/grafana:8.4.2" + ports: + - "3000:3000" + volumes: + - ./provisioning:/etc/grafana/provisioning + + loki: + image: "grafana/loki:2.4.2" + ports: + - "3100:3100" + + flog: + image: "mingrammer/flog:0.4.3" + command: flog -f json -t stdout -w -l + logging: + driver: "loki" + options: + loki-url: http://localhost:3100/loki/api/v1/push \ No newline at end of file diff --git a/4-3-logql-metric-queries/provisioning/datasources/loki.yml b/4-3-logql-metric-queries/provisioning/datasources/loki.yml new file mode 100644 index 0000000..fd2fc24 --- /dev/null +++ b/4-3-logql-metric-queries/provisioning/datasources/loki.yml @@ -0,0 +1,8 @@ +apiVersion: 1 + +datasources: + - name: Loki + type: loki + url: http://loki:3100 + isDefault: true + editable: true