【发布时间】:2017-11-06 06:27:08
【问题描述】:
我需要记录登录mysql的用户。
使用我从本地 mysql 日志中读取的 imfile 模块
input(type="imfile"
File="/var/log/mysql/mysql.log"
Tag="mysql-general"
Severity="warning"
Facility="local1")
我将它发送到远程服务器(它的工作)。
但我只需要发送带有“连接”一词的行,而不是所有消息。
我试试:
if $syslogtag == 'mysql-general' and $msg contains 'Connect' then @*.*.*.*
它仍然在登录任何东西。有什么想法吗?
【问题讨论】: