Skip to content

Setting up Loki

Loki is a horizontally-scalable, highly-available, multi-tenant log aggregation system inspired by Prometheus. It is designed to be very cost-effective and easy to operate. It does not index the contents of the logs, but rather a set of labels for each log stream.

Add the grafana helm repo

helm repo add grafana https://grafana.github.io/helm-charts
helm repo update

Install the helm chart

ou will need to make changes depending on how you want to configure loki. Example files are included in genetack/base-helm-configs. Choose one relevant to your deploy, edit for revelant data, and ensure you copy the file to /etc/genestack/base-helm/loki-helm-overrides.yaml

helm upgrade --install \
             --values /etc/genestack/helm-configs/loki/loki-helm-overrides.yaml \
             loki grafana/loki \
             --create-namespace \
             --namespace grafana \
             --version 5.47.2

Abstract

If you plan on using Swift as a backend for log storage see the loki-helm-swift-overrides-example.yaml file in the helm-configs/loki directory.

global:
  dnsService: "coredns"
minio:
  enabled: false
loki:
  auth_enabled: false
  configStorageType: Secret
  ingester:
    autoforget_unhealthy: true
  storage:
    bucketNames:
      chunks: chunks
      ruler: ruler
      admin: admin
    type: swift
    swift:
      auth_url: https://identity.api.rackspacecloud.com/v1.0
      username: < USERNAME > # TODO: Update with valid username
      password: < PASSWORD > # TODO: Update with valid password
      container_name: < CONTAINER > # TODO: Update with valid container
      region_name: < REGION > # TODO: Update with valid region

Abstract

If you plan on using S3 as a backend for log storage see the loki-helm-s3-overrides-example.yaml file in the helm-configs/loki directory.

global:
  dnsService: "coredns"
minio:
  enabled: false
loki:
  auth_enabled: false
  configStorageType: Secret
  ingester:
    autoforget_unhealthy: true
  storage:
    bucketNames:
      chunks: < CHUNKS BUCKET NAME > # TODO: Update with relevant bucket name for chunks
      ruler: < RULER BUCKET NAME > # TODO: Update with relevant bucket name for ruler
      admin: < ADMIN BUCKET NAME > # TODO: Update with relevant bucket name for admin
    type: s3
    s3:
      endpoint: < ENDPOINT URL > # TODO: Update with valid enpoint URL
      region: < REGION > # TODO: Update with valid region
      secretAccessKey: < SECRET ACCESS KEY > # TODO: Update with valid secret access key
      accessKeyId: < ACCESS KEY ID > # TODO: Update with access key id
      s3ForcePathStyle: false
      insecure: [ true | false ] # TODO: True if valid cert or false if not

Abstract

If you plan on using Minio as a backend for log storage see the loki-helm-s3-overrides-example.yaml file in the helm-configs/loki directory.

global:
  dnsService: "coredns"
minio:
  enabled: true
loki:
  auth_enabled: false
  configStorageType: Secret
  ingester:
    autoforget_unhealthy: true