INFO-N9E配置飞书webhook告警通道

场景说明
N9E配置飞书webhook告警通道
使用示例
需要客户提供飞书webhook的链接
Snipaste_2025-06-03_10-21-30.png
webhook参考文档
https://open.feishu.cn/document/client-docs/bot-v3/add-custom-bot
具体操作步骤
一、 N9E机器测试网络是否可以联通
curl -I https://open.feishu.cn/open-apis/bot/v2/hook/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxx
命令会返回HTTP状态码200(或者其他成功状态码),表示网络连通正常。
image (2).png
二、 N9E配置webhook
2.1、没有签名校验(跳转2.4)
2.2、存在签名校验
webhook联通测试脚本
附件 -> 联通测试脚本.txt
返回信息
image (3).png
2.3、修改配置文件notify.py
位置:n9e-current/n9eetc.temp/script/notify.py
notify.py中不含有密钥认证的相关信息,需要进行修改。
附件 -> notify.txt 使用说明:
133行,secret配置webhook密钥。
配置完成后重启n9e。
2.4、n9e页面配置
用户管理 -> 创建用户 -> 更多联系方式配置飞书的token(webhook_url的最后)
image (4).png
image (5).png
团队管理,将新建的用户加入到团队。

作者:郑冠升