為 啟用事件通知 IBM® Storage Ceph® as a Service

身為 IBM® Storage Ceph® as a Service 的管理員,您可能希望透過電子郵件、簡訊或其他受支援的傳送管道,將 IBM Storage Ceph as a Service 中的事件通知發送給其他使用者或真人收件者。 此外,您可能希望將這些事件通知傳送至其他應用程式,以便透過事件驅動式程式設計(例如使用 webhooks)來建構邏輯。 這得益於 IBM® Storage Ceph® as a Service 與 IBM Cloud Event Notifications 之間的整合。

若要將資訊傳送至 Event Notifications,您必須將您的 IBM Storage Ceph 作為服務實例連線至 Event Notifications。 如需更多關於使用 Event Notifications 的資訊,請參閱 《 Event Notifications 入門指南》

事件是如何被收集並傳送的 IBM® Storage Ceph® as a Service

當您的「IBM Storage Ceph as a Service」實例中發生感興趣的事件時,「IBM Storage Ceph as a Service」會與已連線的「Event Notifications」實例進行通訊,將通知轉發至 受支援的目的地

活動:IBM® Storage Ceph® as a Service

下表列出了「IBM Storage Ceph as a Service」的各項活動。

會觸發事件通知的操作
事件名稱 事件類型 亞型名稱 子類型 嚴重性
IBM Storage Ceph 即服務儲存容量 com.ibm.cloud.software-defined-storage.capacity 已分配的區塊儲存空間佔總容量的 50% block_capacity_50_percent
已分配的區塊儲存空間已使用至容量的 80% block_capacity_80_percent
已分配的區塊儲存空間已達 100% 容量 block_capacity_100_percent
已分配的物件儲存空間佔總容量的 50% object_capacity_50_percent
已分配的物件儲存空間已達到容量的 80% object_capacity_80_percent
已分配的物件儲存空間已達 100% 容量 object_capacity_100_percent
IBM Storage Ceph 即服務型 S3 憑證 com.ibm.cloud.software-defined-storage.s3-certificate S3 憑證已過期 s3_cert_expired
S3 憑證將於 1 天後過期 s3_cert_expire_1_day
S3 該憑證將於 10 天後過期 s3_cert_expire_10_day
S3 此憑證將於 30 天後過期 s3_cert_expire_30_day
S3 該憑證將於 60 天後過期 s3_cert_expire_60_day
S3 該憑證將於 90 天後過期 s3_cert_expire_90_day

啟用通知

由「IBM Storage Ceph as a Service」實例所產生的事件,可轉發至同一帳戶中可用的「Event Notifications」服務實例。 每個 Event Notifications 服務實例,僅能配置一個 IBM Storage Ceph as a Service 實例。

在控制台中連線至 Event Notifications

在為「IBM Storage Ceph as a Service」啟用通知功能之前,請務必確認您擁有一個位於與您的「IBM Storage Ceph as a Service」執行個體相同帳戶中的 Event Notifications 服務實例。 接著,您可以透過「IBM Storage Ceph as a Service」使用者介面中的「設定」>「Event Notifications」 區段來連接這些服務。

  1. 在主控台中,點擊「導覽選單」圖示 導覽選單圖示 > 資源清單

  2. 請選擇您的「IBM Storage Ceph as a Service」執行個體。

  3. 在「IBM Storage Ceph as a Service」的導覽列中,按一下「設定」。

  4. 在「Event Notifications」區段中,點選 「連線」

  5. 請檢視該連線的來源詳細資訊。 (選用項目)提供說明。

  6. 請選取您要連線的資源群組及「Event Notifications」服務執行個體。

    若您的帳戶中不存在 IBM Storage Ceph as a Service 與 Event Notifications 之間的 IAM 授權,系統將顯示一個對話方塊。 請依照提示,授予各服務之間的存取權限。

    1. 若要授予「IBM Storage Ceph as a Service」與「Event Notifications」之間的存取權限,請按一下 「授權」
    2. 選擇 Event Notifications 作為目標服務。
    3. 從實例清單中,選取您要授權的「Event Notifications」服務實例。
    4. 選取「事件來源管理員」角色。
    5. 點擊「檢視」。
    6. 按一下指派
  7. 若要確認連線,請按一下「連線」。

