﻿# Install Mimir

> [HTML Version](install-mimir.html)

Mimir is a high-performance database designed for long-term storage of time series of monitoring metrics. Mimir retrieves data from source systems using the **Prometheus Remote-Write** option and stores it using external object stores such as S3 or GCS.

**There are several steps to install and configure Mimir on your server:**

1. [Download the Helm chart and configuration file](#download-helm-chart).

2. [Create buckets in Minio](#create-minio-backets).

3. [Fill in the configuration file](#filling-out-config-file).

4. [Install the Kubernetes cluster of the Mimir chart using the helm](#install-chart-mimir).

5. [Configure Mimir connection in Grafana data sources](#enable-grafana).

## Step 1: Download the Helm chart and configuration file

To install over the Internet, obtain the \[OBJECT\] configuration file by running the following command:

````
helm repo add brix365 https://charts.brix365.com  
helm repo update  
helm show values brix365/mimir > values-mimir.yaml

````
Retrieve configuration file for closed loop installation without internet access

1. On a computer with Internet access, download the archive of the **Mimir** chart latest version from the BRIX repository by running the command:

````
helm repo add brix365 https://charts.brix365.com  
helm repo update  
helm pull brix365/mimir

2. ````
Copy the **mimir-X.Y.Z.tgz** chart archive to the server where the installation will be performed.

3. Unzip the chart and copy the default configuration file \[OBJECT\] to \[OBJECT\].

````
tar -xf loki-X.Y.Z.tgz  
cp mimir/values.yaml mimir-loki.yaml
````

## ````
Step 2: Create buckets in Minio

At this step, you need to create a bucket in the S3 repository.

1. Create \[OBJECT\]** **for Minio by running the following command:

````
mc alias set my\_alias http://minio.local accessKey secretKey

2. ````
Create buckets named **admins**,** chunks** , and **rules** by running the following command:

````
mc mb -p my\_alias/mimir --region=en-central-1

## ````
Step 3: Fill in the configuration file

Fill in the values-mimir.yaml configuration file to install Mimir

````
  
\# -- mimir settings  
mimir-distributed:  
  # -- minio module configuration  
  minio:  
    enabled: false  
  # -- distributor module configuration  
  distributor:  
    replicas: 1  
  # -- ingester module configuration  
  ingester:  
    replicas: 3  
    persistentVolume:  
      size: 10Gi  
  # -- store\_gateway module configuration  
  store\_gateway:  
    persistentVolume:  
      size: 10Gi  
  # -- compactor module configuration  
  compactor:  
    persistentVolume:  
      size: 10Gi  
  # -- mimir configuration  
  mimir:  
    structuredConfig:  
      limits:  
        # -- retention period of the blocks  
        compactor\_blocks\_retention\_period: 1y  
        query\_ingesters\_within: 5h  
      querier:  
        query\_store\_after: 4h  
      alertmanager\_storage:  
        backend: filesystem  
      blocks\_storage:  
        # -- storage configuration  
        backend: s3  
        s3:  
          endpoint: minio.local:9000  
          region: ru-central-1  
          secret\_access\_key: secret\_access\_key  
          access\_key\_id: access\_key\_id  
          bucket\_name: mimir  
          insecure: true  
        tsdb:  
          retention\_period: 5h  
          dir: /data/tsdb  
        bucket\_store:  
          ignore\_blocks\_within: 4h  
      ruler\_storage:  
        backend: filesystem  
  # -- limit setting  
  runtimeConfig:  
    ingester\_limits:  
      max\_ingestion\_rate: 190000  
      max\_series: 19000000  
      max\_tenants: 1000  
      max\_inflight\_push\_requests: 30000  
    distributor\_limits:  
      max\_ingestion\_rate: 190000  
      max\_inflight\_push\_requests: 30000  
      max\_inflight\_push\_requests\_bytes: 50000000  
  nginx:  
    enabled: true                                                                              
````

````
Fill in the parameters of connection to the private registry for closed loop installation without internet access

1. Download BRIX images and upload them to the local image registry. For more information, read  [Download BRIX images](downloadin-images-elma365.md).

2. Set the address and path for \[OBJECT\] and \[OBJECT\].

3. Specify the name of the secret with access rights to the private **registry** in the \[OBJECT\] parameter. Please note, that the secret must be created manually and encrypted in Base64.

````
mimir-distributed:  
  
  nginx:  
  # private registry connection parameters  
    image:  
      registry: docker.io  
      repository: nginxinc/nginx-unprivileged  
      tag: 1.25-alpine  
  
  image:  
    repository: grafana/mimir  
    tag: 2.12.0  
    pullSecrets:  
      - myRegistryKeySecretName  
  
  memcached:  
    image:  
      repository: memcached  
      tag: 1.6.25-alpine  
  memcachedExporter:  
    image:  
      repository: prom/memcached-exporter  
      tag: v0.14.3  
  
  gateway:  
    nginx:  
      image:  
        registry: docker.io  
        repository: nginxinc/nginx-unprivileged  
        tag: 1.25-alpine  
  
  smoke\_test:  
    image:  
      repository: grafana/mimir-continuous-test  
      tag: 2.12.0
````

## ````
Step 4: Install the Kubernetes cluster of the Mimir chart using the helm

Install the **Mimir** chart in  \[OBJECT\].

To install via the Internet:

````
helm upgrade --install -n monitoring mimir brix365/mimir -f values-mimir.yaml

````
For offline installation without internet access, access the directory with the downloaded chart and run the command:

````
helm upgrade --install mimir ./mimir -f values-mimir.yaml -n monitoring

## ````
Step 5: Configure Mimir connection in Grafana data sources

1. Add a Mimir source when installing the [monitoring tool](install-monitoring-tools.md) by completing the path: **Home > Administration > Data source**.

2. Add the Prometheus data source and fill in the **URL** field, specifying the address of the Mimir service: \[OBJECT\].