No description, website, or topics provided.
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
Godeps fix event_id error Nov 6, 2017
backend init Aug 5, 2016
cache init Aug 5, 2016
cron init Aug 5, 2016
g fix event_id error Nov 6, 2017
judge fix event_id error Nov 6, 2017
receiver init Aug 5, 2016
sender init Aug 5, 2016
vendor fix event_id error Nov 6, 2017
.gitignore init Aug 5, 2016
README.md add godep Mar 24, 2017
cfg.example.json init Aug 5, 2016
control init Aug 5, 2016
main.go fix control build error Aug 8, 2016

README.md

urlooker-alarm

alarm是用于判断是否触发报警条件的组件

alarm会定期从web端获取策略列表,接收到web端发送的检测数据后,对数据进行判断,若触发则产生event数据,将event数据存到 redis 中

Installation

# set $GOPATH and $GOROOT
mkdir -p $GOPATH/src/github.com/urlooker
cd $GOPATH/src/github.com/urlooker
git clone https://github.com/URLooker/alarm.git
cd alarm
./control build
./control start

Configuration


{
    "debug": false,
	"remain":10,  #配置策略中支持的最大连续次数
	"rpc":{
		"listen":"0.0.0.0:1986"
	},
    "web": {
        "addrs": ["127.0.0.1:1985"], #可以填多个web地址
        "timeout": 300,
        "interval": 60
    },
    "alarm": {
        "enabled": true,
        "minInterval": 180,
        "queuePattern": "event",
        "redis": {
            "dsn": "127.0.0.1:6379",
            "maxIdle": 5,
            "connTimeout": 20000,
            "readTimeout": 20000,
            "writeTimeout": 20000
        }
    },
    "queue": {
        "sms": "/sms",
        "mail": "/mail"
    },
    "worker": {
        "sms": 10,
        "mail": 50
    },
    "sms": "",
    "smtp": {
        "addr": "mail.addr:25",
        "username": "mail@mail.com",
        "password": "",
        "from": "mail@mail.com"
    }
}