管理
警报索引
警报功能会创建多个索引和一个别名。安全插件演示脚本将其配置为系统索引,以提供额外的保护层。在不使用警报 API 的情况下,请勿删除这些索引或修改其内容。
索引 | 目的 |
---|---|
.opendistro-alerting-alerts | 存储正在进行的警报。 |
.opendistro-alerting-alert-history-<date> | 存储已完成警报的历史记录。 |
.opendistro-alerting-config | 存储监控器、触发器和目的地。为此索引创建快照以备份您的警报配置。 |
.opendistro-alerting-alert-history-write (别名) | 为 .opendistro-alerting-alert-history-<date> 索引提供一致的 URI。 |
所有警报索引默认都是隐藏的。要获取摘要,请发出以下请求
GET _cat/indices?expand_wildcards=open,hidden
警报设置
不建议更改这些设置;默认设置应适用于大多数用例。
所有设置均可通过 OpenSearch _cluster/settings
API 获取。所有设置都无需重启,并且都可以标记为 persistent
或 transient
。要了解有关静态和动态设置的更多信息,请参阅配置 OpenSearch。
设置 | 默认值 | 描述 |
---|---|---|
plugins.scheduled_jobs.enabled | true | 警报插件是否启用。如果禁用,所有监控器将立即停止运行。 |
plugins.alerting.index_timeout | 60s | 使用 REST API 创建监控器和目的地时的超时时间。 |
plugins.alerting.request_timeout | 10s | 插件的杂项请求超时时间。 |
plugins.alerting.action_throttle_max_value | 24h | 您可以为操作节流设置的最大时间量。默认情况下,此值在 OpenSearch Dashboards 中显示为 1440 分钟。 |
plugins.alerting.input_timeout | 30秒 | 监控器发出搜索请求所需的时间。 |
plugins.alerting.bulk_timeout | 120s | 监控器将警报写入警报索引所需的时间。 |
plugins.alerting.alert_backoff_count | 3 | 操作失败前写入警报的重试次数。 |
plugins.alerting.alert_backoff_millis | 50ms | 重试之间的等待时间——每次重试失败后呈指数增长。 |
plugins.alerting.alert_history_rollover_period | 12h | 检查 .opendistro-alerting-alert-history-write 别名是否应滚动到新的历史索引以及警报插件是否应删除任何历史索引的频率。 |
plugins.alerting.move_alerts_backoff_millis | 250 | 重试之间的等待时间——每次重试失败后呈指数增长。 |
plugins.alerting.move_alerts_backoff_count | 3 | 在监控器或触发器被删除后,将警报移动到已删除状态的重试次数。 |
plugins.alerting.monitor.max_monitors | 1000 | 用户可以创建的最大监控器数量。 |
plugins.alerting.alert_history_max_age | 30d | 在创建新索引之前,在 .opendistro-alert-history-<date> 索引中存储的最旧文档。如果在此时间段内的警报数量不超过 alert_history_max_docs ,则警报将每周期创建一个历史索引(例如,每 30 天一个索引)。 |
plugins.alerting.alert_history_max_docs | 1000 | 在创建新索引之前,在 .opendistro-alert-history-<date> 索引中存储的最大警报数量。 |
plugins.alerting.alert_history_enabled | true | 是否创建 .opendistro-alerting-alert-history-<date> 索引。 |
plugins.alerting.alert_history_retention_period | 60d | 自动删除历史索引之前存储的时间量。 |
plugins.alerting.destination.allow_list | [“chime”, “slack”, “custom_webhook”, “email”, “test_action”] | 允许的目的地列表。如果您不想允许用户访问某些类型的目的地,可以将其从列表中删除,但我们建议保持此设置不变。 |
plugins.alerting.filter_by_backend_roles | “false” | 通过后端角色限制对监控器的访问。请参阅警报安全性。 |
plugins.alerting.cross_cluster_monitoring_enabled | “true” | 切换集群指标监控器是否支持针对远程集群运行。 |
plugins.scheduled_jobs.sweeper.period | 5m | 警报功能使用其“作业清扫器”组件定期检查新或更新的作业。此设置是清扫器检查是否有任何作业(监控器)已更改并需要重新安排的速率。 |
plugins.scheduled_jobs.sweeper.page_size | 100 | 清扫器的页面大小。您无需更改此值。 |
plugins.scheduled_jobs.sweeper.backoff_millis | 50ms | 清扫器在重试之间等待的时间——每次重试失败后呈指数增长。 |
plugins.scheduled_jobs.sweeper.retry_count | 3 | 清扫器在抛出错误之前应重试的总次数。 |
plugins.scheduled_jobs.request_timeout | 10s | 清扫分片以获取作业的请求超时时间。 |
plugins.alerting.comments_enabled | false | 启用或禁用警报插件的注释。 |
plugins.alerting.comments_history_max_docs | 1000 | 在创建新索引之前,在 .opensearch-alerting-comments-history-<date> 索引中存储的最大注释数量。 |
plugins.alerting.comments_history_max_age | 30d | 在创建新索引之前,在 .opensearch-alerting-comments-history-<date> 索引中存储的最旧文档。如果指定时间段内的注释数量不超过 comments_history_max_docs ,则每个时间段创建 1 个索引(例如,每 30 天 1 个)。 |
plugins.alerting.comments_history_rollover_period | 12h | 多久确定一次 .opensearch-alerting-comments-history-write 别名是否应滚动到新索引并删除旧注释历史索引。 |
plugins.alerting.comments_history_retention_period | 60d | 在自动删除之前,注释历史索引的保留时间。 |
plugins.alerting.max_comment_character_length | 2000 | 注释的最大字符长度。 |
plugins.alerting.max_comments_per_alert | 500 | 每个警报上可以发布的评论最大数量。 |
plugins.alerting.max_comments_per_notification | 3 | 每个警报的最多评论数量,用于警报通知的 ctx Mustache 模板变量中。 |