16/10
This commit is contained in:
parent
9fd9083cfc
commit
edcc697405
55
Corbeille/observability/docker-compose.yml
Normal file
55
Corbeille/observability/docker-compose.yml
Normal file
@ -0,0 +1,55 @@
|
|||||||
|
version: "3.8"
|
||||||
|
services:
|
||||||
|
prometheus:
|
||||||
|
image: prom/prometheus:latest
|
||||||
|
container_name: prometheus-observability
|
||||||
|
volumes:
|
||||||
|
- ./prometheus.yml:/etc/prometheus/prometheus.yml
|
||||||
|
command:
|
||||||
|
- '--config.file=/etc/prometheus/prometheus.yml'
|
||||||
|
ports:
|
||||||
|
- "9090:9090"
|
||||||
|
networks:
|
||||||
|
- observability
|
||||||
|
grafana:
|
||||||
|
image: grafana/grafana:latest
|
||||||
|
container_name: grafana-observability
|
||||||
|
ports:
|
||||||
|
- "3000:3000"
|
||||||
|
volumes:
|
||||||
|
- grafana-data:/var/lib/grafana
|
||||||
|
environment:
|
||||||
|
- GF_SECURITY_ADMIN_USER=admin
|
||||||
|
- GF_SECURITY_ADMIN_PASSWORD=admin
|
||||||
|
networks:
|
||||||
|
- observability
|
||||||
|
depends_on:
|
||||||
|
- loki
|
||||||
|
loki:
|
||||||
|
image: grafana/loki:2.8.2
|
||||||
|
container_name: loki-observability
|
||||||
|
ports:
|
||||||
|
- "3100:3100"
|
||||||
|
command: -config.file=/etc/loki/local-config.yaml
|
||||||
|
volumes:
|
||||||
|
- ./loki-config.yaml:/etc/loki/local-config.yaml
|
||||||
|
- ./loki-wal:/wal
|
||||||
|
- ./loki-chunks:/loki/chunks
|
||||||
|
- ./loki-index:/loki/index
|
||||||
|
networks:
|
||||||
|
- observability
|
||||||
|
promtail:
|
||||||
|
image: grafana/promtail:2.8.2
|
||||||
|
container_name: promtail-observability
|
||||||
|
volumes:
|
||||||
|
- ./promtail-config.yaml:/etc/promtail/config.yaml
|
||||||
|
- /var/lib/docker/containers:/var/lib/docker/containers:ro
|
||||||
|
command:
|
||||||
|
- -config.file=/etc/promtail/config.yaml
|
||||||
|
networks:
|
||||||
|
- observability
|
||||||
|
volumes:
|
||||||
|
grafana-data:
|
||||||
|
networks:
|
||||||
|
observability:
|
||||||
|
driver: bridge
|
||||||
@ -0,0 +1 @@
|
|||||||
|
{"UID":"714e0dc1-bca9-44e1-aca6-110f8b49de5c","created_at":"2025-09-29T13:46:47.834317171Z","version":{"version":"2.8.2","revision":"9f809eda7","branch":"HEAD","buildUser":"root@e401cfcb874f","buildDate":"2023-05-03T11:07:54Z","goVersion":"go1.20.4"}}
|
||||||
35
Corbeille/observability/loki-config.yaml
Normal file
35
Corbeille/observability/loki-config.yaml
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
auth_enabled: false
|
||||||
|
|
||||||
|
server:
|
||||||
|
http_listen_port: 3100
|
||||||
|
|
||||||
|
ingester:
|
||||||
|
lifecycler:
|
||||||
|
address: 127.0.0.1
|
||||||
|
ring:
|
||||||
|
kvstore:
|
||||||
|
store: inmemory
|
||||||
|
chunk_idle_period: 5m
|
||||||
|
chunk_target_size: 1048576
|
||||||
|
max_transfer_retries: 0
|
||||||
|
|
||||||
|
schema_config:
|
||||||
|
configs:
|
||||||
|
- from: 2020-10-24
|
||||||
|
store: boltdb
|
||||||
|
object_store: filesystem
|
||||||
|
schema: v11
|
||||||
|
index:
|
||||||
|
prefix: index_
|
||||||
|
period: 168h
|
||||||
|
|
||||||
|
storage_config:
|
||||||
|
boltdb:
|
||||||
|
directory: /loki/index
|
||||||
|
filesystem:
|
||||||
|
directory: /loki/chunks
|
||||||
|
|
||||||
|
limits_config:
|
||||||
|
enforce_metric_name: false
|
||||||
|
reject_old_samples: true
|
||||||
|
reject_old_samples_max_age: 168h
|
||||||
0
Corbeille/observability/loki-wal/00000004
Normal file
0
Corbeille/observability/loki-wal/00000004
Normal file
7
Corbeille/observability/prometheus.yml
Normal file
7
Corbeille/observability/prometheus.yml
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
global:
|
||||||
|
scrape_interval: 15s
|
||||||
|
|
||||||
|
scrape_configs:
|
||||||
|
- job_name: 'prometheus'
|
||||||
|
static_configs:
|
||||||
|
- targets: ['localhost:9090']
|
||||||
19
Corbeille/observability/promtail-config.yaml
Normal file
19
Corbeille/observability/promtail-config.yaml
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
server:
|
||||||
|
http_listen_port: 9080
|
||||||
|
grpc_listen_port: 0
|
||||||
|
|
||||||
|
positions:
|
||||||
|
filename: /tmp/positions.yaml
|
||||||
|
|
||||||
|
clients:
|
||||||
|
- url: http://loki:3100/loki/api/v1/push
|
||||||
|
|
||||||
|
scrape_configs:
|
||||||
|
- job_name: docker_logs
|
||||||
|
static_configs:
|
||||||
|
- targets:
|
||||||
|
- localhost
|
||||||
|
labels:
|
||||||
|
job: docker
|
||||||
|
__path__: /var/lib/docker/containers/*/*.log
|
||||||
|
|
||||||
Loading…
x
Reference in New Issue
Block a user