# Loki 3.7 (grafana/loki:3.7.10), single binary, lab 6: the LOGS store. # # Logs arrive from the Collector over OTLP (POST /otlp/v1/logs). Loki turns a few RESOURCE # attributes into index labels (service_name, service_instance_id, deployment_environment_name): # few values, small index. Log-record attributes (event, request_id, job_id, trace_id, span_id, # route, status...) are stored as STRUCTURED METADATA next to the line - searchable # (`{service_name="messenger-api"} | trace_id="..."`) without creating a stream per value. # That is why an id such as request_id/attachment_id never becomes a label (it would create a # new stream - and index entries - per request, see docs/DEFENSE.md). auth_enabled: false server: http_listen_port: 3100 grpc_listen_port: 9096 grpc_listen_address: 127.0.0.1 log_level: warn # Lab 7: HTTPS + mandatory client certificate of the internal CA (otel-collector pushes, # grafana queries, prometheus scrapes). gRPC is internal to the single binary: loopback only. http_tls_config: cert_file: /run/secrets/loki.crt key_file: /run/secrets/loki.key client_auth_type: RequireAndVerifyClientCert client_ca_file: /run/secrets/internal-ca.crt common: instance_addr: 127.0.0.1 path_prefix: /loki storage: filesystem: chunks_directory: /loki/chunks rules_directory: /loki/rules replication_factor: 1 ring: kvstore: store: inmemory schema_config: configs: - from: 2026-01-01 store: tsdb object_store: filesystem schema: v13 index: prefix: index_ period: 24h limits_config: allow_structured_metadata: true retention_period: 168h # 7 days of logs, deleted by the compactor ingestion_rate_mb: 8 ingestion_burst_size_mb: 16 max_query_lookback: 168h volume_enabled: true compactor: working_directory: /loki/compactor retention_enabled: true delete_request_store: filesystem ingester: wal: dir: /loki/wal # on the named volume: a restart does not lose buffered logs pattern_ingester: enabled: false analytics: reporting_enabled: false