Splitting repo into submodules

This commit is contained in:
Noah L. Schrick 2023-08-01 12:01:20 -05:00
commit b1cc6ab6d8
2 changed files with 50 additions and 0 deletions

View 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

View 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"