Alert rules


Alert Rules

How to create Consumer Alert rules, Producer Alert rules and Infrastructure Alert rules.

Introduction 

Lenses provides a set with pre-configured Alert Rules and the ability to create Consumer Alert rules. When rules are enabled, Lenses monitors the relevant resources and triggers an Alert Event any time the condition is met. Events can be integrated with any third party system via the Alert Integration plugins.

One of the Alert Rule property is its alert id, which is a low level identifier of an Alert type (do not mistake with category). alert id is necessary when using API or CLI to manage alerts.

Required permission 

PermissionTypeDescription
Alert Rules / ViewAdminAllows to view alert rules
Alert Rules / ManageAdminAllows to add/remove/update alert rules

Access Management & permissions

Alert Rules types 

  • Infrastructure, built-in rules you can switch on/off
  • Data Produced, custom rules you can set for specific Kafka topics
  • Consumer Rules, custom rules you can set for specific consumer-topic combinations
  • Apps, currently applies to Kafka Connectors

Review the Alert matrix

Infrastructure alerts 

Infrastructure are built-in rules. They can be enabled or disabled but also can be routed into any channel you configured.

From this screen, you can also edit their destination by clicking on the edit icon next to each rule.

infrastructure alerts to Lenses.io

Review the Alert matrix - Infrastructure

Consumer alerts 

data sources to Lenses.io

Consumer rules refer to the Kafka Consumers, and are based on threshold added by the user. Similarly to Infrastructure rules, you can also specify which channel they will be routed to. Alert id for Consumer alerts is 2000.

For example, you can notify a team when events are generated into a Dead Letter Queue topic, or the amount of events in a day, or in a time window does not meet the expected behavior. To create a new rule, click on the New Rule button from the listing page. Set the alert details, and select who should be notified when the alert rule triggers.

Alert Rules Consumer Rules Create

To edit, or delete an existing alert, use the edit icon next to the desired rule:

Alert Rules Consumer Rules Edit

Data producer alerts 

Kafka Consumers Data alert

Data Produced Rules refer to the Kafka topics and are based on the threshold added by the user. Similarly to Infrastructure rules, you can also specify which channel they will be routed to.

From this screen, you can also edit their destination by clicking on the edit icon next to each rule. Data Produced rules cannot be disabled, but they can be deleted.

To create a new rule, click on the New Rule button from the listing page.

Kafka Producer Data alert

Edit 

To edit Data Produced rule, click on the edit icon next to the desired rule from the listing page.

Kafka Producer Data alert edit/delete

Delete 

To delete Data Produced rule, click on the trash icon next to the desired rule from the listing page.

Connector alerts and restarts 

Connector task failures can be alerted on, additionally Lenses can restart the tasks with a backoff. Select the Apps tab, enter the channel to send alerts to and optionally enable restarts.

Connector alerts and auto restarts