Giter VIP home page Giter VIP logo

sender's Introduction

falcon-sender

alarm处理报警event可能会产生报警短信或者报警邮件,alarm不负责发送,只是把报警邮件、短信写入redis队列,sender负责读取并发 送。

各个公司有自己的短信通道,自己的邮件发送方式,sender如何调用各个公司自己的组件呢?那只能制定规范了,sender的配置文件 cfg.json中配置了api:sms和api:mail,即两个http接口,这是需要各个公司提供的。

当要发送短信的时候,sender就会调用api:sms中配置的http接口,post方式,参数是:

  • tos:用逗号分隔的多个手机号
  • content:短信内容

当要发送邮件的时候,sender就会调用api:mail中配置的http接口,post方式,参数是:

  • tos:用逗号分隔的多个邮箱地址
  • content:邮件正文
  • subject:邮件标题

Installation

# set $GOPATH and $GOROOT
mkdir -p $GOPATH/src/github.com/open-falcon
cd $GOPATH/src/github.com/open-falcon
git clone https://github.com/open-falcon/sender.git
cd sender
go get ./...
./control build
# vi cfg.json modify configuration
./control start

Configuration

  • redis: redis地址需要和alarm、judge使用同一个
  • queue: 维持默认即可,需要和alarm的配置一致
  • worker: 最多同时有多少个线程玩命得调用短信、邮件发送接口
  • api: 短信、邮件发送的http接口,各公司自己提供

sender's People

Contributors

laiwei avatar ulricqin avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.