From 7fd16efa9f12a352c1b68638cfd71366a85c919f Mon Sep 17 00:00:00 2001 From: Yuliia Naumenko Date: Wed, 24 Feb 2021 22:58:32 -0800 Subject: [PATCH 1/2] [Alerts][Doc] Added README documentation for alerts plugin status and framework health checks configuration options. --- x-pack/plugins/alerts/README.md | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/x-pack/plugins/alerts/README.md b/x-pack/plugins/alerts/README.md index aab848d4555d2d..1f38dd9983d9d1 100644 --- a/x-pack/plugins/alerts/README.md +++ b/x-pack/plugins/alerts/README.md @@ -14,6 +14,7 @@ Table of Contents - [Terminology](#terminology) - [Usage](#usage) - [Limitations](#limitations) + - [Plugin status](#plugin-status) - [Alert types](#alert-types) - [Methods](#methods) - [Executor](#executor) @@ -64,6 +65,27 @@ Note that the `manage_own_api_key` cluster privilege is not enough - it can be u is unauthorized for user [user-name-here] ``` +## Plugin status + +Alerts plugin's status is customized by including information about checking framework decryption failures: +``` +core.status.set( + combineLatest([ + core.status.derivedStatus$, + getHealthStatusStream(startPlugins.taskManager), + ]).pipe( + map(([derivedStatus, healthStatus]) => { + if (healthStatus.level > derivedStatus.level) { + return healthStatus as ServiceStatus; + } else { + return derivedStatus; + } + }) + ) + ); +``` +To check framework decryption failures we use task `alerting_health_check`, which runs with default interval 60 mins. To change the dafault schedule use kibana.yml configuration option `xpack.alerts.healthCheck.interval: 60m`. + ## Alert types ### Methods From fda0cd8273866a5b8946a1e65c4961ce56a86e25 Mon Sep 17 00:00:00 2001 From: Yuliia Naumenko Date: Thu, 25 Feb 2021 10:03:59 -0800 Subject: [PATCH 2/2] Apply suggestions from code review Co-authored-by: gchaps <33642766+gchaps@users.noreply.github.com> --- x-pack/plugins/alerts/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/x-pack/plugins/alerts/README.md b/x-pack/plugins/alerts/README.md index 1f38dd9983d9d1..845b6ca7efaf57 100644 --- a/x-pack/plugins/alerts/README.md +++ b/x-pack/plugins/alerts/README.md @@ -67,7 +67,7 @@ Note that the `manage_own_api_key` cluster privilege is not enough - it can be u ## Plugin status -Alerts plugin's status is customized by including information about checking framework decryption failures: +The plugin status of an alert is customized by including information about checking failures for the framework decryption: ``` core.status.set( combineLatest([ @@ -84,7 +84,7 @@ core.status.set( ) ); ``` -To check framework decryption failures we use task `alerting_health_check`, which runs with default interval 60 mins. To change the dafault schedule use kibana.yml configuration option `xpack.alerts.healthCheck.interval: 60m`. +To check for framework decryption failures, we use the task `alerting_health_check`, which runs every 60 minutes by default. To change the default schedule, use the kibana.yml configuration option `xpack.alerts.healthCheck.interval`. ## Alert types