前言
上篇我们介绍了一下catepaw的三个插件,指行shell脚本的 exec 插件,接口探活的 http 插件,系统日志过滤的 journaltail 插件。这篇我们接下来在探寻一下剩下的三个插件。目前最新版的下载地址:https://download.flashcat.cloud/catpaw-v0.4.0-linux-amd64.tar.gz 不过我看大佬说有其他平台安装包需求可以联系他😃
使用介绍
详见前篇介绍,两个准备,第一目标机器上部署catepaw采集器,第二绑定FlashDuty 账号接收推送数据,当然也可以自己搞个 HTTP Server,接收 catpaw 的事件推送,然后发送到企微、钉钉、飞书、邮件等
可用插件
目前最新版是catpaw-v0.4.0-linux-amd64,除了上篇说的插件还有这几个插件:mtime 插件,net 插件,sfiler 插件。
- mtime 插件
mtime 插件监控指定目录下近期的文件变更。
more conf.d/p.mtime/mtime.toml
[[instances]]
time_span = "3m"
directory = "/tmp"
check = "file changed or created"
interval = "30s"
[instances.alerting]
## Enable alerting or not
enabled = true
## Same functionality as Prometheus keyword 'for'
for_duration = 0
## Minimum interval duration between notifications
repeat_interval = "5m"
## Maximum number of notifications
repeat_number = 3
## Whether notify recovery event
recovery_notification = true
## Choice: Critical, Warning, Info
default_severity