Can Mimir AlertManager be used for Loki Ruler? #8267
Replies: 2 comments 13 replies
-
hey, it should work, using it in this setup as well.
Do you have multi-tenancy enabled everywhere? Loki in that case forwards the |
Beta Was this translation helpful? Give feedback.
-
We also used Mimir and Loki without multi-tenancy and was struck by this issue. We resolved it by adding this to our gateway:
nginx:
config:
httpSnippet: |
# Force override the X-Scope-OrgID header
# as clients like Loki tries to use "fake"
# but a Mimir without tenants should use "anonymous"
map $http_x_scope_orgid $http_x_scope_orgid {
"" "anonymous";
} This adds a snippet to the Nginx config used in the gateway so it always overrides the X-Scope-OrgID with mimir/operations/helm/charts/mimir-distributed/values.yaml Lines 3484 to 3492 in 7ef5c82 Then in our Loki config we point loki-ruler to the Mimir gateway: rulerConfig:
rule_path: /tmp/loki/rules-temp
storage:
type: local
local:
directory: /etc/loki/rules
external_labels:
category: logs
ring:
kvstore:
store: memberlist
alertmanager_url: http://mimir-gateway.mimir.svc.cluster.local:80/alertmanager To verify that this works, I created some Loki alerts that will always fire and then port-forwarded the Mimir gateway ( |
Beta Was this translation helpful? Give feedback.
-
Hi,
I have been unable to get alerts to actually notify when using Alert Rules in the Loki helm chart, pointing
alertmanager_url
at the Mimir Alertmanager instance. I've searched through the docs extensively but I can't seem to uncover what I'm missing. Is there a catch or is this just not designed to work?I can see
rule evaluating
logs in the ruler and the alert is evenFiring
in the Grafana Alerting dashboard, but nothing is being notified and I have not found evidence of errors/misconfiguration anywhere.Beta Was this translation helpful? Give feedback.
All reactions