使用 IBM Cloud Event Notifications 发送 SMS 警报
在 IBM Cloud Monitoring 服务中,您可以配置单个警报和多条件警报,以通过 SMS (短消息服务) 消息通知支持人员可能需要注意的问题。 警报可以向 IBM Cloud Event Notifications 服务生成通知,以按照该服务中的配置进行处理。
IBM Cloud Monitoring 实例可以将事件发送到同一 accoount 和其他帐户中的 IBM Cloud Event Notifications 实例。IBM Cloud Event Notifications 在有限数量的区域中可用。
短信消息只能发送到美国和加拿大的电话号码。
IBM Cloud Event Notifications 支持消息并置,因此可以发送长度超过 160 个字符的 SMS 消息。 但是,将以最多 160 个字符的块发送消息。 多条消息可能导致对收件人收取额外费用。
IBM Cloud Event Notifications 支持多个不同的目标。 此示例描述了发送 SMS 消息。 有关其他可能的目标的信息,请参阅 IBM Cloud Event Notifications 文档。
有关逐步教程,请参阅 将 SMS 通知发送到 IBM Cloud Event Notifications。
要配置 IBM Cloud Monitoring 服务的 1 实例以将通知发送到 IBM Cloud Event Notifications 以作为 SMS 消息发送,请执行以下操作:
步骤 1. 供应 IBM Cloud Event Notifications 实例
供应 IBM Cloud Event Notifications 实例。
必须在与 Monitoring 实例相同的帐户或不同的帐户中供应 IBM Cloud Event Notifications 实例。
可用于 IBM Cloud Event Notifications 的事件数和过滤器数取决于所选的定价计划。 在创建 IBM Cloud Event Notifications 实例时查看限制语句以了解 计划限制。
步骤 2. 定义权限
配置授权以授予 IBM Cloud Monitoring 对 IBM Cloud Event Notifications的访问权。
当两个服务实例都在同一帐户中时,请选择以下选项中的 1:
-
选项 1: 要授予 IBM Cloud Monitoring 服务对 IBM Cloud Event Notifications 服务的访问权,必须定义授权,其中 源服务 设置为 IBM Cloud Monitoring 和 所有资源; 目标服务 设置为 IBM Cloud Event Notifications 和 所有资源; 服务访问权 同时包含 读者 和 事件源管理器 访问权。
-
选项 2: 要授予 IBM Cloud Monitoring 服务实例对 IBM Cloud Event Notifications 服务实例的访问权,必须定义将 源服务 设置为 IBM Cloud Monitoring 和 基于所选属性的资源的授权; 目标服务 设置为 IBM Cloud Event Notifications 和 基于所选属性的资源; 服务访问权 同时包含 Reader 和 Event Source Manager 访问权。
当两个服务实例都位于不同的帐户中时,请在托管 IBM Cloud Event Notifications 服务的帐户中定义授权:
-
在 IBM Cloud 控制台中,单击 管理 > 访问权 (IAM),然后选择 授权。
-
单击创建。
-
选择源帐户。
如果需要访问目标服务的源服务位于此帐户中,请选择 此帐户。
如果需要访问目标服务的源服务位于其他帐户中,请选择 其他帐户。 然后,输入源帐户的帐户标识。
-
选择 IBM Cloud Monitoring 作为源服务。 然后,设置对 所有资源的访问权的作用域。
-
选择 IBM Cloud Event Notifications 作为目标服务。 然后,通过配置 基于所选属性的资源 > 服务实例来设置对 所有资源 或单个实例的访问范围。
此类型的授权不支持其他属性。
-
在 服务访问权 部分中,包含 读者 和 事件源管理器 访问权。
-
单击授权。
如果在另一个帐户中的服务与当前帐户中的目标服务之间创建授权,那么您只需要具有对目标资源的访问权。 对于源帐户,您只需要帐号。
有关如何定义授权的更多信息,请参阅 使用授权在服务之间授予访问权。
步骤 3. 配置 IBM Cloud Event Notifications 实例
-
配置类型为 IBM Cloud Event Notifications 的通知通道。
配置通道时,会自动将与 Monitoring 实例名称同名的源添加到 IBM Cloud Event Notifications 实例。 您可以在 IBM Cloud Event Notifications UI 的 源 部分中进行查看。
-
创建 IBM Cloud Event Notifications 预订。
对于 目标,请指定
IBM Cloud SMS service
。
后续步骤
接下来,验证设置。 配置 Monitoring 警报以发送到配置的通知通道。