https://github.com/lal0ne/monitor
  
  
    监控网站目录下的文件变更,通过钉钉机器人发送告警。 
    https://github.com/lal0ne/monitor
  
        Last synced: 4 months ago 
        JSON representation
    
监控网站目录下的文件变更,通过钉钉机器人发送告警。
- Host: GitHub
 - URL: https://github.com/lal0ne/monitor
 - Owner: lal0ne
 - Created: 2021-09-14T09:47:40.000Z (about 4 years ago)
 - Default Branch: master
 - Last Pushed: 2023-04-19T09:59:16.000Z (over 2 years ago)
 - Last Synced: 2024-11-21T12:44:57.068Z (12 months ago)
 - Language: Go
 - Size: 63.5 KB
 - Stars: 12
 - Watchers: 4
 - Forks: 4
 - Open Issues: 0
 - 
            Metadata Files:
            
- Readme: README.md
 
 
Awesome Lists containing this project
- awesome-hacking-lists - lal0ne/monitor - 监控网站目录下的文件变更,通过钉钉机器人发送告警。 (Go)
 
README
          # monitor
监控网站目录下的文件变更,可通过钉钉机器人发送告警信息。
## 配置文件说明
```yaml
# 记录目录下所有文件变更情况
logflag: false
log: monitor.log
# 钉钉配置文件
dingtalk:
  flag: true
  api: https://oapi.dingtalk.com/robot/send?access_token=XXXXXX
  # 自定义关键词
  key: XXX
# 监控配置
monitor:
  -
    # 监控目录
    path: /tmp/
    # 以下目录变更不做处理
    ignoreflag: false
    ignorepath:
      - /tmp/log/
    # 以下后缀名为黑名单,即该类型均告警[优先级没有ignorepath高]
    typeflag: true
    type:
      - ^php([0-9]*)
  -
    path: /root/
    ignoreflag: true
    ignorepath:
      - /root/log/
    typeflag: true
    type:
      - ^php([0-9]*)
```
## 运行
将可执行程序与配置文件放置同一文件夹,运行可执行程序即可。
## 下载
[下载地址](https://github.com/lal0ne/monitor/releases)
提供`linux`、`darwin`和`win`下的可执行程序。
## todo
- [x] 多个目录
- [x] 黑名单正则
- [ ] 日志分割