ELMA365 On-Premises > ELMA365 On-Premises Enterprise > Install add-on components for ELMA365 / Install Loki

Install Loki

Loki is an open platform for collecting, indexing, and storing logs. It enables debugging and problem detection in the system based on log data analysis and monitoring.

Beforehand, install the monitoring tools.

The installation of Loki consists of five steps:

  1. Download the Helm chart and the configuration file.
  2. Create buckets and set lifecycle rules in MinIO.
  3. Fill in the configuration file.
  4. Install the Loki chart using Helm in the Kubernetes cluster.
  5. Configure the connection to Loki in Grafana data sources.

Начало внимание

When installing Loki + Tempo, start with the Loki addon. This allows preserving cross-linking settings, as they are initially configured in the Datasource settings.

Конец внимание

Step 1: Download the Helm chart and the configuration file

To install over the internet, obtain the configuration file values- loki.yaml by executing the command:

helm repo add elma365 https://charts.elma365.tech
helm repo update
helm show values elma365/loki > values-loki.yaml

Getting configuration file for installation in a closed environment without internet access,

Step 2: Create buckets and set lifecycle rules in MinIO

1. Create alias for MinIO:

mc alias set my_alias http://minio.local accessKey secretKey

2. Create buckets with the names admins, chunks and rules:

mc mb -p my_alias/admin --region=ru-central-1
mc mb -p my_alias/chunks --region=ru-central-1
mc mb -p my_alias/rules --region=ru-central-1

3. Set lifecyle for chunks, deleting objects older than 60 days:

mc ilm import my_alias/chunks <<EOF
{
  "Rules": [
      {
          "Expiration": {
          "Days": 60
          },
          "ID": "Delete objects from the Loki bucket older than 60 days",
          "Status": "Enabled"
          }
  ]
}
EOF

Step 3: Fill in the configuration file

Fill in the values-loki.yaml configuration file to install Loki

Filling in connection parameters to a private registry for installation in a closed environment without internet access

Step 4: Install the Loki chart using Helm in the Kubernetes cluster

Execute the installation of the Loki chart in namespace monitoring.

For online installation via the internet:

helm upgrade --install -n monitoring loki elma365/loki -f values-loki.yaml

For offline installation without internet access, navigate to the directory with the downloaded chart and execute the command:

helm upgrade --install loki ./loki -f values-loki.yaml -n monitoring

Step 5: Configure the connection to Loki in Grafana data sources

The Loki data source is added during installation. You can check it using the path:  Home > Administration > Data source > Loki

URLhttp://loki-gateway

install-loki-1

Example of viewing logs for mongodb ({app="mongodb"} |= "error" != "timeout"):
 

install-loki-2

Found a typo? Highlight the text, press ctrl + enter and notify us