moved docker to services
This commit is contained in:
49
services/promtail/config/promtail-config.yaml
Normal file
49
services/promtail/config/promtail-config.yaml
Normal file
@@ -0,0 +1,49 @@
|
||||
server:
|
||||
http_listen_port: 9080
|
||||
grpc_listen_port: 0
|
||||
|
||||
positions:
|
||||
filename: /tmp/positions.yaml
|
||||
|
||||
clients:
|
||||
- url: http://lansrv01.dev.lan:3100/loki/api/v1/push
|
||||
|
||||
scrape_configs:
|
||||
- job_name: varlogs
|
||||
static_configs:
|
||||
- targets:
|
||||
- localhost
|
||||
labels:
|
||||
job: varlogs
|
||||
host: homesrv01
|
||||
__path__: /var/log/*log
|
||||
- job_name: systemd-journal
|
||||
journal:
|
||||
json: true
|
||||
max_age: 12h
|
||||
path: /var/log/journal
|
||||
# matches: _TRANSPORT=kernel
|
||||
labels:
|
||||
job: systemd-journal
|
||||
host: homesrv01
|
||||
relabel_configs:
|
||||
- source_labels: ['__journal__systemd_unit']
|
||||
target_label: 'journal_systemd_unit'
|
||||
- source_labels: ['__journal_syslog_identifier']
|
||||
target_label: 'journal_syslog_identifier'
|
||||
- source_labels: ['__journal__hostname']
|
||||
target_label: 'journal_hostname'
|
||||
- job_name: docker
|
||||
docker_sd_configs:
|
||||
- host: unix:///var/run/docker.sock
|
||||
refresh_interval: 1s
|
||||
pipeline_stages:
|
||||
- static_labels:
|
||||
host: "homesrv01"
|
||||
job: "docker"
|
||||
relabel_configs:
|
||||
- source_labels: ['__meta_docker_container_name']
|
||||
regex: '/(.*)'
|
||||
target_label: "container_name"
|
||||
- source_labels: ['__meta_docker_container_id']
|
||||
target_label: "container_id"
|
||||
Reference in New Issue
Block a user