如何在 Amazon OpenSearch Service 叢集中關閉 .opendistro-alerting-alert-history 索引提醒?

1 分的閱讀內容
0

在我的 Amazon OpenSearch Service 叢集中建立了 .opendistro-alerting-alert-history 索引。為什麼會發生這種情況,以及如何關閉 .opendistro-alerting-alert-history 索引提醒?

解決方案

OpenSearch Service 提醒功能

在 OpenSearch Service 中開啟提醒功能後,系統即會建立 .opendistro-alerting-alert-history 索引 (以及別名)。如果索引中的文件符合搜尋條件,提醒功能就會通知使用者。

監控組態儲存在 .opendistro-alerting-config 索引中,而每日提醒則儲存在 .opendistro-alerting-alerts 索引中。然後,.opendistro-alerting-alerts 索引會每天累計到提醒歷史索引。建立監控後,如果符合搜尋條件,.opendistro-alerting-alert-history- 索引就會開始填入。

**注意:**若要刪除或修改任何索引的內容,請使用提醒 API。如需有關提醒功能的詳細資訊,請參閱 Open Distro 網站上的提醒 API提醒索引

關閉每日建立索引

若要關閉建立 .opendistro-alerting-alert-history- 的索引,請執行下列步驟:

1.    移至 OpenSearch Dashboards 上的提示標籤。

2.    刪除任何監控。

3.    刪除 .opendistro-alerting-alert-history 索引上的所有提醒:

DELETE /.opendistro-alerting-alert-history-*

4.    關閉建立提醒歷史記錄:

PUT _cluster/settings
{
     "persistent": {
          "opendistro.alerting.alert_history_enabled":"false"
     }
}

在監控資料時移除舊的 .opendistro-alerting-alert-history 索引

您可以在使用監控功能時移除較舊的提醒歷史記錄索引。您的監控組態不會受到影響。

**注意:**若您刪除特定日期的歷史記錄索引,則只會移除該日的提醒歷史記錄。


相關資訊

在 Amazon OpenSearch Service 中設定警示提醒

AWS 官方
AWS 官方已更新 2 年前