Prometheus Alert Manager and Mimir

Hello,

I am trying to configure Grafana Mimir version 2.12 (local binary) to work with Alertmanager version 0.27, triggering alerts configured in a file /etc/mimir/alert_rules. However, I can’t find documentation showing me how to set up Mimir to work this way. Could someone help me?

In my configuration, I set the following options, but which options should I use to read the file with the alerts? Or what is the correct way to work with Mimir + Alertmanager?

alertmanager:
  enable_api: true
  external_url: http://localhost:9093

Hi! You want to read this documentation here.

Hello,

Thank you for the response.

While trying to follow the steps on the recommended [page] when running the command to load the alertmanager, I am getting an API error:

mimirtool alertmanager load /etc/alertmanager/alertmanager.yml --address=http://X.X.X.X:9093 --id=FirstServer
ERRO[0000] response body=“{"status":"deprecated","error":"The Alertmanager v1 API was deprecated in version 0.16.0 and is removed as of version 0.28.0 - please use the equivalent route in the v2 API"}\n” status=“410 Gone”
mimirtool: error: POST request to http://127.0.0.1:9093/api/v1/alerts failed: server returned HTTP status: 410 Gone, body: “{"status":"deprecated","error":"**The Alertmanager v1 API was deprecated in version 0.16.0 and is removed as of version 0.28.0 - please use the equivalent route in the v2 API**”}\n", try --help

I am using Mimir 2.12.0 and Mimirtool 2.13.0.

Using the command line, how could I solve this issue?

Hello! Just to confirm, are you using the Mimir Alertmanager or the Prometheus Alertmanager? You need to use the Mimir Alertmanager. You can find the documentation for it here.

Hi,

I’m using mimir alertmanager, I’m running mimir with the option -target=all,alertmanager when I started it

It doesn’t seem right to me. Mimirtool is talking to the wrong API. It should be talking to the Mimir Alertmanager configuration API, but instead it’s talking to the plain Prometheus Alertmanager API. Is port 9093 correct? The default port for Mimir is 8080.