Skip to content

Commit

Permalink
[Alerting][Docs] Fixed formatting issues for alerting documentation. …
Browse files Browse the repository at this point in the history
…Added docs about rules statuses. (elastic#103725)

* [Alerting][Docs] Fixed formatting issues for alerting documentation. Added docs about rules statuses.

* Apply suggestions from code review

Co-authored-by: ymao1 <[email protected]>

* Apply suggestions from code review

Co-authored-by: gchaps <[email protected]>

* fixed due to the comments

Co-authored-by: Kibana Machine <[email protected]>
Co-authored-by: ymao1 <[email protected]>
Co-authored-by: gchaps <[email protected]>
  • Loading branch information
4 people authored Jun 30, 2021
1 parent 524fe6d commit bd0f058
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 5 deletions.
9 changes: 6 additions & 3 deletions docs/user/alerting/alerting-getting-started.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,16 @@ This section describes all of these elements and how they operate together.
[float]
=== Rules

A rule specifies a background task that runs on the {kib} server to check for specific conditions. It consists of three main parts:
A rule specifies a background task that runs on the {kib} server to check for specific conditions. {kib} provides two types of rules: stack rules that are built into {kib} and domain rules that are registered by Kibana apps. Refer to <<rule-types,Rule types>> for more information.

A rule consists of three main parts:

* *Conditions*: what needs to be detected?
* *Schedule*: when/how often should detection checks run?
* *Actions*: what happens when a condition is detected?

For example, when monitoring a set of servers, a rule might:
For example, when monitoring a set of servers, a rule might:

* Check for average CPU usage > 0.9 on each server for the last two minutes (condition).
* Check every minute (schedule).
* Send a warning email message via SMTP with subject `CPU on {{server}} is high` (action).
Expand Down Expand Up @@ -136,4 +139,4 @@ Functionally, {kib} alerting differs in that:
At a higher level, {kib} alerting allows rich integrations across use cases like <<xpack-apm,*APM*>>, <<metrics-app,*Metrics*>>, <<xpack-siem,*Security*>>, and <<uptime-app,*Uptime*>>.
Pre-packaged *rule types* simplify setup and hide the details of complex, domain-specific detections, while providing a consistent interface across {kib}.

--
--
11 changes: 11 additions & 0 deletions docs/user/alerting/create-and-manage-rules.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,17 @@ You can perform these operations in bulk by multi-selecting rules, and then clic
[role="screenshot"]
image:images/bulk-mute-disable.png[The Manage rules button lets you mute/unmute, enable/disable, and delete in bulk,width=75%]

[float]
=== Rule status

A rule can have one of the following statuses:

`active`:: The conditions for the rule have been met, and the associated actions should be invoked.
`ok`:: The conditions for the rule were previously met, but no longer. Changed to `recovered` in the 7.14 release.
`error`:: An error was encountered during rule execution.
`pending`:: The rule has not yet executed. The rule was either just created, or enabled after being disabled.
`unknown`:: A problem occurred when calculating the status. Most likely, something went wrong with the alerting code.

[float]
[[importing-and-exporting-rules]]
=== Import and export rules
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ image::user/alerting/images/teams-connector-test.png[Five clauses define the con

Executing an Email action via https://github.com/pmuellr/kbn-action[kbn-action]. In this example, is using a cloud deployment of the stack:

[source]
[source, txt]
--------------------------------------------------
$ npm -g install pmuellr/kbn-action
Expand All @@ -45,7 +45,7 @@ $ kbn-action ls
--------------------------------------------------
and then execute this:

[source]
[source, txt]
--------------------------------------------------
$ kbn-action execute a692dc89-15b9-4a3c-9e47-9fb6872e49ce '{subject: "hallo", message: "hallo!", to:["[email protected]"]}'
{
Expand Down

0 comments on commit bd0f058

Please sign in to comment.