"Fossies" - the Fresh Open Source Software Archive

Member "aif-2.1.1/contrib/Debian/syslog-ng.conf" (16 Sep 2020, 10331 Bytes) of package /linux/privat/aif-2.1.1.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Generic config files source code syntax highlighting (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file. See also the latest Fossies "Diffs" side-by-side code changes report for "syslog-ng.conf": 2.1.0_vs_2.1.1.

    1 #
    2 # Example configuration file for syslog-ng under Debian
    3 #                       This will redirect all kernel-debug logging to file /var/log/arno-iptables-firewall.
    4 #                       Don't forget to touch(create) /var/log/arno-iptables-firewall first & set "LOGLEVEL=debug" in the
    5 #                       firewall configuration file (firewall.conf)!
    6 #
    7 # The standard syslog levels are (in descending order of priority):
    8 # emerg alert crit err warning notice info debug
    9 # the aliases "error", "panic", and "warn" are deprecated
   10 # the "none" priority found in the original syslogd configuration is
   11 # only used in internal messages created by syslogd
   12 
   13 
   14 ######
   15 # options
   16 
   17 options {
   18         # disable the chained hostname format in logs
   19         # (default is enabled)
   20         chain_hostnames(0);
   21 
   22         # the time to wait before a died connection is re-established
   23         # (default is 60)
   24         time_reopen(10);
   25 
   26         # the time to wait before an idle destination file is closed
   27         # (default is 60)
   28         time_reap(360);
   29 
   30         # the number of lines buffered before written to file
   31         # you might want to increase this if your disk isn't catching with
   32         # all the log messages you get or if you want less disk activity
   33         # (say on a laptop)
   34         # (default is 0)
   35         #sync(0);
   36 
   37         # the number of lines fitting in the output queue
   38         log_fifo_size(2048);
   39 
   40         # enable or disable directory creation for destination files
   41         create_dirs(yes);
   42 
   43         # default owner, group, and permissions for log files
   44         # (defaults are 0, 0, 0600)
   45         #owner(root);
   46         group(adm);
   47         perm(0640);
   48 
   49         # default owner, group, and permissions for created directories
   50         # (defaults are 0, 0, 0700)
   51         #dir_owner(root);
   52         #dir_group(root);
   53         dir_perm(0755);
   54 
   55         # enable or disable DNS usage
   56         # syslog-ng blocks on DNS queries, so enabling DNS may lead to
   57         # a Denial of Service attack
   58         # (default is yes)
   59         use_dns(no);
   60 
   61         # maximum length of message in bytes
   62         # this is only limited by the program listening on the /dev/log Unix
   63         # socket, glibc can handle arbitrary length log messages, but -- for
   64         # example -- syslogd accepts only 1024 bytes
   65         # (default is 2048)
   66         #log_msg_size(2048);
   67 };
   68 
   69 
   70 ######
   71 # sources
   72 
   73 # all known message sources
   74 source s_all {
   75         # message generated by Syslog-NG
   76         internal();
   77         # standard Linux log source (this is the default place for the syslog()
   78         # function to send logs to)
   79         unix-stream("/dev/log");
   80         # messages from the kernel
   81         file("/proc/kmsg" log_prefix("kernel: "));
   82         # use the above line if you want to receive remote UDP logging messages
   83         # (this is equivalent to the "-r" syslogd flag)
   84         # udp();
   85 };
   86 
   87 
   88 ######
   89 # destinations
   90 
   91 # some standard log files
   92 destination df_auth { file("/var/log/auth.log"); };
   93 destination df_syslog { file("/var/log/syslog"); };
   94 destination df_cron { file("/var/log/cron.log"); };
   95 destination df_daemon { file("/var/log/daemon.log"); };
   96 destination df_kern { file("/var/log/kern.log"); };
   97 destination df_lpr { file("/var/log/lpr.log"); };
   98 destination df_mail { file("/var/log/mail/mail.log"); };
   99 destination df_mail_dot_info { file("/var/log/mail/mail.info"); };
  100 destination df_mail_dot_warn { file("/var/log/mail/mail.warn"); };
  101 destination df_mail_dot_err { file("/var/log/mail/mail.err"); };
  102 destination df_user { file("/var/log/user.log"); };
  103 destination df_uucp { file("/var/log/uucp.log"); };
  104 
  105 # these files are meant for the mail system log files
  106 # and provide re-usable destinations for {mail,cron,...}.info,
  107 # {mail,cron,...}.notice, etc.
  108 destination df_facility_dot_info { file("/var/log/$FACILITY.info"); };
  109 destination df_facility_dot_notice { file("/var/log/$FACILITY.notice"); };
  110 destination df_facility_dot_warn { file("/var/log/$FACILITY.warn"); };
  111 destination df_facility_dot_err { file("/var/log/$FACILITY.err"); };
  112 destination df_facility_dot_crit { file("/var/log/$FACILITY.crit"); };
  113 
  114 # these files are meant for the news system, and are kept separated
  115 # because they should be owned by "news" instead of "root"
  116 destination df_news_dot_notice { file("/var/log/news/news.notice" owner("news")); };
  117 destination df_news_dot_err { file("/var/log/news/news.err" owner("news")); };
  118 destination df_news_dot_crit { file("/var/log/news/news.crit" owner("news")); };
  119 
  120 # some more classical and useful files found in standard syslog configurations
  121 destination df_debug { file("/var/log/debug"); };
  122 destination df_messages { file("/var/log/messages"); };
  123 
  124 # iptables
  125 destination df_firewall { file("/var/log/arno-iptables-firewall"); };
  126 
  127 # pipes
  128 # a console to view log messages under X
  129 destination dp_xconsole { pipe("/dev/xconsole"); };
  130 
  131 # consoles
  132 # this will send messages to everyone logged in
  133 destination du_all { usertty("*"); };
  134 
  135 
  136 ######
  137 # filters
  138 
  139 # all messages from the auth and authpriv facilities
  140 filter f_auth { facility(auth, authpriv); };
  141 
  142 # all messages except from the auth and authpriv facilities
  143 filter f_syslog { not facility(auth, authpriv); };
  144 
  145 # respectively: messages from the cron, daemon, kern, lpr, mail, news, user,
  146 # and uucp facilities
  147 filter f_cron { facility(cron); };
  148 filter f_daemon { facility(daemon); };
  149 filter f_kern { facility(kern) and not level(debug); };
  150 filter f_lpr { facility(lpr); };
  151 filter f_mail { facility(mail); };
  152 filter f_news { facility(news); };
  153 filter f_user { facility(user); };
  154 filter f_uucp { facility(uucp); };
  155 
  156 # some filters to select messages of priority greater or equal to info, warn,
  157 # and err
  158 # (equivalents of syslogd's *.info, *.warn, and *.err)
  159 filter f_at_least_info { level(info..emerg); };
  160 filter f_at_least_notice { level(notice..emerg); };
  161 filter f_at_least_warn { level(warn..emerg); };
  162 filter f_at_least_err { level(err..emerg); };
  163 filter f_at_least_crit { level(crit..emerg); };
  164 
  165 # all messages of priority debug not coming from the auth, authpriv, news, and
  166 # mail facilities
  167 filter f_debug { level(debug) and not facility(auth, authpriv, news, mail, kern); };
  168 
  169 # iptables
  170 filter f_firewall { level(debug) and facility(kern); };
  171 
  172 # all messages of info, notice, or warn priority not coming form the auth,
  173 # authpriv, cron, daemon, mail, and news facilities
  174 filter f_messages {
  175         level(info,notice,warn)
  176             and not facility(auth,authpriv,cron,daemon,mail,news);
  177 };
  178 
  179 # messages with priority emerg
  180 filter f_emerg { level(emerg); };
  181 
  182 # complex filter for messages usually sent to the xconsole
  183 filter f_xconsole {
  184     facility(daemon,mail)
  185         or level(debug,info,notice,warn)
  186         or (facility(news)
  187                 and level(crit,err,notice));
  188 };
  189 
  190 
  191 ######
  192 # logs
  193 # order matters if you use "flags(final);" to mark the end of processing in a
  194 # "log" statement
  195 
  196 # these rules provide the same behavior as the commented original syslogd rules
  197 
  198 # auth,authpriv.*                 /var/log/auth.log
  199 log {
  200         source(s_all);
  201         filter(f_auth);
  202         destination(df_auth);
  203 };
  204 
  205 # *.*;auth,authpriv.none          -/var/log/syslog
  206 log {
  207         source(s_all);
  208         filter(f_syslog);
  209         destination(df_syslog);
  210 };
  211 
  212 # this is commented out in the default syslog.conf
  213 # cron.*                         /var/log/cron.log
  214 #log {
  215 #        source(s_all);
  216 #        filter(f_cron);
  217 #        destination(df_cron);
  218 #};
  219 
  220 # daemon.*                        -/var/log/daemon.log
  221 log {
  222         source(s_all);
  223         filter(f_daemon);
  224         destination(df_daemon);
  225 };
  226 
  227 # kern.*                          -/var/log/kern.log
  228 log {
  229         source(s_all);
  230         filter(f_kern);
  231         destination(df_kern);
  232 };
  233 
  234 # lpr.*                           -/var/log/lpr.log
  235 log {
  236         source(s_all);
  237         filter(f_lpr);
  238         destination(df_lpr);
  239 };
  240 
  241 # mail.*                          -/var/log/mail.log
  242 log {
  243         source(s_all);
  244         filter(f_mail);
  245         destination(df_mail);
  246 };
  247 
  248 # user.*                          -/var/log/user.log
  249 log {
  250         source(s_all);
  251         filter(f_user);
  252         destination(df_user);
  253 };
  254 
  255 # uucp.*                          /var/log/uucp.log
  256 log {
  257         source(s_all);
  258         filter(f_uucp);
  259         destination(df_uucp);
  260 };
  261 
  262 # mail.info                       -/var/log/mail/mail.info
  263 log {
  264         source(s_all);
  265         filter(f_mail);
  266         filter(f_at_least_info);
  267         destination(df_mail_dot_info);
  268 };
  269 
  270 # mail.warn                       -/var/log/mail/mail.warn
  271 log {
  272         source(s_all);
  273         filter(f_mail);
  274         filter(f_at_least_warn);
  275         destination(df_mail_dot_warn);
  276 };
  277 
  278 # mail.err                        /var/log/mail/mail.err
  279 log {
  280         source(s_all);
  281         filter(f_mail);
  282         filter(f_at_least_err);
  283         destination(df_mail_dot_err);
  284 };
  285 
  286 # news.crit                       /var/log/news/news.crit
  287 log {
  288         source(s_all);
  289         filter(f_news);
  290         filter(f_at_least_crit);
  291         destination(df_news_dot_crit);
  292 };
  293 
  294 # news.err                        /var/log/news/news.err
  295 log {
  296         source(s_all);
  297         filter(f_news);
  298         filter(f_at_least_err);
  299         destination(df_news_dot_err);
  300 };
  301 
  302 # news.notice                     /var/log/news/news.notice
  303 log {
  304         source(s_all);
  305         filter(f_news);
  306         filter(f_at_least_notice);
  307         destination(df_news_dot_notice);
  308 };
  309 
  310 
  311 # *.=debug;\
  312 #         auth,authpriv.none;\
  313 #         news.none;mail.none     -/var/log/debug
  314 log {
  315         source(s_all);
  316         filter(f_debug);
  317         destination(df_debug);
  318 };
  319 
  320 
  321 # *.=info;*.=notice;*.=warn;\
  322 #         auth,authpriv.none;\
  323 #         cron,daemon.none;\
  324 #         mail,news.none          -/var/log/messages
  325 log {
  326         source(s_all);
  327         filter(f_messages);
  328         destination(df_messages);
  329 };
  330 
  331 # *.emerg                         *
  332 log {
  333         source(s_all);
  334         filter(f_emerg);
  335         destination(du_all);
  336 };
  337 
  338 # kern.debug (iptables)         /var/log/arno-iptables-firewall
  339 log {
  340         source(s_all);
  341         filter(f_firewall);
  342         destination(df_firewall);
  343 };
  344 
  345 # daemon.*;mail.*;\
  346 #         news.crit;news.err;news.notice;\
  347 #         *.=debug;*.=info;\
  348 #         *.=notice;*.=warn       |/dev/xconsole
  349 log {
  350         source(s_all);
  351         filter(f_xconsole);
  352         destination(dp_xconsole);
  353 };