gc-infra/iac/ansible/resources/monitoring/config/loki.v1.yml

76 lines
2.1 KiB
YAML

auth_enabled: false # Einfachste Konfiguration ohne Authentifizierung
analytics:
reporting_enabled: false
server:
http_listen_port: 3100
grpc_listen_port: 9096 # Standard gRPC Port für Loki
common:
instance_addr: 127.0.0.1 # Adresse, unter der sich die Instanz meldet
path_prefix: /loki # Wo Loki seine Daten speichert (im Volume)
storage:
filesystem: # Lokales Dateisystem für Indizes und Chunks
chunks_directory: /loki/chunks
rules_directory: /loki/rules
replication_factor: 1 # Keine Replikation bei Einzelinstanz
ring:
kvstore:
store: inmemory # Einfachster Ring-Speicher für Einzelinstanz
query_range:
results_cache:
cache:
embedded_cache:
enabled: true
max_size_mb: 100
schema_config:
configs:
- from: 2020-10-24
store: tsdb
object_store: filesystem
schema: v13
index:
prefix: index_
period: 24h
pattern_ingester:
enabled: true
metric_aggregation:
loki_address: localhost:3100
frontend:
encoding: protobuf
limits_config:
metric_aggregation_enabled: true
reject_old_samples: true
reject_old_samples_max_age: 168h # 7 Tage
ingestion_rate_mb: 15 # Erlaube 15 MiB/Sekunde pro Tenant (Standard war 4)
ingestion_burst_size_mb: 30 # Erlaube kurzfristige Bursts bis 30 MiB (Standard war 6)
# Optional: Maximale Anzahl aktiver Log-Streams pro Tenant (Standard ist 10000)
# max_global_streams_per_user: 10000
# Optional: Maximale Größe einer Log-Zeile (Standard 256kB)
# max_line_size: 262144
# --- Optional: Compactor (Bereinigt alte Daten) ---
# compactor:
# working_directory: /loki/compactor
# shared_store: filesystem
# compaction_interval: 10m
# retention_enabled: true
# retention_delete_delay: 2h
# retention_delete_worker_count: 150
# --- Optional: Ruler (für Alerts basierend auf Logs) ---
# ruler:
# alertmanager_url: http://alertmanager:9093 # Pfad zu deinem Alertmanager
# storage:
# type: local
# local:
# directory: /loki/rules
# rule_path: /tmp/loki/rules-temp
# ring:
# kvstore:
# store: inmemory
# enable_api: true