goMontioringDdl 介绍
goMontioringDdl 是通过go实现对binlog的订阅实现对mysql的ddl监控报警并发送钉钉报警!
安装
- 安装 Go (1.6+) 设置并 GOPATH
- 使用go get github.com/qieangel2013/goMontioringDdl
- cd $GOPATH/src/github.com/qieangel2013/goMontioringDdl
- go build main
- ./main
怎么使用?
- 创建mysql表.
- 设置配置文件 river.toml.
- 配置 ding_webhook_url 发送钉钉消息.
- 设置mysql的源配置.
- Start ./main.
注意
- binlog 的格式必须为 row.
- binlog row image 必须为 full .
源
源配置.
下面是源配置:
# MySQL data source [[source]] schema = "test" tables = ["*"] # MySQL data source [[source]] schema = "test_1" tables = ["*", t4]