mirror of
https://github.com/demostf/setup
synced 2026-06-04 00:54:07 +02:00
add promtail
This commit is contained in:
parent
f7426209da
commit
65cb8abf06
3 changed files with 33 additions and 0 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -1,3 +1,4 @@
|
|||
.env
|
||||
db_data
|
||||
letsencrypt
|
||||
promtail-positions
|
||||
|
|
|
|||
|
|
@ -95,10 +95,22 @@ services:
|
|||
- proxy-tier
|
||||
volumes:
|
||||
- ./letsencrypt:/etc/letsencrypt
|
||||
- logs:/logs
|
||||
ports:
|
||||
- "80:80"
|
||||
- "443:443"
|
||||
|
||||
promtail:
|
||||
image: grafana/promtail:latest
|
||||
volumes:
|
||||
- /etc/machine-id:/etc/machine-id
|
||||
- logs:/logs:ro
|
||||
- ./promtail.yml:/etc/promtail/promtail.yml
|
||||
- ./promtail-positions:/positions
|
||||
environment:
|
||||
- LOKI=${LOKI_URL}
|
||||
command: -config.file=/etc/promtail/promtail.yml -config.expand-env=true
|
||||
|
||||
networks:
|
||||
proxy-tier:
|
||||
db-tier:
|
||||
|
|
@ -106,3 +118,4 @@ networks:
|
|||
|
||||
volumes:
|
||||
certs:
|
||||
logs:
|
||||
|
|
|
|||
19
promtail.yml
Normal file
19
promtail.yml
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
server:
|
||||
http_listen_port: 9080
|
||||
grpc_listen_port: 0
|
||||
|
||||
positions:
|
||||
filename: /positions/positions.yaml
|
||||
|
||||
clients:
|
||||
- url: https://${LOKI}/loki/api/v1/push
|
||||
|
||||
scrape_configs:
|
||||
- job_name: nginx
|
||||
static_configs:
|
||||
- targets:
|
||||
- demos.tf
|
||||
labels:
|
||||
job: varlogs
|
||||
host: demos.tf
|
||||
__path__: /logs/*log
|
||||
Loading…
Add table
Add a link
Reference in a new issue