Loki integration
Feed Loki log alerts into ilert to alert on-call teams to error conditions or anomalies detected in your logs with fast escalation.
Loki is a horizontally scalable, highly available, multi-tenant log aggregation system inspired by Prometheus. With ilert integrated with Loki, log-based triggers, such as error bursts or unusual log patterns, generate alerts sent to on-call responders. These alerts enable focused and contextual escalation workflows, helping teams quickly diagnose and resolve critical issues.
In ilert
Create a Loki alert source
Go to Alerting → Alert sources and click Create new alert source.
Search for Loki, click its tile, and click Next.
Give your alert source a name, optionally assign teams, and click Next.
Choose who gets notified: select Use existing escalation policy and pick a policy, or Generate new escalation policy to start with a basic one that notifies you first. Click Next.

Pick an existing escalation policy, or generate a basic one without leaving the wizard. Select Default grouping and click Continue setup. It groups events by the alert key the integration sets; the other grouping options are easier to judge once events are arriving.
The next page shows more settings, such as notification priority and alert templates. Click Finish setup for now; you can change them later.
On the final page, a Loki URL will be generated that you will need later in this guide.

In Prometheus Alertmanager
In order to be able to use Loki alerts and receive notifications, you need first configure and start alertmanager
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/
Configure Alertmanager receivers in order to inform ilert every time there's an alert. In the example below replace the previously created Loki URL:
In Loki
Install Loki in any way that suits your needs.
Configure the Loki alert rules in order to trigger alerts regarding the rule expression. For example:
Configure the Loki ruler to send alerts to an external alertmanager and point the alert rules folder:
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.
Last updated
Was this helpful?