chore: Add Promtail to dns
This commit is contained in:
parent
4a8e418e25
commit
4bef000ff8
|
|
@ -21,6 +21,17 @@ services:
|
||||||
cap_add:
|
cap_add:
|
||||||
- SYS_NICE
|
- SYS_NICE
|
||||||
|
|
||||||
|
promtail:
|
||||||
|
image: grafana/promtail:latest
|
||||||
|
container_name: promtail
|
||||||
|
volumes:
|
||||||
|
- /var/log:/var/log:ro
|
||||||
|
- /var/lib/docker/containers:/var/lib/docker/containers:ro
|
||||||
|
- /var/run/docker.sock:/var/run/docker.sock
|
||||||
|
- ./promtail/config.yml:/etc/promtail/config.yml
|
||||||
|
command: -config.file=/etc/promtail/config.yml
|
||||||
|
restart: unless-stopped
|
||||||
|
|
||||||
komodo-periphery:
|
komodo-periphery:
|
||||||
image: ghcr.io/moghtech/komodo-periphery:2
|
image: ghcr.io/moghtech/komodo-periphery:2
|
||||||
container_name: komodo-periphery
|
container_name: komodo-periphery
|
||||||
|
|
|
||||||
31
dns/promtail/config.yml
Normal file
31
dns/promtail/config.yml
Normal file
|
|
@ -0,0 +1,31 @@
|
||||||
|
server:
|
||||||
|
http_listen_port: 9080
|
||||||
|
grpc_listen_port: 0
|
||||||
|
|
||||||
|
positions:
|
||||||
|
filename: /tmp/positions.yaml
|
||||||
|
|
||||||
|
clients:
|
||||||
|
# Use the Tailscale IP of VM1 here
|
||||||
|
- url: http://100.80.179.128:3100/loki/api/v1/push
|
||||||
|
|
||||||
|
scrape_configs:
|
||||||
|
- job_name: system
|
||||||
|
static_configs:
|
||||||
|
- targets:
|
||||||
|
- localhost
|
||||||
|
labels:
|
||||||
|
job: varlogs
|
||||||
|
host: cloud-dns # Update this to vm3, vm4, etc.
|
||||||
|
__path__: /var/log/*log
|
||||||
|
|
||||||
|
- job_name: docker
|
||||||
|
docker_sd_configs:
|
||||||
|
- host: unix:///var/run/docker.sock
|
||||||
|
relabel_configs:
|
||||||
|
- source_labels: ['__meta_docker_container_name']
|
||||||
|
regex: '/(.*)'
|
||||||
|
target_label: 'container'
|
||||||
|
- source_labels: ['__meta_docker_container_name']
|
||||||
|
target_label: 'host'
|
||||||
|
replacement: 'cloud-dns' # Update this to vm3, vm4, etc.
|
||||||
Loading…
Reference in a new issue