Skip to content

Commit 82d6ed1

Browse files
committed
conf(grafana): Add loki datasource
Adding this configuration enables grafana to query loki to display logs.
1 parent 54a1084 commit 82d6ed1

File tree

3 files changed

+19
-1
lines changed

3 files changed

+19
-1
lines changed

platform/kube-prometheus/base/grafana-dashboardDatasources.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,15 @@ stringData:
3030
"type": "prometheus",
3131
"url": "http://prometheus-k8s.monitoring.svc:9090",
3232
"version": 1
33+
},
34+
{
35+
"access": "proxy",
36+
"editable": false,
37+
"name": "loki",
38+
"orgId": 1,
39+
"type": "loki",
40+
"url": "http://loki-read.loki.svc:3100",
41+
"version": 1
3342
}
3443
]
3544
}

platform/kube-prometheus/base/grafana-deployment.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ spec:
2020
annotations:
2121
checksum/grafana-config: 4aada30ca2b95596ef8b9f823946362a
2222
checksum/grafana-dashboardproviders: b69f65e71b209f1bf952e41c8b899629
23-
checksum/grafana-datasources: 48c071285f710bdb9f6ed8bd3a2b6a2e
23+
checksum/grafana-datasources: 1d2b36b87fb86bc9cdc9a1785513dae8
2424
labels:
2525
app.kubernetes.io/component: grafana
2626
app.kubernetes.io/name: grafana

platform/kube-prometheus/settings.jsonnet

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,15 @@ local kp =
7575
version: 1,
7676
editable: false,
7777
},
78+
{
79+
name: 'loki',
80+
type: 'loki',
81+
access: 'proxy',
82+
orgId: 1,
83+
url: 'http://loki-read.loki.svc:3100',
84+
version: 1,
85+
editable: false,
86+
},
7887
],
7988
},
8089
},

0 commit comments

Comments
 (0)