Hi all. I have a configuration question about Loki rulerConfig
block.
I am using grafana/loki
helm chart . On our test cluster, I am running Loki with single tenant (multi tenancy enabled). rulerConfig
block is as follows for this test cluster:
rulerConfig:
external_url: https://external-grafana-url.example.com
evaluation_interval: 1m
poll_interval: 1m
rule_path: "/var/loki/rules"
alertmanager_url: "http://mimir-gateway.namespace.svc.cluster.local/alertmanager"
enable_alertmanager_discovery: false
enable_alertmanager_v2: false
notification_queue_capacity: 10000
notification_timeout: 10s
alertmanager_client:
type: Basic
credentials_file: /etc/loki/secrets/alertmanager.credentials
flush_period: 1m
enable_api: true
enabled_tenants: ""
query_stats_enabled: true
disable_rule_group_label: false
wal:
dir: "/var/loki/ruler-wal"
remote_write:
enabled: true
clients:
tenant2:
url: "http://mimir-gateway.namespace.svc.cluster.local/api/v1/push"
headers:
X-Scope-OrgId: tenant1
authorization:
type: basic-auth
credentials_file: /etc/loki/secrets/prometheus_remotewrite.credentials
This works with 1 tenant, as expected.
Now the problem: In our production environment we have two tenants for Mimir, Loki and Alert Manager and two different Grafana instances for these tenants.
In the above rulerConfig
block:
- How should I define Grafana External URL? There is only one in the documentation
- How should I define Alert Manager tenant ID? There is no header option
- How should I define second tenant’s Alert Manager configuration?
- I believe
remote_write.clients
will be OK with another block, isn’t it?
I need this rulerConfig
block to route alerts to Grafana OnCall and also to have recording rules on Loki queries…
Any help is appreciated.