Loki configuration
This commit is contained in:
parent
2580763559
commit
d19a259f52
|
@ -1 +1,5 @@
|
||||||
FROM grafana/grafana:latest
|
FROM grafana/grafana:latest
|
||||||
|
RUN mkdir -p /etc/grafana/provisioning/datasources /etc/grafana/provisioning/dashboards
|
||||||
|
COPY custom.ini /etc/grafana/grafana.ini
|
||||||
|
COPY loki_datasource.yaml /etc/grafana/provisioning/datasources/
|
||||||
|
COPY dashboard.json /etc/grafana/provisioning/dashboards/
|
||||||
|
|
|
@ -0,0 +1,11 @@
|
||||||
|
datasources:
|
||||||
|
- name: Loki
|
||||||
|
type: loki
|
||||||
|
access: proxy # Access mode: 'proxy' (default) or 'direct'
|
||||||
|
url: http://loki_loki
|
||||||
|
jsonData:
|
||||||
|
maxLines: 1000 # Maximum number of lines returned per query
|
||||||
|
# basicAuth:
|
||||||
|
# username: myuser
|
||||||
|
# password: mypassword
|
||||||
|
default_home_dashboard = Loki
|
|
@ -0,0 +1,17 @@
|
||||||
|
{
|
||||||
|
"title": "Loki",
|
||||||
|
"panels": [
|
||||||
|
{
|
||||||
|
"title": "Error Rate",
|
||||||
|
"type": "graph",
|
||||||
|
"datasource": "Loki",
|
||||||
|
"targets": [
|
||||||
|
{
|
||||||
|
"expr": 'sum(rate({job="my-app", level="error"}[1m])) by (level)',
|
||||||
|
"legendFormat": "{{level}}",
|
||||||
|
"refId": "A"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
|
@ -0,0 +1,7 @@
|
||||||
|
apiVersion: 1
|
||||||
|
|
||||||
|
datasources:
|
||||||
|
- name: Loki
|
||||||
|
type: loki
|
||||||
|
access: proxy
|
||||||
|
url: http://loki_loki:3100
|
Loading…
Reference in New Issue