RousselTMLEARNING

TP · Kibana and Elastic Observability: from discovery to expertise

Lab: ES|QL alert rule and connector

What you will learn in this TP
  • Create a connector
  • Write an ES|QL rule
  • Trigger and observe the alert

Introduction #

What you will learn in this section
  • Create a connector
  • Write an ES|QL rule
  • Trigger and observe the alert

Context. The team wants to be notified when a host returns too many errors, without watching Discover all the time.

Prerequisites: Lab 1 completed  ·  Estimated time: 40 min

An end-to-end alert in Kibana.

Setup #

Guided steps, with their solutions.

  1. 1. Create an events index

    Why? The sample data is frozen in time: a dedicated index lets you inject errors “now”.

    Create the lab-web index and inject a few successful requests.
  2. 2. Create a connector

    Why? The Server log connector writes to the Kibana logs: handy for testing without an external service.

    In Stack Management > Connectors, create a Server log connector named “Kibana log” (or a Slack connector if you have a test webhook).
  3. 3. Write the rule

    Why? ES|QL expresses the threshold and the grouping in a single query.

    Create an Elasticsearch query rule in ES|QL mode, checked every minute, that fires when a host has more than 5 errors over 5 minutes. Add an action to the connector.
  4. 4. Trigger the alert

    Why? Injecting errors tests the whole chain: query, threshold, action.

    Inject 10 503 errors on web-2 and wait for the next check.
  5. 5. Follow the alert

    Why? Kibana keeps the history of alerts and their actions.

    Open the rule page: the web-2 alert is active. What happens 5 minutes later, with no new errors?

Difficulty level : ●●●○○ (3/5)

My progress

  • ⏱ Estimated time : ≈ 40 min

Sign in to track your progress and take notes. Sign in

💬 Questions about this lesson

No questions yet: be the first to ask for help or share your configuration.

Ask a question about this lesson →

Recommended Articles

Alerts, connectors and SLOs in Kibana

Create alert rules in Kibana (Elasticsearch query, ES|QL, custom threshold, logs), configure conn...

Elastic Observability: logs, infrastructure, APM and synthetics

Elastic Observability features: log exploration, infrastructure inventory with Elastic Agent and ...

Elastic Security: SIEM, detection rules and investigation

Use Elastic Security as a SIEM: ECS data sources, detection rule types (query, EQL, ES|QL, thresh...

Kibana and Elastic Observability best practices

Checklist for running Kibana in production: versions, security, spaces and roles, versioned dashb...

Visualizing in Kibana: Lens, dashboards and saved objects

Build visualizations with Lens, assemble interactive dashboards (filters, controls, links), and m...

Machine learning in Elastic: anomaly detection and AIOps

Automatically detect abnormal behaviour: anomaly detection jobs, datafeeds, detectors, influencer...

Elastic path project: centralising and using logs

The validation project of the "Elastic Stack mastery" path: Elastic Agent and Fleet, Logstash, El...

Kibana Maps and Canvas: geographic maps and presentations

Build maps with Kibana Maps (document, aggregation and choropleth layers, ES|QL) and dynamic pres...

Kibana: role, installation and first steps

What Kibana is in the Elastic suite, how to install it with Elasticsearch (start-local, Docker), ...

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!