Links

Mimir Integration

Mimir is an open source, horizontally scalable, highly available, multi-tenant TSDB for long-term storage for Prometheus.
You can use our example prometheus setup to test the Mimir integration

In ilert

Create a Mimir alert source

  1. 1.
    Go to Alert sources -> Alert sources and click on Create new alert source
  1. 1.
    Search for Mimir in the search field, click on the Mimir tile, and click on Next.
  2. 2.
    Give your alert source a name, optionally assign teams, and click Next.
  3. 3.
    Select an escalation policy by creating a new one or assigning an existing one.
  4. 4.
    Select your Alert grouping preference and click Continue setup. You may click Do not group alerts for now and change it later.
  5. 5.
    The next page shows additional settings such as customer alert templates or notification prioritiy. Click on Finish setup for now.
  6. 6.
    On the final page, a Mimir URL will be generated that you will need later in this guide.

In Prometheus Alertmanager

In order to be able to use mimir alerts and receive notifications, you need first configure and start alertmanager
  1. 1.
    Install Prometheus Alertmanager in any way that suits your needs. For more information about the alertmanager installation process please visit https://prometheus.io/docs/alerting/latest/alertmanager/
  2. 2.
    Configure Alertmanager receivers in order to inform ilert every time there's an alert. In the example below replace the previously created Mimir URL:
alertmanager.yaml
1
receivers:
2
- name: "ilert"
3
webhook_configs:
4
- url: "<your alert source url here>"
5
send_resolved: true
You could also split alert to high and low priority by creating two alert sources accordingly
alertmanager.yaml
1
receivers:
2
- name: "high-priority"
3
webhook_configs:
4
# high priority alert source url
5
- url: "<your high priority alert source url here>"
6
send_resolved: true
7
- name: "low-priority"
8
webhook_configs:
9
# low priority alert source url
10
- url: "<your low priority alert source url here>"
11
send_resolved: true

In Mimir

  1. 1.
    Install Mimir in any way that suits your needs.
  2. 2.
    Configure the Mimir alert rules in order to trigger alerts regarding the rule expression. For example:
mimir-alert-rules.yaml
1
groups:
2
- name: mimir-critical
3
rules:
4
- alert: MimirIngesterUnhealthy
5
expr: |
6
min by (cluster, namespace) (cortex_ring_members{state="Unhealthy", name="ingester"}) > 0
7
for: 15m
8
labels:
9
severity: critical
10
annotations:
11
summary: Mimir cluster has unhealthy ingesters alert
12
description: "Mimir cluster has unhealthy ingesters \n VALUE = {{ $value }}\n LABELS = {{ $labels }}"
  1. 3.
    Configure the Mimir ruler to send alerts to an external alertmanager and point the alert rules folder:
mimir-config.yaml
1
ruler:
2
alertmanager_url: http://alertmanager:9093
3
enable_api: true
4
5
ruler_storage:
6
backend: local
7
local:
8
directory: /etc/alertmanager

FAQ

Will alerts in ilert be resolved automatically?
Yes, as soon as the Alertmanager sends a "RESOLVE" event, the associated alert is automatically resolved in ilert.