Splitting repo into submodules
This commit is contained in:
commit
b1cc6ab6d8
19
promtail-agent/docker-compose.yml
Normal file
19
promtail-agent/docker-compose.yml
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
version: "3.8"
|
||||||
|
|
||||||
|
services:
|
||||||
|
promtail:
|
||||||
|
image: grafana/promtail:latest
|
||||||
|
container_name: promtail
|
||||||
|
logging:
|
||||||
|
driver: journald
|
||||||
|
options:
|
||||||
|
mode: non-blocking
|
||||||
|
environment:
|
||||||
|
- TZ=America/Chicago
|
||||||
|
volumes:
|
||||||
|
- /opt/logs:/opt/logs:ro # docker
|
||||||
|
- /var/log:/var/log:ro # varlogs
|
||||||
|
- ./promtail:/etc/promtail
|
||||||
|
- /etc/machine-id:/etc/machine-id:ro # journald logging
|
||||||
|
restart: unless-stopped
|
||||||
|
command: -config.file=/etc/promtail/promtail-config.yml
|
||||||
31
promtail-agent/promtail/promtail-config.yml
Normal file
31
promtail-agent/promtail/promtail-config.yml
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
server:
|
||||||
|
http_listen_port: 9080
|
||||||
|
grpc_listen_port: 0
|
||||||
|
|
||||||
|
positions:
|
||||||
|
filename: /tmp/positions.yaml
|
||||||
|
|
||||||
|
clients:
|
||||||
|
- url: http://192.168.60.8:3100/loki/api/v1/push
|
||||||
|
|
||||||
|
# local machine logs
|
||||||
|
scrape_configs:
|
||||||
|
- job_name: system
|
||||||
|
static_configs:
|
||||||
|
- targets:
|
||||||
|
- localhost
|
||||||
|
labels:
|
||||||
|
job: varlogs
|
||||||
|
__path__: /var/log/**/**log
|
||||||
|
- job_name: journal
|
||||||
|
journal:
|
||||||
|
max_age: 12h
|
||||||
|
labels:
|
||||||
|
job: systemd-journal
|
||||||
|
relabel_configs:
|
||||||
|
- source_labels: ["__journal__hostname"]
|
||||||
|
target_label: "hostname"
|
||||||
|
- source_labels: ["__journal__systemd_unit"]
|
||||||
|
target_label: "unit"
|
||||||
|
- source_labels: ["__journal_container_name"]
|
||||||
|
target_label: "container"
|
||||||
Loading…
x
Reference in New Issue
Block a user