WeChat enterprise account alarm plug-in based on ElastAlert
This project is out of maintenance. If necessary, please move to another project of mine anjia0532/elastalert-docker
Advantages
For detailed instructions, please see https://anjia0532.github.io/2017/02/16/elastalert-wechat-plugin/
If the alarm rule is inexplicably disabled after running for a period of time, please see #2 for details.
If SSLError(SSLError("bad handshake: Error([('SSL routines', SSL3_GET_SERVER_CERTIFICATE', 'certificate verify failed')],)",),)
see Jianshu #SSLError (Expired) , if the security requirements are not high, you can modify wechat_qiye_alert.py#L73 and wechat_qiye_alert.py#L126 to add verify=False
. However, this does not verify the certificate, which can easily lead to man-in-the-middle attacks and other problems. Search google python2.7 SNI
for specific solutions.
Ubuntu 16.04 python 2.7.12 is normal. If conditions permit, it is recommended to use docker images to reduce various strange problems caused by environmental differences.
docker hub repo anjia0532/elastalert-wechat-plugin
#默认docker官方库
docker pull anjia0532/elastalert-wechat-plugin
#阿里云镜像库
docker pull registry.cn-hangzhou.aliyuncs.com/shunneng/elastalert-wechat-plugin
ELASTICSEARCH_HOST
: elasticsearch host
ELASTICSEARCH_PORT
: elasticsearch port
ELASTICSEARCH_USERNAME
: elasticsearch username
ELASTICSEARCH_PASSWORD
: elasticsearch password
SET_CONTAINER_TIMEZONE
: Whether to set the time zone, true|false
CONTAINER_TIMEZONE
: Time zone, default Beijing time East Eighth District Asia/Shanghai