dellemc.openmanage.ome_alert_policies_message_id_info 模块 – 获取告警策略的消息 ID 信息。

注意

此模块是 dellemc.openmanage 集合 (版本 9.9.0) 的一部分。

如果您正在使用 ansible 包,则可能已安装此集合。它不包含在 ansible-core 中。要检查它是否已安装,请运行 ansible-galaxy collection list

要安装它,请使用:ansible-galaxy collection install dellemc.openmanage。您需要其他要求才能使用此模块,有关详细信息,请参阅 需求

要在 playbook 中使用它,请指定:dellemc.openmanage.ome_alert_policies_message_id_info

dellemc.openmanage 8.2.0 中的新增功能

概要

  • 此模块检索 OpenManage Enterprise 和 OpenManage Enterprise Modular 的告警策略的消息 ID 信息。

需求

在执行此模块的主机上需要以下需求。

  • python >= 3.9.6

参数

参数

注释

ca_path

路径

在 dellemc.openmanage 5.0.0 中添加

包含用于验证的 CA 证书的隐私增强邮件 (PEM) 文件。

hostname

字符串 / 必需

OpenManage Enterprise 或 OpenManage Enterprise Modular 的 IP 地址或主机名。

password

字符串

OpenManage Enterprise 或 OpenManage Enterprise Modular 密码。

如果未提供密码,则使用环境变量 OME_PASSWORD

示例:export OME_PASSWORD=password

port

整数

OpenManage Enterprise 或 OpenManage Enterprise Modular 的 HTTPS 端口。

默认值: 443

timeout

整数

在 dellemc.openmanage 5.0.0 中添加

以秒为单位的套接字级别超时。

默认值: 30

username

字符串

OpenManage Enterprise 或 OpenManage Enterprise Modular 用户名。

如果未提供用户名,则使用环境变量 OME_USERNAME

示例:export OME_USERNAME=username

validate_certs

布尔值

在 dellemc.openmanage 5.0.0 中添加

如果为 false,则不会验证 SSL 证书。

仅在使用自签名证书的个人控制站点上配置 false

在集合版本 5.0.0 之前,validate_certs 默认值为 false

选项

  • false

  • true ← (默认)

x_auth_token

字符串

在 dellemc.openmanage 9.3.0 中添加

身份验证令牌。

如果未提供 x_auth_token,则使用环境变量 OME_X_AUTH_TOKEN

示例:export OME_X_AUTH_TOKEN=x_auth_token

备注

注意

  • 从此模块可以直接访问 Dell OpenManage Enterprise 或 OpenManage Enterprise Modular 的系统运行此模块。

  • 此模块支持 check_mode

  • 此模块支持 IPv4 和 IPv6 地址。

示例

---
- name: Get message ID details of all alert policies
  dellemc.openmanage.ome_alert_policies_message_id_info:
    hostname: "192.168.0.1"
    username: "username"
    password: "password"
    ca_path: "/path/to/ca_cert.pem"

返回值

常见返回值已在 此处 记录,以下是此模块特有的字段

描述

error_info

字典

HTTP 错误的详细信息。

返回:HTTP 错误时

示例: {"error": {"@Message.ExtendedInfo": [{"Message": "Unable to process the request because an error occurred.", "MessageArgs": [], "MessageId": "GEN1234", "RelatedProperties": [], "Resolution": "Retry the operation. If the issue persists, contact your system administrator.", "Severity": "Critical"}], "code": "Base.1.0.GeneralError", "message": "A general error has occurred. See ExtendedInfo for more information."}}

message_ids

字典

消息 ID 的详细信息。

返回:成功

示例: [{"Category": "系统健康", "DetailedDescription": "消息中标识的当前传感器已失效。 此情况可能导致系统性能问题以及系统监控能力下降。", "Message": "${0}传感器已失效,传感器最后记录的值为${1}A。", "MessageId": "AMP400", "Prefix": "AMP", "RecommendedAction": "检查嵌入式系统管理 (ESM) 日志中是否存在任何与传感器相关的故障。 如果传感器失效,请更换系统主板。 更多信息,请联系您的服务提供商。", "SequenceNo": 400, "Severity": "严重", "SubCategory": "电流"}, {"Category": "系统健康", "DetailedDescription": "消息中标识的当前传感器已失效。 此情况可能导致系统性能问题以及系统监控能力下降。", "Message": "无法读取${0}传感器的值。", "MessageId": "AMP401", "Prefix": "AMP", "RecommendedAction": "检查嵌入式系统管理 (ESM) 日志中是否存在任何与传感器相关的故障。 如果传感器失效,请更换系统主板。 更多信息,请联系您的服务提供商。", "SequenceNo": 401, "Severity": "警告", "SubCategory": "电流"}]

消息

字符串

告警策略消息ID获取操作的状态。

返回值:始终

示例: "已成功检索告警策略消息ID信息。"

作者

  • Shivam Sharma (@ShivamSh3)