你的小项目是否为日志监控报警而烦恼?开源小工具来啦! 7M 大小、3 分钟部署。
时间: 2020-08-27来源:V2EX
前景提要
marx-agent
一款日志文件监控报警(支持企业微信机器人、钉钉机器人等)工具。
优势 体积小巧仅 7M 部署简单仅需 3 分钟 监控报警程序与业务代码解耦 免费、开源、安全
快速使用
编译 方法一: git clone https://github.com/51daticom/marx-agent.git cd marx-agent export GO111MODULE=on export GOPROXY=https://goproxy.io go build -o marx-agent 方法二: go get -u github.com/51daticom/marx-agent ls {GORPATH}/bin/marx-agent
配置 mv config.nginx.example.in config.ini; vim config.in [pro] buf = 1 whiteList = "" blackList = "\ 500\ ","\ 502\ ","\ 501\ " #监控报警的状态码(正则匹配) log = /var/log/nginx/access.log #监控的日志文件路径 wxpush = https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key={{youkey}} #企业微信机器人 webhook 地址 dingpush = #钉钉机器人 webhook 地址 #/var/log/nginx/access.log format data such as: #127.0.0.1 - - [21/Jul/2020:05:57:48 +0800] "GET /thinkphp/html/public/index.php HTTP/1.1" 500 47 "-" "Mozilla/5.0 (Windows; U; Windows NT 6.0;en-US; rv:1.9.2) Gecko/20100115 Firefox/3.6)" "-" "0.001" "0.001
启动监控报警 ./max-agent config.ini pro
项目地址
https://github.com/51daticom/marx-agent

科技资讯:

科技学院:

科技百科:

科技书籍:

网站大全:

软件大全:

热门排行