Alerting: Chore: Fix event name in ngalert/README.md (#49829)

Fix event name from *evalContext to *evaluation as #45144.
This commit is contained in:
kyamau 2022-05-31 11:30:56 +09:00 committed by GitHub
parent 855655cc9c
commit 8b2a3a018d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -27,13 +27,13 @@ The scheduler runs at a fixed interval, called its heartbeat, in which it does a
1. Fetch the alert rules for all organizations (excluding disabled)
2. Start a goroutine (if this is a new alert rule or the scheduler has just started) to evaluate the alert rule
3. Send an `*evalContext` event to the goroutine for each alert rule if its interval has elapsed
3. Send an `*evaluation` event to the goroutine for each alert rule if its interval has elapsed
4. Stop the goroutines for all alert rules that have been deleted since the last heartbeat
The function that evaluates each alert rule is called `ruleRoutine`. It waits for an `*evalContext` event (sent each
The function that evaluates each alert rule is called `ruleRoutine`. It waits for an `*evaluation` event (sent each
interval seconds elapsed and is configurable per alert rule) and then evaluates the alert rule. To ensure that the
scheduler is evaluating the latest version of the alert rule it compares its local version of the alert rule with that
in the `*evalContext` event, fetching the latest version of the alert rule from the database if the version numbers
in the `*evaluation` event, fetching the latest version of the alert rule from the database if the version numbers
mismatch. It then invokes the Evaluator which evaluates any queries, classic conditions or expressions in alert rule
and passes the results of this evaluation to the State Manager. An evaluation can return no results in the case of
NoData or Error, a single result in the case of classic conditions, or more than one result if the alert rule is