RousselTMLEARNING

Article · OpenObserve: from discovery to expertise

Alerts and pipelines

1. Alerts #

From stream to notification.

The chain #

The chain of an alert in OpenObserve
An alert needs a destination, which itself needs a template.

Creation order matters: the template, then the destination using it, then the alert. We tested this chain with a real webhook, which received: {"alerte":"erreurs_paiement","flux":"commandes","nb":"1"}.

A='root@example.com:Complexpass#123'
curl -u "$A" -H 'Content-Type: application/json' \
  http://localhost:5080/api/default/alerts/templates \
  -d '{"name":"tpl_simple","type":"http","title":"",
       "body":"{\"alerte\":\"{alert_name}\",\"flux\":\"{stream_name}\",\"nb\":\"{alert_count}\"}"}'

curl -u "$A" -H 'Content-Type: application/json' \
  http://localhost:5080/api/default/alerts/destinations \
  -d '{"name":"webhook_tp","url":"http://echo:8080/alerte","method":"post",
       "skip_tls_verify":false,"template":"tpl_simple","headers":{},"type":"http"}'
A='root@example.com:Complexpass#123'
curl -u "$A" -H 'Content-Type: application/json' \
  http://localhost:5080/api/v2/default/alerts \
  -d '{"name":"erreurs_paiement","stream_type":"logs","stream_name":"commandes",
       "is_real_time":false,"enabled":true,"owner":"root@example.com","folder_id":"default",
       "description":"Au moins une erreur en une minute","row_template":"","context_attributes":{},
       "query_condition":{"type":"sql","conditions":null,"promql":null,"promql_condition":null,
         "aggregation":null,"vrl_function":null,"multi_time_range":null,
         "sql":"SELECT count(*) AS nb FROM commandes WHERE level='"'"'error'"'"'"},
       "trigger_condition":{"period":1,"threshold":1,"frequency":1,"cron":"","operator":">=",
         "silence":0,"frequency_type":"minutes","timezone":null,"tolerance_in_seconds":null},
       "destinations":["webhook_tp"]}'

Scheduled or real-time #

TypeEvaluationUse
ScheduledA SQL or PromQL query run at a regular intervalThresholds and aggregates: error rate, percentile
Real-timeEvaluated at ingestion, event by eventA specific event to report immediately

The local webhook pitfall #

Destination URL blocked by SSRF guard message? For security, OpenObserve refuses webhooks to a private address: neighbouring container, internal network, 127.0.0.1. Allow your targets precisely with ZO_SSRF_ALLOWED_HOSTS or ZO_SSRF_ALLOWED_CIDRS. ZO_SKIP_SSRF_CHECKS=true disables the protection: keep it for a lab.

2. Pipelines #

Processing data before storing it.

Real-time and scheduled #

A pipeline chains a source, conditions, functions and one or more destinations. It is built graphically in the UI.

TypeSourceTypical use
Real-timeA stream, at ingestionMask a field, enrich, route to another stream
ScheduledA query run periodicallyProduce a stream of aggregates, like a recording rule
Best practice: filter and mask sensitive data in a real-time pipeline, before storage. A read-time filter removes nothing from disk.

📄 Alerts and pipelines in OpenObserve →

My progress

  • ⏱ Estimated time : ≈ 5 min

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

⭐ Rate this lesson

5.0 initial rating from the teaching team

Sign in to rate this lesson →

💬 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

Exploring data in OpenObserve: SQL, PromQL and VRL

Search with SQL, query metrics with PromQL, optimize a stream (indexes, partitions, retention) an...

Installing OpenObserve and ingesting your first data

Install OpenObserve with Docker Compose or the binary, configure it with its ZO_* variables, send...

OpenObserve: architecture and concepts

Understanding OpenObserve: Parquet storage, deployment modes, roles (router, ingester, querier, c...

Sending logs, metrics and traces to OpenObserve

OpenObserve receiving endpoints: JSON, bulk, OTLP with the OpenTelemetry Collector, Prometheus re...

Alerts and dashboards in ClickStack

Building charts and dashboards in ClickStack, creating alerts on a search or a chart, sending the...

OpenObserve in production: best practices

Choose your deployment mode, organize streams, secure, back up and monitor OpenObserve in product...

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

Understanding the observability trilemma (cost, data completeness, query performance), its three ...

Alerts, connectors and SLOs in Kibana

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

Datadog best practices: tags, costs, alerts and governance

Checklist for using Datadog effectively: unified tagging, cost control (hosts, logs, custom metri...

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!