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
|
.env
|
||||||
db_data
|
db_data
|
||||||
letsencrypt
|
letsencrypt
|
||||||
|
promtail-positions
|
||||||
|
|
|
||||||
|
|
@ -95,10 +95,22 @@ services:
|
||||||
- proxy-tier
|
- proxy-tier
|
||||||
volumes:
|
volumes:
|
||||||
- ./letsencrypt:/etc/letsencrypt
|
- ./letsencrypt:/etc/letsencrypt
|
||||||
|
- logs:/logs
|
||||||
ports:
|
ports:
|
||||||
- "80:80"
|
- "80:80"
|
||||||
- "443:443"
|
- "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:
|
networks:
|
||||||
proxy-tier:
|
proxy-tier:
|
||||||
db-tier:
|
db-tier:
|
||||||
|
|
@ -106,3 +118,4 @@ networks:
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
certs:
|
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