github.com/yankunsam/loki/v2@v2.6.3-0.20220817130409-389df5235c27/production/nomad/loki-distributed/config.yml (about)

     1  auth_enabled: false
     2  
     3  server:
     4    log_level: info
     5    http_listen_port: {{ env "NOMAD_PORT_http" }}
     6    grpc_listen_port: {{ env "NOMAD_PORT_grpc" }}
     7    # grpc_tls_config:
     8    #   client_auth_type: "RequireAndVerifyClientCert"
     9    #   client_ca_file: "/secrets/certs/CA.pem"
    10    #   cert_file: "/secrets/certs/cert.pem"
    11    #   key_file: "/secrets/certs/key.pem"
    12  
    13  common:
    14    replication_factor: 2
    15    # Tell Loki which address to advertise
    16    instance_addr: {{ env "NOMAD_IP_grpc" }}
    17    # Failure domain
    18    # Must be the same as specified in job constraints
    19    instance_availability_zone: {{ env "node.unique.name" }}
    20    zone_awareness_enabled: true
    21    ring:
    22      # Tell Loki which address to advertise in ring
    23      instance_addr: {{ env "NOMAD_IP_grpc" }}
    24      kvstore:
    25        store: consul
    26        prefix: loki/
    27        consul:
    28          host: {{ env "attr.unique.network.ip-address" }}:8500
    29  
    30  # ingester_client:
    31  #   grpc_client_config:
    32  #     grpc_compression: snappy
    33  #     tls_enabled: true
    34  #     tls_ca_path: "/secrets/certs/CA.pem"
    35  #     tls_cert_path: "/secrets/certs/cert.pem"
    36  #     tls_key_path: "/secrets/certs/key.pem"
    37  
    38  ingester:
    39    wal:
    40      dir: {{ env "NOMAD_ALLOC_DIR" }}/data/wal
    41      flush_on_shutdown: true
    42      replay_memory_ceiling: "1G"
    43  
    44  # query_scheduler:
    45  #   grpc_client_config:
    46  #     grpc_compression: snappy
    47  #     tls_enabled: true
    48  #     tls_ca_path: "/secrets/certs/CA.pem"
    49  #     tls_cert_path: "/secrets/certs/cert.pem"
    50  #     tls_key_path: "/secrets/certs/key.pem"
    51  
    52  frontend:
    53    scheduler_address: loki-query-scheduler.service.consul:9096
    54    compress_responses: true
    55    log_queries_longer_than: 5s
    56    # grpc_client_config:
    57    #   grpc_compression: snappy
    58    #   tls_enabled: true
    59    #   tls_ca_path: "/secrets/certs/CA.pem"
    60    #   tls_cert_path: "/secrets/certs/cert.pem"
    61    #   tls_key_path: "/secrets/certs/key.pem"
    62  
    63  frontend_worker:
    64    scheduler_address: loki-query-scheduler.service.consul:9096
    65    # grpc_client_config:
    66    #   grpc_compression: snappy
    67    #   tls_enabled: true
    68    #   tls_ca_path: "/secrets/certs/CA.pem"
    69    #   tls_cert_path: "/secrets/certs/cert.pem"
    70    #   tls_key_path: "/secrets/certs/key.pem"
    71  
    72  schema_config:
    73    configs:
    74    - from: 2022-05-15
    75      store: boltdb-shipper
    76      object_store: s3
    77      schema: v12
    78      index:
    79        prefix: index_
    80        period: 24h
    81  
    82  storage_config:
    83    boltdb_shipper:
    84      # Nomad ephemeral disk is used to store index and cache
    85      # it will try to preserve /alloc/data between job updates
    86      active_index_directory: {{ env "NOMAD_ALLOC_DIR" }}/data/index
    87      cache_location: {{ env "NOMAD_ALLOC_DIR" }}/data/index-cache
    88      shared_store: s3
    89      index_gateway_client:
    90        server_address: loki-index-gateway.service.consul:9097
    91        # grpc_client_config:
    92        #   grpc_compression: snappy
    93        #   tls_enabled: true
    94        #   tls_ca_path: "/secrets/certs/CA.pem"
    95        #   tls_cert_path: "/secrets/certs/cert.pem"
    96        #   tls_key_path: "/secrets/certs/key.pem"
    97  
    98    aws:
    99      endpoint: https://minio.service.consul
   100      bucketnames: loki
   101      region: us-west-1
   102      access_key_id: ${S3_ACCESS_KEY_ID}
   103      secret_access_key: ${S3_SECRET_ACCESS_KEY}
   104      s3forcepathstyle: true
   105  
   106  compactor:
   107    working_directory: {{ env "NOMAD_ALLOC_DIR" }}/compactor
   108    shared_store: s3
   109    compaction_interval: 24h
   110    retention_enabled: true
   111  
   112  ruler:
   113    alertmanager_url: https://alertmanager.service.consul
   114    enable_alertmanager_v2: true
   115    enable_api: true
   116    external_url: https://loki-ruler.service.consul
   117    rule_path: {{ env "NOMAD_ALLOC_DIR" }}/tmp/rules
   118    storage:
   119      type: local
   120      local:
   121        directory: {{ env "NOMAD_TASK_DIR" }}/rules
   122    wal:
   123      dir: {{ env "NOMAD_ALLOC_DIR" }}/data/ruler
   124  
   125  limits_config:
   126    enforce_metric_name: false
   127    reject_old_samples: true
   128    reject_old_samples_max_age: 168h