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:
- Download the Helm chart and configuration file.
- Create buckets in Minio.
- Fill in the configuration file.
- Install the Kubernetes cluster of the Mimir chart using the helm.
- Configure Mimir connection in Grafana data sources.
Step 1: Download the Helm chart and configuration file
To install over the Internet, obtain the values-mimir.yaml
configuration file by running the following command:
helm repo add elma365 https://charts.elma365.tech
helm repo update
helm show values elma365/mimir > values-mimir.yaml
Retrieve configuration file for closed loop installation without internet access
- 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 elma365 https://charts.elma365.tech
helm repo update
helm pull elma365/mimir
- Copy the mimir-X.Y.Z.tgz chart archive to the server where the installation will be performed.
- Unzip the chart and copy the default configuration file
values.yaml to values-mimir.yaml .
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.
- Create
alias
for Minio by running the following command:
mc alias set my_alias http://minio.local accessKey secretKey
- II. 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
- Download BRIX images and upload them to the local image registry. For more information, read Download BRIX images.
- Set the address and path for
image.registry and image.repository . - Specify the name of the secret with access rights to the private registry in the
imagePullSecrets 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 namespace monitoring
.
To install via the Internet:
helm upgrade --install -n monitoring mimir elma365/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
- Add a Mimir source when installing the monitoring tool by completing the path: Home > Administration > Data source.
- Add the Prometheus data source and fill in the URL field, specifying the address of the Mimir service:
http://mimir-nginx:80/prometheus
.