Linux 系统日志管理

20课时
387学过
8分

课程评价 (0)

请对课程作出评价:
0/300

学员评价

暂无精选评价
1分钟

日志发送端

vim /etc/rsyslog.conf

#### MODULES ####

$ModLoad ommysql #添加ommysql模块

#### RULES ####

*.info;mail.none;authpriv.none;cron.none :ommysql:192.168.30.17,Syslog,syslog,centos

重启日志服务

systemctl restart rsyslog

模拟一条日志信息

logger “this is a test log”

切换回远程接收端

能看到刚刚发送的模拟日志信息

Mysql> select * from SystemEvents\G;