Skip to content

使用nextjs开发,并部署在vercel.app上的webhook转发服务。目前只实现了sentry转发到钉钉的功能。

Notifications You must be signed in to change notification settings

kaokei/nextjs-webhook

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

webhook 转发服务文档

页面地址

https://webhook.kaokei.com/

接口服务地址

https://webhook.kaokei.com/api/dingding/sentry

使用方式

目前只实现了 sentry 的 webhook 转发到钉钉。

第一步,创建钉钉机器人,获取 webhook 链接,如下:

https://oapi.dingtalk.com/robot/send?access_token=1111122222223333334444445555566667777888899900011122233344455566

第二步,拼接参数到https://webhook.kaokei.com/api/dingding/sentry这个链接

目前支持 4 个参数:

  • url:就是第一步中获取的钉钉原始的 webhook 链接,作为参数需要 encodeURIComponent(url)编码

  • mobile:需要@钉钉群中的人的手机号,可以不传

  • keyword:目前转发服务只支持关键词策略,默认是监控报警,可以不传

  • level:sentry 中的 level,默认是all,可以不传,用于过滤哪些 level 的需要转发,比如配置 level=error,则只会转发 error 级别的错误

参考示例如下:

https://webhook.kaokei.com/api/dingding/sentry?url=https%3A%2F%2Foapi.dingtalk.com%2Frobot%2Fsend%3Faccess_token%3D1111122222223333334444445555566667777888899900011122233344455566&mobile=13911112222&keyword=监控报警&level=info&level=error

部署到 vercel.app

有需要的话,可以直接使用我的 git 仓库在 https://vercel.com/ 上部署自己的服务

About

使用nextjs开发,并部署在vercel.app上的webhook转发服务。目前只实现了sentry转发到钉钉的功能。

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages