forked from faraonc/vmc-monitor
-
Notifications
You must be signed in to change notification settings - Fork 0
/
promtail-config.yml
56 lines (51 loc) · 1.02 KB
/
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
server:
http_listen_address: 0.0.0.0
http_listen_port: 9080
positions:
filename: /tmp/positions.yaml
clients:
- url: http://<CHANGE_ME>/loki/api/v1/push
tenant_id: 1
external_labels:
foo: bar
basic_auth:
# The username to use for basic auth
username: "CHANGE_ME"
password: "CHANGE_ME"
scrape_configs:
- job_name: system
static_configs:
- targets:
- localhost
labels:
job: varlogs
__path__: /var/log/*log
- job_name: containers
static_configs:
- targets:
- localhost
labels:
job: containerlogs
__path__: /var/lib/docker/containers/*/*log
pipeline_stages:
- json:
expressions:
output: log
stream: stream
attrs:
- json:
expressions:
tag:
source: attrs
- regex:
expression: (?P<container_name>(?:[^|]*[^|]))
source: tag
- timestamp:
format: RFC3339Nano
source: time
- labels:
# tag:
stream:
container_name:
- output:
source: output