Created
June 17, 2013 13:32
-
-
Save amadorpahim/5796884 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
# 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 { | |
sync (0); | |
time_reopen (10); | |
log_fifo_size (1000); | |
long_hostnames (off); | |
use_dns (yes); | |
use_fqdn (yes); | |
create_dirs (yes); | |
keep_hostname (yes); | |
}; | |
source s_sys { | |
file ("/proc/kmsg" log_prefix("kernel: ")); | |
unix-stream ("/dev/log"); | |
internal(); | |
# udp(ip(0.0.0.0) port(514)); | |
}; | |
source src { | |
unix-dgram("/dev/log"); | |
internal(); | |
udp(); | |
}; | |
destination d_server_ldap { | |
file("/var/logserver/$HOST/$YEAR/$MONTH/$DAY/ldap.log"owner("root") group("root")); | |
}; | |
destination d_server_asterisk { | |
file("/var/logserver/$HOST/$YEAR/$MONTH/$DAY/asterisk"owner("root") group("root")); | |
}; | |
destination d_server_access { | |
file("/var/logserver/$HOST/$YEAR/$MONTH/$DAY/access"owner("root") group("root")); | |
}; | |
destination d_server_mesg { | |
file("/var/logserver/$HOST/$YEAR/$MONTH/$DAY/messages"owner("root") group("root")); | |
}; | |
destination d_server_auth { | |
file("/var/logserver/$HOST/$YEAR/$MONTH/$DAY/secure" owner("root") group("root")); | |
}; | |
destination d_server_mail { | |
file("/var/logserver/$HOST/$YEAR/$MONTH/$DAY/maillog" sync(10) owner("root") group("root") ); | |
}; | |
destination d_server_spol { | |
file("/var/logserver/$HOST/$YEAR/$MONTH/$DAY/spooler" owner("root") group("root") ); | |
}; | |
destination d_server_boot { | |
file("/var/logserver/$HOST/$YEAR/$MONTH/$DAY/boot.log" owner("root") group("root") ); | |
}; | |
destination d_server_cron { | |
file("/var/logserver/$HOST/$YEAR/$MONTH/$DAY/cron" owner("root") group("root") ); | |
}; | |
destination d_server_kern { | |
file("/var/logserver/$HOST/$YEAR/$MONTH/$DAY/kern" owner("root") group("root") ); | |
}; | |
destination d_server_mlal { | |
file("/var/logserver/$HOST/$YEAR/$MONTH/$DAY/mlal" owner("root") group("root") ); | |
}; | |
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" sync(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_vaucs_asterisk { facility(local0) and | |
netmask(200.233.31.149/255.255.255.255); }; | |
filter f_vkali02_ldap { facility(local4) and | |
netmask(200.233.31.113/255.255.255.255); }; | |
filter f_apollo3w_access { facility(local4) and | |
netmask(200.233.31.248/255.255.255.255); }; | |
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(src); filter(f_vkali02_ldap); destination(d_server_ldap); }; | |
log { source(src); filter(f_vaucs_asterisk); destination(d_server_asterisk); }; | |
log { source(src); filter(f_apollo3w_access); destination(d_server_access); }; | |
log { source(src); filter(f_kernel); destination(d_server_kern); }; | |
log { source(src); filter(f_default); destination(d_server_mesg); }; | |
log { source(src); filter(f_auth); destination(d_server_auth); }; | |
log { source(src); filter(f_mail); destination(d_server_mail); }; | |
log { source(src); filter(f_emergency); destination(d_server_mlal); }; | |
log { source(src); filter(f_news); destination(d_server_spol); }; | |
log { source(src); filter(f_boot); destination(d_server_boot); }; | |
log { source(src); filter(f_cron); destination(d_server_cron); }; | |
#log { source(s_sys); filter(f_kernel); destination(d_cons); }; | |
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: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment