-
-
Save anonymous/7e546dfbaa0b83cd267c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@version:3.2 | |
# syslog-ng configuration file. | |
# | |
# This should behave pretty much like the original syslog on RedHat. But | |
# it could be configured a lot smarter. | |
# | |
# See syslog-ng(8) and syslog-ng.conf(5) for more information. | |
# | |
options { | |
# flush_lines (0); | |
flush_lines (100); | |
log_iw_size(100); | |
log_fetch_limit(100); | |
time_reopen (10); | |
log_fifo_size (1000); | |
long_hostnames (off); | |
use_dns (yes); | |
use_fqdn (no); | |
create_dirs (yes); | |
keep_hostname (yes); | |
}; | |
source s_sys { | |
file ("/proc/kmsg" program_override("kernel: ")); | |
unix-stream ("/dev/log"); | |
internal(); | |
}; | |
{% if grains['roles'] == 'sbp' %} | |
source s_sap { | |
file("/var/log/sendandprint/sendandprint.log" flags(no-parse)); | |
}; | |
source s_tomcat_mod_jk { | |
unix-stream("/var/log/httpd/tomcat_mod_jk.socket" | |
max-connections(512) | |
keep-alive(yes)); | |
}; | |
source s_tomcat_error { | |
unix-stream("/var/log/httpd/tomcat_error.socket" | |
max-connections(512) | |
keep-alive(yes)); | |
}; | |
source s_tomcat_access { | |
unix-stream("/var/log/httpd/tomcat_access.socket" | |
max-connections(512) | |
keep-alive(yes)); | |
}; | |
source s_jboss_error { | |
unix-stream("/var/log/httpd/jboss_error.socket" | |
max-connections(512) | |
keep-alive(yes)); | |
}; | |
source s_jboss_access { | |
unix-stream("/var/log/httpd/jboss_access.socket" | |
max-connections(512) | |
keep-alive(yes)); | |
}; | |
source s_jboss_parchment_error { | |
unix-stream("/var/log/httpd/jboss_parchment_error.socket" | |
max-connections(512) | |
keep-alive(yes)); | |
}; | |
source s_jboss_parchment_access { | |
unix-stream("/var/log/httpd/jboss_parchment_access.socket" | |
max-connections(512) | |
keep-alive(yes)); | |
}; | |
source s_exports { | |
file("/var/log/jbossas/domain/process-controller.log" program_override("jboss_process_controller_log") flags(no-parse)); | |
file("/var/log/jbossas/domain/host-controller.log" program_override("jboss_host_controller_log") flags(no-parse)); | |
file("/var/log/jboss-as/console.log" program_override("jboss_console_log") flags(no-parse)); | |
file("/usr/share/jbossas/standalone/log/server.log" program_override("sectran") flags(no-parse)); | |
file("/usr/share/jbossas/standalone/log/infinispan.log" program_override("jboss_infinispan_log") flags(no-parse)); | |
file("/usr/share/jbossas/standalone/log/quartz_jobs.log" program_override("jboss_quartz_jobs_log") flags(no-parse)); | |
file("/usr/share/jbossas/standalone/log/log4jdbc.log" program_override("jboss_log4jdbc_log") flags(no-parse)); | |
file("/var/log/sendandprint/sendandprint.log" program_override("sendandprint") flags(no-parse)); | |
}; | |
{% endif %} | |
{% if grains['roles'] == 'svc' %} | |
source s_exports { | |
file("/var/log/jboss-as/console.log" program_override("jboss_console_log") flags(no-parse)); | |
file("/usr/share/jbossas/standalone/log/server.log" program_override("sectran") flags(no-parse)); | |
file("/usr/share/jbossas/standalone/log/infinispan.log" program_override("jboss_infinispan_log") flags(no-parse)); | |
file("/usr/share/jbossas/standalone/log/quartz_jobs.log" program_override("jboss_quartz_jobs_log") flags(no-parse)); | |
file("/usr/share/jbossas/standalone/log/log4jdbc.log" program_override("jboss_log4jdbc_log") flags(no-parse)); | |
}; | |
{% endif %} | |
destination d_cons { file("/dev/console"); }; | |
destination d_mesg { file("/var/log/messages"); }; | |
destination d_auth { file("/var/log/secure"); }; | |
destination d_mail { file("/var/log/maillog" flush_lines(10)); }; | |
destination d_spol { file("/var/log/spooler"); }; | |
destination d_boot { file("/var/log/boot.log"); }; | |
destination d_cron { file("/var/log/cron"); }; | |
destination d_kern { file("/var/log/kern"); }; | |
destination d_mlal { usertty("*"); }; | |
filter f_kernel { facility(kern); }; | |
filter f_default { level(info..emerg) and | |
not (facility(mail) | |
or facility(authpriv) | |
or facility(cron)); }; | |
filter f_auth { facility(authpriv); }; | |
filter f_mail { facility(mail); }; | |
filter f_emergency { level(emerg); }; | |
filter f_news { facility(uucp) or | |
(facility(news) | |
and level(crit..emerg)); }; | |
filter f_boot { facility(local7); }; | |
filter f_cron { facility(cron); }; | |
log { source(s_sys); filter(f_kernel); destination(d_kern); }; | |
log { source(s_sys); filter(f_default); destination(d_mesg); }; | |
log { source(s_sys); filter(f_auth); destination(d_auth); }; | |
log { source(s_sys); filter(f_mail); destination(d_mail); }; | |
log { source(s_sys); filter(f_emergency); destination(d_mlal); }; | |
log { source(s_sys); filter(f_news); destination(d_spol); }; | |
log { source(s_sys); filter(f_boot); destination(d_boot); }; | |
log { source(s_sys); filter(f_cron); destination(d_cron); }; | |
# vim:ft=syslog-ng:ai:si:ts=4:sw=4:et: | |
# send everything to log host | |
source s_local { internal(); unix-stream("/dev/log"); file("/proc/kmsg" log_prefix("kernel: ")); }; | |
destination d_loghost {udp("172.16.4.37" port(514));}; | |
{% if grains['roles'] == 'sbp' or grains['roles'] == 'sweb' %} | |
log { source(s_tomcat_mod_jk); destination(d_loghost); }; | |
log { source(s_tomcat_error); destination(d_loghost); }; | |
log { source(s_tomcat_access); destination(d_loghost); }; | |
log { source(s_jboss_error); destination(d_loghost); }; | |
log { source(s_jboss_access); destination(d_loghost); }; | |
log { source(s_jboss_parchment_access); destination(d_loghost); }; | |
log { source(s_jboss_parchment_error); destination(d_loghost); }; | |
{% endif %} | |
log { source(s_exports); destination(d_loghost); }; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment