From 7fd16efa9f12a352c1b68638cfd71366a85c919f Mon Sep 17 00:00:00 2001 From: Yuliia Naumenko Date: Wed, 24 Feb 2021 22:58:32 -0800 Subject: [PATCH] [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 aab848d4555d2..1f38dd9983d9d 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