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. Create an events index
Why? The sample data is frozen in time: a dedicated index lets you inject errors “now”.
Create thelab-webindex and inject a few successful requests.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. 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. Trigger the alert
Why? Injecting errors tests the whole chain: query, threshold, action.
Inject 10 503 errors onweb-2and wait for the next check.5. Follow the alert
Why? Kibana keeps the history of alerts and their actions.
Open the rule page: theweb-2alert is active. What happens 5 minutes later, with no new errors?
Difficulty level : ●●●○○ (3/5)
My progress
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.
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), ...