YAML · 1897 bytes Raw Blame History
1 server:
2 http_listen_port: 9080
3 grpc_listen_port: 0
4
5 positions:
6 filename: /tmp/positions.yaml
7
8 clients:
9 - url: http://loki:3100/loki/api/v1/push
10
11 scrape_configs:
12 - job_name: system
13 static_configs:
14 - targets:
15 - localhost
16 labels:
17 job: varlogs
18 __path__: /var/log/*log
19
20 - job_name: zephyrfs-web-logs
21 static_configs:
22 - targets:
23 - localhost
24 labels:
25 job: zephyrfs-web
26 service: web-server
27 __path__: /var/log/web/*.log
28
29 - job_name: zephyrfs-node-logs
30 static_configs:
31 - targets:
32 - localhost
33 labels:
34 job: zephyrfs-node
35 service: storage-node
36 __path__: /var/log/node/*.log
37
38 - job_name: nginx-logs
39 static_configs:
40 - targets:
41 - localhost
42 labels:
43 job: nginx
44 service: proxy
45 __path__: /var/log/nginx/*.log
46
47 pipeline_stages:
48 - match:
49 selector: '{job="zephyrfs-web"}'
50 stages:
51 - json:
52 expressions:
53 level: level
54 timestamp: time
55 message: msg
56 method: method
57 url: url
58 status: statusCode
59 response_time: responseTime
60 - labels:
61 level:
62 method:
63 status:
64 - timestamp:
65 source: timestamp
66 format: RFC3339
67
68 - match:
69 selector: '{job="nginx"}'
70 stages:
71 - regex:
72 expression: '^(?P<remote_addr>\S+) \S+ \S+ \[(?P<timestamp>[^\]]+)\] "(?P<method>\S+) (?P<path>\S+) \S+" (?P<status>\d+) (?P<body_bytes_sent>\d+) "(?P<referer>[^"]*)" "(?P<user_agent>[^"]*)" (?P<response_time>\S+)'
73 - labels:
74 method:
75 status:
76 remote_addr:
77 - timestamp:
78 source: timestamp
79 format: 02/Jan/2006:15:04:05 -0700