-
Notifications
You must be signed in to change notification settings - Fork 1
/
promtail-config.yml
39 lines (35 loc) · 1006 Bytes
/
promtail-config.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
server:
http_listen_port: 9080
grpc_listen_port: 0
positions:
filename: /tmp/positions.yaml
clients:
- url: ${LOKI_URL}/loki/api/v1/push
tenant_id: ${INSTANCE}
basic_auth:
username: ${LOKIUSER}
password: ${LOKIPASS}
scrape_configs:
- job_name: ${INSTANCE}-caddy-logs
static_configs:
- targets:
- localhost
labels:
job: ${INSTANCE}-caddy-logs
__path__: /var/giveth/logs/caddy/*
- job_name: ${INSTANCE}-container-logs
docker_sd_configs:
- host: unix:///var/run/docker.sock
refresh_interval: 30s
pipeline_stages:
- docker: {}
- drop:
older_than: 24h
relabel_configs:
- source_labels: ['__meta_docker_container_name']
regex: '/(.*)'
target_label: 'container'
- source_labels: ['__meta_docker_container_log_stream']
target_label: 'logstream'
- source_labels: ['__meta_docker_container_label_logging_jobname']
target_label: 'job'