mirror of
https://github.com/ruanbekker/docker-selfhosted-server.git
synced 2025-04-20 08:21:41 +02:00
Create promtail-config.yaml
This commit is contained in:
parent
0d6a618301
commit
03deb1fe42
55
logging-loki/loki/configs/promtail/promtail-config.yaml
Normal file
55
logging-loki/loki/configs/promtail/promtail-config.yaml
Normal file
@ -0,0 +1,55 @@
|
|||||||
|
server:
|
||||||
|
http_listen_port: 9080
|
||||||
|
grpc_listen_port: 0
|
||||||
|
|
||||||
|
positions:
|
||||||
|
filename: /tmp/positions.yaml
|
||||||
|
|
||||||
|
clients:
|
||||||
|
- url: http://loki-distributor:3100/loki/api/v1/push
|
||||||
|
|
||||||
|
scrape_configs:
|
||||||
|
- job_name: logs
|
||||||
|
pipeline_stages:
|
||||||
|
static_configs:
|
||||||
|
- targets:
|
||||||
|
- localhost
|
||||||
|
labels:
|
||||||
|
job: hostlogs
|
||||||
|
environment: home
|
||||||
|
__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<image_name>(?:[^|]*[^|])).(?P<container_name>(?:[^|]*[^|])).(?P<image_id>(?:[^|]*[^|])).(?P<container_id>(?:[^|]*[^|]))
|
||||||
|
source: tag
|
||||||
|
- timestamp:
|
||||||
|
format: RFC3339Nano
|
||||||
|
source: time
|
||||||
|
- labels:
|
||||||
|
tag:
|
||||||
|
stream:
|
||||||
|
image_name:
|
||||||
|
container_name:
|
||||||
|
image_id:
|
||||||
|
container_id:
|
||||||
|
- output:
|
||||||
|
source: output
|
Loading…
x
Reference in New Issue
Block a user