Enterprise WeChat

If you need to use Enterprise WeChat to alert, please modify the alert.properties file after the installation is complete, and then restart the alert service. The configuration example of enterprise WeChat is as follows

  1. # Enable enterprise WeChat alarm or not: ``true`` or ``false``
  2. enterprise.wechat.enable="true"
  3. # Enterprise WeChat corpid, each enterprise has a unique corpid, to obtain this information, you can view the "enterprise ID" under "My Company"-"Enterprise Information" in the management background (administrator rights are required)
  4. enterprise.wechat.corp.id="xxx"
  5. # Secret for Enterprise WeChat, secret is the "key" used to ensure data security in enterprise applications, and each application has an independent access key
  6. enterprise.wechat.secret="xxx"
  7. # Enterprise WeChat agentid, each application has a unique agentid. In the management background -> "Apps and applets" -> "Apps", click on an application, you can see the agentid
  8. enterprise.wechat.agent.id="xxxx"
  9. # Userid when notification send to Enterprise WeChat, multiple separated by commas. Each member has a unique userid, the so-called "account". In the management background -> "Contacts" -> click on a member's details page, you can see
  10. enterprise.wechat.users=zhangsan,lisi
  11. # Get the address of access_token, modify if you need
  12. enterprise.wechat.token.url=https://qyapi.weixin.qq.com/cgi-bin/gettoken?corpid={corpId}&corpsecret={secret}
  13. # Send application message address, modify if you need
  14. enterprise.wechat.push.url=https://qyapi.weixin.qq.com/cgi-bin/message/send?access_token={token}
  15. # Message format
  16. enterprise.wechat.user.send.msg={\"touser\":\"{toUser}\",\"agentid\":\"{agentId}\",\"msgtype\":\"markdown\",\"markdown\":{\"content\":\"{msg}\"}}