通过 webhook 的方式同步 OpManager 告警事件到 Flashduty,实现告警事件自动化降噪处理。
您可通过以下2种方式,获取一个集成推送地址,任选其一即可。
当您不需要将告警事件路由到不同的协作空间,优先选择此方式,更简单。
当您需要根据告警事件的 Payload 信息,将告警路由到不同的协作空间,优先选择此方式。
路由
进行更多路由规则的配置)。OpManager
控制台,在导航菜单中选择 Settings => Notification Profiles
。Notifications
页面中,点击 Add
后选择 Invoke a 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
,其他按需配置即可。FlashDuty
,然后点击 Save
保存即可完成配置。OpManager | Flashduty | 状态 |
---|---|---|
Critical | Critical | 严重 |
Service Down | Critical | 严重 |
Trouble | Warning | 警告 |
Attention | Info | 提醒 |