Opmanager 告警事件
通过 webhook 的方式同步 OpManager 告警事件到 Flashduty,实现告警事件自动化降噪处理。
在 Flashduty
您可通过以下2种方式,获取一个集成推送地址,任选其一即可。
使用专属集成
当您不需要将告警事件路由到不同的协作空间,优先选择此方式,更简单。
展开
- 进入 Flashduty 控制台,选择 协作空间,进入某个空间的详情页面
- 选择 集成数据 tab,点击 添加一个集成,进入添加集成页面
- 选择 OpManager 集成,点击 保存,生成卡片。
- 点击生成的卡片,可以查看到 推送地址,复制备用,完成。
使用共享集成
当您需要根据告警事件的 Payload 信息,将告警路由到不同的协作空间,优先选择此方式。
展开
- 进入 Flashduty 控制台,选择 集成中心=>告警事件,进入集成选择页面。
- 选择 OpManager 集成:
- 集成名称:为当前集成定义一个名称。
- 配置默认路由,并选择对应的协作空间(集成创建后可以前往
路由
进行更多路由规则的配置)。 - 点击 保存 后,复制当前页面的新生成的 推送地址 备用。
- 完成。
在 OpManager
一、OpManager 告警推送配置
- 登录您的
OpManager
控制台,在导航菜单中选择Settings => Notification Profiles
。 - 在
Notifications
页面中,点击Add
后选择Invoke a Webhook
添加配置文件。

- 开始在 Webhook 编辑页面进行配置具体内容。
Hook URL
中的请求方法选择POST
,URL
填写告警集成的推送地址。Data Type
选择raw
,Payload Type
选择JSON
。Body Content
填写以下内容:
{
"alarmid":"$alarmid",
"message":"$message",
"displayName":"$displayName",
"category":"$category",
"severity":"$stringseverity",
"strModTime":"$strModTime",
"eventType":"$eventType",
"entity":"$entity",
"lastPolledValue":"$lastPolledValue",
"Intf_ifDescr":"$IntfField(ifDescr)",
"Intf_displayName":"$IntfField(displayName)",
"Intf_ifAlias":"$IntfField(ifAlias)",
"Intf_ifName":"$IntfField(ifName)",
"Intf_ipAddress":"$IntfField(ipAddress)",
"Intf_physMedia":"$IntfField(physMedia)",
"Intf_ifIndex(ifIndex)":"$IntfField(ifIndex)",
"Intf_ifCircuitID(ifCircuitID)":"$IntfField(ifCircuitID)",
"Intf_ifSpeedIn(ifSpeedIn)":"$IntfField(ifSpeedIn)",
"Intf_ifSpeedOut(ifSpeedOut)":"$IntfField(ifSpeedOut)",
"Intf_lineID":"$IntfCustomField(Circuit ID)",
"Intf_note":"$IntfCustomField(Comments)",
"Intf_contacts":"$IntfCustomField(Contact Name)",
"Intf_SLA":"$IntfCustomField(SLA)",
"Custom_BuildingNo":"$CustomField(Building)",
"Custom_cabinet":"$CustomField(Cabinet)",
"Custom_note":"$CustomField(Comments)",
"Custom_contacts":"$CustomField(Contact Name)",
"Custom_department":"$CustomField(Department)",
"Custom_RoomNo":"$CustomField(Floor)",
"Custom_serial":"$CustomField(SerialNumbe)",
"Monitor_monitorName":"$MonitorField(monitorName)",
"Monitor_instance":"$MonitorField(instance)",
"Monitor_protocol":"$MonitorField(protocol)",
"Device_type":"$DeviceField(type)",
"Device_ipAddress":"$DeviceField(ipAddress)",
"Device_isSNMP":"$DeviceField(isSNMP)",
"Device_dependent":"$DeviceField(dependent)",
"Device_hardDiskSize":"$DeviceField(hardDiskSize)",
"Device_ramSize":"$DeviceField(ramSize)"
}
特殊说明 :暂不支持添加额外的自定义字段,即使在 Body Content 中引用了自定义字段,也不会生效。
Request Headers
保持默认的即可。Time Out
填写 1-300 之间的任意值,并点击下一步。

- 在
Choose the criteria
配置条件页面中勾选Notify when the alarm is cleared
,其他按需配置即可。

- 选择希望应用此配置文件的设备,使用右箭头将它们移动到选定设备窗口,然后点击下一步。
- Time Window/Delayed Trigger/Recurring Trigger 可按需配置,然后点击下一步。
- 为该配置文件添加名称
FlashDuty
,然后点击Save
保存即可完成配置。
二、状态对照
OpManager | Flashduty | 状态 |
---|---|---|
Critical | Critical | 严重 |
Service Down | Critical | 严重 |
Trouble | Warning | 警告 |
Attention | Info | 提醒 |
修改于 2025-03-27 07:34:42