ユーザ用ツール

サイト用ツール


syslog-ng:client_apache_conf
################################################################################
#
# local added from apache
# facility:local6
#

###############################################
#
# destination
#
destination d_httpd_access { file("/var/log/httpd/access.apache.$YEAR$MONTH$DAY.log"); };
destination d_httpd_error { file("/var/log/httpd/error.apache.$YEAR$MONTH$DAY.log"); };

###############################################
#
# filters
#
filter f_httpd_access {
  facility(local6)
  and level(info)
  and not message("internal dummy connection")
  and not message("server-status")
  and not message("nagios-plugins")
  and not message("apcstat")
  and not message("\.png HTTP")
  and not message("\.jpg HTTP")
  and not message("\.gif HTTP")
  and not message("\.swf HTTP")
  and not message("\.css HTTP")
  and not message("\/css\/ HTTP")
  and not message("\.js HTTP");
};              
filter f_httpd_error {
  facility(local6)
  and level(notice..emerg);
};

###############################################
#
# outputs
#
log { source(s_sys); filter(f_httpd_access); destination(d_httpd_access); };
log { source(s_sys); filter(f_httpd_error); destination(d_httpd_error); };


################################################################################
#
# local added from app
# facility:local5
#

################
# destinations
destination d_app_access { file("/var/log/httpd/access.app.$YEAR$MONTH$DAY.log"); };
destination d_app_error { file("/var/log/httpd/error.app.$YEAR$MONTH$DAY.log"); };


################
# filters
filter f_app_access {
  facility(local5)
  and level(info);
};
filter f_app_error {
  facility(local5)
  and level(notice..emerg);
};

################
# outputs
log { source(s_sys); filter(f_app_access); destination(d_app_access); };
log { source(s_sys); filter(f_app_error); destination(d_app_error); };


################################################################################
#
# remote send
#

################
# destinations
destination d_remote {
  tcp("192.168.56.12" port(514));
};

################
# filters
filter f_app_logtrans {
  facility(local5)
  or facility(local6);
};

################
# outputs
log { source(s_sys); filter(f_app_logtrans); destination(d_remote); };


syslog-ng/client_apache_conf.txt · 最終更新: 2015/05/22 08:37 by clownclown

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki