open-falcon alarm sends a message component. Note that this is customized based on the im function added in version 2.0.
DingTalk group messaging and WeChat messaging are now implemented
You need to configure the WeChat name in the IM configuration in the person list of the address book. Please refer to https://github.com/Yanjunhui/chat for configuration instructions. The code is also copied and pasted from here, and appropriately modified to adapt to the current program.
[ding]:access_token
at IM. The access_token here is the access_token above. If the same message is to be sent to multiple robots, use an English semicolon between the access_tokens. ;
separated to save user information.api
in the alarm component and add the configuration: "im": "http://localhost:23329/api/v1/message"
. The port is modified according to the configuration file of this project. The default template file is message-template.md
, and the parameters that can be used are as follows:
If the parameter configuration is incorrect, the template rendering will fail and cannot be sent.
The default template has the following expressions:
{{with elapse .Count 60 .TriggerCount 300}}{{divide . 60}}{{end}}
Among them, 60 is the data reporting period, and the default is 60s. If the default value is modified, the value here needs to be modified.
300 is the delay time between alarms, the default is 5 minutes.
{{divide . 60}} is divided by 60s to get minutes