GithubHelp home page GithubHelp logo

alarm's Introduction

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
go get ./...
./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": "[email protected]",
        "password": "",
        "from": "[email protected]"
    }
}


alarm's People

Contributors

710leo 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.