linux syslog 写到mysql

linux syslog

监控log 是以facilities为local5和local6,对于OP监控log是以SQL语句方式提供
语句:

在log server采用如下方式可以将OP监控log直接写进数据库:

destination df_tang_mysql { program("mysql -uroot -p111111 –h{SQL HOST IP}
tang_monitor" template("$MSGONLY;/n") template_escape(no)); };

filter f_tang_monitor { facility(local5,local6);  };

log {

source(s_all);

filter(f_tang_monitor);

destination(df_tang_mysql); 

};

猜你喜欢

转载自blog.csdn.net/panpanloveruth/article/details/5890386
今日推荐