Contents for lecture 5-3
This commit is contained in:
parent
31898a8a96
commit
57b5846d51
32
5-3-loki-dashboards-nginx/docker-compose.yml
Normal file
32
5-3-loki-dashboards-nginx/docker-compose.yml
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
version: "3.9"
|
||||||
|
|
||||||
|
services:
|
||||||
|
grafana:
|
||||||
|
image: "grafana/grafana:8.4.2"
|
||||||
|
ports:
|
||||||
|
- "3000:3000"
|
||||||
|
volumes:
|
||||||
|
- ./provisioning:/etc/grafana/provisioning
|
||||||
|
environment:
|
||||||
|
- GF_PLUGINS_PLUGIN_ADMIN_ENABLED=true
|
||||||
|
|
||||||
|
loki:
|
||||||
|
image: "grafana/loki:2.4.2"
|
||||||
|
ports:
|
||||||
|
- "3100:3100"
|
||||||
|
|
||||||
|
promtail:
|
||||||
|
image: "grafana/promtail:2.4.2"
|
||||||
|
volumes:
|
||||||
|
- logs_dir:/tmp/log
|
||||||
|
- ./promtail.yml:/etc/promtail/config.yaml
|
||||||
|
command: -config.file=/etc/promtail/config.yaml
|
||||||
|
|
||||||
|
flog:
|
||||||
|
image: "mingrammer/flog:0.4.3"
|
||||||
|
command: -f json -t log -o /tmp/log/json.log -d 200ms -w -l
|
||||||
|
volumes:
|
||||||
|
- logs_dir:/tmp/log
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
logs_dir:
|
11
5-3-loki-dashboards-nginx/promtail.yml
Normal file
11
5-3-loki-dashboards-nginx/promtail.yml
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
clients:
|
||||||
|
- url: http://loki:3100/loki/api/v1/push
|
||||||
|
|
||||||
|
scrape_configs:
|
||||||
|
- job_name: flog
|
||||||
|
static_configs:
|
||||||
|
- targets:
|
||||||
|
- localhost
|
||||||
|
labels:
|
||||||
|
job: flogs
|
||||||
|
__path__: /tmp/log/*.log
|
@ -0,0 +1,9 @@
|
|||||||
|
apiVersion: 1
|
||||||
|
|
||||||
|
providers:
|
||||||
|
- name: 'Loki dashboards'
|
||||||
|
type: file
|
||||||
|
allowUiUpdates: true
|
||||||
|
options:
|
||||||
|
path: /etc/grafana/provisioning/dashboards/loki
|
||||||
|
foldersFromFilesStructure: false
|
1926
5-3-loki-dashboards-nginx/provisioning/dashboards/loki/nginx.json
Normal file
1926
5-3-loki-dashboards-nginx/provisioning/dashboards/loki/nginx.json
Normal file
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,8 @@
|
|||||||
|
apiVersion: 1
|
||||||
|
|
||||||
|
datasources:
|
||||||
|
- name: Loki
|
||||||
|
type: loki
|
||||||
|
url: http://loki:3100
|
||||||
|
isDefault: true
|
||||||
|
editable: true
|
Loading…
Reference in New Issue
Block a user