將通知傳送至指定目的地

在為「IBM Storage Ceph as a Service」啟用通知功能後,請於 Event Notifications 中建立主題與訂閱,以便將警示轉發並傳送至您選定的目的地。

如需查看支援目的地的完整清單,請參閱 Event Notifications 的文件

電子郵件通知

您可以將「IBM Cloud 電子郵件服務」用作「IBM Storage Ceph as a Service」事件通知的傳遞管道。 在現有主題與 IBM Cloud 電子郵件服務之間 建立一個「Event Notifications」訂閱,以便透過電子郵件將您的警示轉發給各收件者。

來自 IBM Cloud 的電子郵件,其中包含有關「IBM Storage Ceph as a Service」活動的資訊,其內容類似以下範例:

Subject: Replace S3 certificate (expires in 90 days)
Body: S3 certificate will expire in 90 days. Please replace your S3 certificate.

若要在電子郵件中收到有關事件通知的詳細資訊,請在建立「Event Notifications」訂閱時,選取「新增通知載荷」選項。 您的電子郵件中顯示了與該事件相關 的通知內容詳情

Webhook。

您可以設定 Webhook 接收端,以便應用程式或服務能透過程式化方式處理傳入的通知。 如需有關設定 Webhooks 的更多資訊,請參閱 Event Notifications 的文件

通知載荷詳細資訊

由「IBM Storage Ceph as a Service」所產生的成功事件包含多個欄位,可協助您識別事件的來源與詳細資訊。

來自「IBM Storage Ceph as a Service」的事件通知僅包含元資料屬性,例如資源的名稱或識別碼。 敏感資料(例如 API 金鑰或密碼)不會包含在生成的事件中。

傳送至 Event Notifications 的屬性會因事件類型而異。 例如,若發生 S3 憑證到期事件,IBM Storage Ceph as a Service 會向 Event Notifications 傳送一則通知載荷,其內容類似以下範例。

{
    "ibmendefaultlong": "S3 certificate will expire in 90 days. Please replace your S3 certificate.",
    "ibmendefaultshort": "Replace S3 certificate (expires 90 days)",
    "ibmenseverity": "low",
    "ibmensourceid": "crn:v1:staging:public:software-defined-storage:satloc_dal_crmid4v20tl6u8usf790:a/3faf73b8d12b47fa6ce87494f8ae7686:0c81f602-5142-4809-9e42-31de8453416a::",
    "id": "38eb4721-db9b-4ba6-a5e7-cdd9cce66763",
    "source": "crn:v1:staging:public:software-defined-storage:satloc_dal_crmid4v20tl6u8usf790:a/3faf73b8d12b47fa6ce87494f8ae7686:0c81f602-5142-4809-9e42-31de8453416a::",
    "specversion": "1.0",
    "time": "2025-04-23T21:13:44.301Z",
    "type": "com.ibm.cloud.software-defined-storage.s3-certificate:s3_cert_expire_90_day"
}

請參閱下表,以了解有關事件通知屬性的更多資訊。

事件通知載荷中的屬性
內容 說明
ibmendefaultlong 當訊息被路由至需要人類可讀文字的目的地,但未指定該目的地專屬的屬性時,便會顯示此訊息。
ibmendefaultshort 當訊息被路由至需要人類可讀文字的目的地,但未指定該目的地專屬的屬性時,便會顯示此訊息。
ibmenseverity 事件的嚴重性。
ibmensourceid 這是於 Event Notifications 所建立的來源的 ID。 此功能可在 Event Notifications 介面的「來源」區段中找到。
id 一個用於識別每個事件的唯一識別碼。
source 這是事件產生者的識別碼(即「IBM Storage Ceph as a Service」的 CRN)。
specversion 這是 Event Notifications 目前所支援的 Cloud Events 規格版本。 此值必須設定為「1.0」。
time 事件發生時的 UTC 時間戳記。 必須採用 RFC 3339 格式。
type 此處說明該活動的類型。 其形式為 <event-type-name>:<sub-type>