Initial commit
This commit is contained in:
48
config/monitoring/promtail-config.yaml
Normal file
48
config/monitoring/promtail-config.yaml
Normal file
@@ -0,0 +1,48 @@
|
||||
server:
|
||||
http_listen_port: 9080
|
||||
grpc_listen_port: 0
|
||||
|
||||
positions:
|
||||
filename: /tmp/positions.yaml
|
||||
|
||||
clients:
|
||||
- url: http://loki:3100/loki/api/v1/push
|
||||
|
||||
scrape_configs:
|
||||
- job_name: varlogs
|
||||
static_configs:
|
||||
- targets: [localhost]
|
||||
labels:
|
||||
job: varlogs
|
||||
host: cyberdeck
|
||||
__path__: /var/log/**/*.log
|
||||
|
||||
- job_name: docker
|
||||
static_configs:
|
||||
- targets: [localhost]
|
||||
labels:
|
||||
job: docker
|
||||
host: cyberdeck
|
||||
__path__: /var/lib/docker/containers/*/*-json.log
|
||||
pipeline_stages:
|
||||
- docker: {}
|
||||
relabel_configs:
|
||||
- source_labels: [__path__]
|
||||
regex: "/var/lib/docker/containers/([^/]+)/.*"
|
||||
target_label: container
|
||||
replacement: "$1"
|
||||
|
||||
- job_name: journald
|
||||
journal:
|
||||
path: /var/log/journal
|
||||
max_age: 12h
|
||||
labels:
|
||||
job: journald
|
||||
host: cyberdeck
|
||||
relabel_configs:
|
||||
- source_labels: [__journal__systemd_unit]
|
||||
target_label: unit
|
||||
- source_labels: [__journal__hostname]
|
||||
target_label: host
|
||||
- source_labels: [__journal__priority_keyword]
|
||||
target_label: level
|
||||
Reference in New Issue
Block a user