RousselTMLEARNING

Observability

Alerts, connectors and SLOs in Kibana

Create alert rules in Kibana (Elasticsearch query, ES|QL, custom threshold, logs), configure connectors, manage actions, frequencies and snoozing, and define SLOs.

1. Rules #

What Kibana watches.

Rule types #

Rule typeUsage
Elasticsearch query (KQL, DSL or ES|QL)Alert when a query returns results or exceeds a threshold
Custom thresholdThreshold on an aggregation of logs or metrics, with grouping
Log thresholdNumber of logs matching a criterion
APM (latency, error rate, anomaly)Thresholds on instrumented services
SLO burn rateError budget consumption
Index thresholdSimple aggregation on an index
// Règle ES|QL : plus de 50 erreurs 5xx en 5 minutes pour un service
FROM logs-*
| WHERE @timestamp > NOW() - 5 minutes AND http.response.status_code >= 500
| STATS erreurs = COUNT(*) BY service.name
| WHERE erreurs > 50

2. Connectors and actions #

Where notifications go.

Configuring #

A connector (email, Slack, Teams, webhook, PagerDuty, Jira, ServiceNow, index, server log...) is defined once and reused by rules. Each action picks a connector, a message (with variables such as {{context.message}} or {{alert.id}}) and a frequency.

SettingEffect
Check frequencyEvery minute, 5 minutes...
Summary or per alertOne grouped notification or one per alert
Notify on status changeAvoids repetitions
Maintenance windowsSuspend notifications during an intervention
RecoveredNotify when the alert resolves
Good to know: Depending on the Elastic license, some connectors (Slack, webhook, PagerDuty...) are not available on the free license; the Index and Server log connectors are.

3. SLOs #

Objectives in Elastic Observability.

Defining an SLO #

The SLO application computes an SLI from a query (custom KQL, APM metrics, histogram), a target (99.5%) and a window (rolling 30 days), then automatically creates burn rate alerts.

Indicateur : Custom query
  Index : logs-nginx.access-*
  Bons événements : http.response.status_code < 500
  Total : *
Objectif : 99.5 % sur 30 jours glissants
Alerte : burn rate (fenêtres longues et courtes) vers le connecteur d'astreinte
Good practice: The concepts (ratio SLI, budget, multi-window burn rate) are those detailed in the SRE course: mastering them makes these screens immediately understandable.

Related articles

The observability trilemma: cost, completeness and performance, and how solutions resolve it

Understanding the observability trilemma (cost, data completeness, query performance), its three trade-offs, …

Kibana Maps and Canvas: geographic maps and presentations

Build maps with Kibana Maps (document, aggregation and choropleth layers, ES|QL) and dynamic presentations wi…

Machine learning in Elastic: anomaly detection and AIOps

Automatically detect abnormal behaviour: anomaly detection jobs, datafeeds, detectors, influencers, alerts, f…

Keep learning

Support us

♥ SUPPORT US

Support RousselTM Learning

Courses, articles, labs and certificates stay free with no intrusive ads. A voluntary contribution, of any amount you choose, pays for hosting, lab environments and new content.

Contribute with PayPal Any amount · card or PayPal accountLearn more
QR code PayPal
Or scan this QR code with your phone

Thank you, every contribution counts!