28/10
This commit is contained in:
parent
cd8b52548b
commit
f471120316
56
observabilite_service/Machine_virtuelle/docker-compose.yml
Normal file
56
observabilite_service/Machine_virtuelle/docker-compose.yml
Normal file
@ -0,0 +1,56 @@
|
|||||||
|
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
|
||||||
|
- /var/log:/var/log:ro
|
||||||
|
command:
|
||||||
|
- -config.file=/etc/promtail/config.yaml
|
||||||
|
networks:
|
||||||
|
- observability
|
||||||
|
volumes:
|
||||||
|
grafana-data:
|
||||||
|
networks:
|
||||||
|
observability:
|
||||||
|
driver: bridge
|
||||||
59
observabilite_service/Machine_virtuelle/loki-config.yaml
Normal file
59
observabilite_service/Machine_virtuelle/loki-config.yaml
Normal file
@ -0,0 +1,59 @@
|
|||||||
|
auth_enabled: false
|
||||||
|
|
||||||
|
server:
|
||||||
|
http_listen_port: 3100
|
||||||
|
grpc_listen_port: 9096
|
||||||
|
|
||||||
|
common:
|
||||||
|
path_prefix: /loki
|
||||||
|
storage:
|
||||||
|
filesystem:
|
||||||
|
chunks_directory: /loki/chunks
|
||||||
|
rules_directory: /loki/rules
|
||||||
|
replication_factor: 1
|
||||||
|
ring:
|
||||||
|
instance_addr: 127.0.0.1
|
||||||
|
kvstore:
|
||||||
|
store: inmemory
|
||||||
|
|
||||||
|
ingester:
|
||||||
|
wal:
|
||||||
|
enabled: true
|
||||||
|
dir: /wal
|
||||||
|
flush_on_shutdown: true
|
||||||
|
chunk_idle_period: 5m
|
||||||
|
chunk_retain_period: 30s
|
||||||
|
max_chunk_age: 1h
|
||||||
|
lifecycler:
|
||||||
|
ring:
|
||||||
|
replication_factor: 1
|
||||||
|
|
||||||
|
schema_config:
|
||||||
|
configs:
|
||||||
|
- from: 2020-10-24
|
||||||
|
store: boltdb-shipper
|
||||||
|
object_store: filesystem
|
||||||
|
schema: v11
|
||||||
|
index:
|
||||||
|
prefix: index_
|
||||||
|
period: 24h
|
||||||
|
|
||||||
|
storage_config:
|
||||||
|
boltdb_shipper:
|
||||||
|
active_index_directory: /loki/index
|
||||||
|
cache_location: /loki/index
|
||||||
|
shared_store: filesystem
|
||||||
|
filesystem:
|
||||||
|
directory: /loki/chunks
|
||||||
|
|
||||||
|
limits_config:
|
||||||
|
enforce_metric_name: false
|
||||||
|
reject_old_samples: true
|
||||||
|
reject_old_samples_max_age: 168h
|
||||||
|
ingestion_rate_mb: 10
|
||||||
|
ingestion_burst_size_mb: 20
|
||||||
|
|
||||||
|
compactor:
|
||||||
|
working_directory: /loki/compactor
|
||||||
|
shared_store: filesystem
|
||||||
|
compaction_interval: 10m
|
||||||
15
observabilite_service/Machine_virtuelle/prometheus.yml
Normal file
15
observabilite_service/Machine_virtuelle/prometheus.yml
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
global:
|
||||||
|
scrape_interval: 15s
|
||||||
|
|
||||||
|
scrape_configs:
|
||||||
|
- job_name: 'prometheus'
|
||||||
|
static_configs:
|
||||||
|
- targets: ['localhost:9090']
|
||||||
|
|
||||||
|
- job_name: 'node_exporter_vmservices'
|
||||||
|
static_configs:
|
||||||
|
- targets: ['192.168.56.31:9100']
|
||||||
|
|
||||||
|
- job_name: 'apache_vmservices'
|
||||||
|
static_configs:
|
||||||
|
- targets: ['192.168.56.31:9117']
|
||||||
19
observabilite_service/Machine_virtuelle/promtail-config.yaml
Normal file
19
observabilite_service/Machine_virtuelle/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