搜尋此網誌

Cacti pluging - syslog

vim /etc/rsyslog.conf下新增



$ModLoad ommysql.so

$template SyslogInsert,"INSERT INTO syslog_incoming(facility, priority, date, time, host, message) values (%syslogfacility%, %syslogpriority%, '%timereported:::date-mysql%', '%timereported:::date-mysql%', '%HOSTNAME%', '%msg%')", SQL
*.*             :ommysql:localhost,syslog,cacti,redhat;SyslogInsert
*.* /var/log/messages.log
$ModLoad imudp.so
$ModLoad imtcp.so
$UDPServerRun 514
$InputTCPServerRun 514
*.* localhost
*.*    >127.0.0.1,syslog,cacti,redhat;cacti_syslog


參考網址 : http://blog.happinesskt.idv.tw/2008/04/%E5%88%A9%E7%94%A8-cacti-%E6%9E%B6%E8%A8%AD-log-server/comment-page-1/#comment-2247
 

Copyright © Jackie.Chen | Powered by Blogger | Template by 54BLOGGER | Fixed by Free Blogger Templates