alerts.py 文件源码

python
阅读 23 收藏 0 点赞 0 评论 0

项目:elastalert-ui 作者: steelheaddigital 项目源码 文件源码
def alert(self, matches):
        client = TwilioRestClient(self.twilio_accout_sid, self.twilio_auth_token)

        try:
            client.messages.create(body=self.rule['name'],
                                   to=self.twilio_to_number,
                                   from_=self.twilio_to_number)

        except TwilioRestException as e:
            raise EAException("Error posting to twilio: %s" % e)

        elastalert_logger.info("Trigger sent to Twilio")
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号