Guest User

Untitled

a guest
Nov 15th, 2023
162
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 7.11 KB | None | 0 0
  1.   1 @version:4.4
  2.   2 @include "scl.conf"
  3.   3
  4.   4 #
  5.   5 # This sample configuration file is essentially equilivent to the stock
  6.   6 # FreeBSD /etc/syslog.conf file.
  7.   7 #
  8.   8
  9.   9 #
  10.  10 # options
  11.  11 #
  12.  12 options { chain_hostnames(off); flush_lines(0); threaded(yes); };
  13.  13
  14.  14 #
  15.  15 # sources
  16.  16 #
  17.  17 source src { system();
  18.  18              udp(); internal(); };
  19.  19
  20.  20 #
  21.  21 # destinations
  22.  22 #
  23.  23 destination messages { file("/var/log/messages"); };
  24.  24 destination security { file("/var/log/security"); };
  25.  25 destination authlog { file("/var/log/auth.log"); };
  26.  26 destination maillog { file("/var/log/maillog"); };
  27.  27 destination lpd-errs { file("/var/log/lpd-errs"); };
  28.  28 destination xferlog { file("/var/log/xferlog"); };
  29.  29 destination cron { file("/var/log/cron"); };
  30.  30 destination debuglog { file("/var/log/debug.log"); };
  31.  31 destination consolelog { file("/var/log/console.log"); };
  32.  32 destination all { file("/var/log/all.log"); };
  33.  33 destination newscrit { file("/var/log/news/news.crit"); };
  34.  34 destination newserr { file("/var/log/news/news.err"); };
  35.  35 destination newsnotice { file("/var/log/news/news.notice"); };
  36.  36 destination slip { file("/var/log/slip.log"); };
  37.  37 destination ppp { file("/var/log/ppp.log"); };
  38.  38 destination console { file("/dev/console"); };
  39.  39 destination allusers { usertty("*"); };
  40.  40
  41.  41
  42.  42 #
  43.  43 # log facility filters
  44.  44 #
  45.  45 filter f_auth { facility(auth); };
  46.  46 filter f_authpriv { facility(authpriv); };
  47.  47 filter f_not_authpriv { not facility(authpriv); };
  48.  48 #filter f_console { facility(console); };
  49.  49 filter f_cron { facility(cron); };
  50.  50 filter f_daemon { facility(daemon); };
  51.  51 filter f_ftp { facility(ftp); };
  52.  52 filter f_kern { facility(kern); };
  53.  53 filter f_lpr { facility(lpr); };
  54.  54 filter f_mail { facility(mail); };
  55.  55 filter f_news { facility(news); };
  56.  56 filter f_security { facility(security); };
  57.  57 filter f_user { facility(user); };
  58.  58 filter f_uucp { facility(uucp); };
  59.  59 filter f_local0 { facility(local0); };
  60.  60 filter f_local1 { facility(local1); };
  61.  61 filter f_local2 { facility(local2); };
  62.  62 filter f_local3 { facility(local3); };
  63.  63 filter f_local4 { facility(local4); };
  64.  64 filter f_local5 { facility(local5); };
  65.  65 filter f_local6 { facility(local6); };
  66.  66 filter f_local7 { facility(local7); };
  67.  67
  68.  68 #
  69.  69 # log level filters
  70.  70 #
  71.  71 filter f_emerg { level(emerg); };
  72.  72 filter f_alert { level(alert..emerg); };
  73.  73 filter f_crit { level(crit..emerg); };
  74.  74 filter f_err { level(err..emerg); };
  75.  75 filter f_warning { level(warning..emerg); };
  76.  76 filter f_notice { level(notice..emerg); };
  77.  77 filter f_info { level(info..emerg); };
  78.  78 filter f_debug { level(debug..emerg); };
  79.  79 filter f_is_debug { level(debug); };
  80.  79 filter f_is_debug { level(debug); };
  81.  80
  82.  81 #
  83.  82 # program filters
  84.  83 #
  85.  84 filter f_ppp { program("ppp"); };
  86.  85 filter f_slip { program("startslip"); };
  87.  86
  88.  87 #
  89.  88 # *.err;kern.warning;auth.notice;mail.crit              /dev/console
  90.  89 #
  91.  90 log { source(src); filter(f_err); destination(console); };
  92.  91 log { source(src); filter(f_kern); filter(f_warning); destination(console); };
  93.  92 log { source(src); filter(f_auth); filter(f_notice); destination(console); };
  94.  93 log { source(src); filter(f_mail); filter(f_crit); destination(console); };
  95.  94
  96.  95 #
  97.  96 # *.notice;authpriv.none;kern.debug;lpr.info;mail.crit;news.err /var/log/messages
  98.  97 #
  99.  98 log { source(src); filter(f_notice); filter(f_not_authpriv); destination(messages); };
  100.  99 log { source(src); filter(f_kern); filter(f_debug); destination(messages); };
  101. 100 log { source(src); filter(f_lpr); filter(f_info); destination(messages); };
  102. 101 log { source(src); filter(f_mail); filter(f_crit); destination(messages); };
  103. 102 log { source(src); filter(f_news); filter(f_err); destination(messages); };
  104. 103
  105. 104 #
  106. 105 # security.*                                            /var/log/security
  107. 106 #
  108. 107 log { source(src); filter(f_security); destination(security); };
  109. 108
  110. 109 #
  111. 110 # auth.info;authpriv.info                               /var/log/auth.log
  112. 111 log { source(src); filter(f_auth); filter(f_info); destination(authlog); };
  113. 112 log { source(src); filter(f_authpriv); filter(f_info); destination(authlog); };
  114. 113
  115. 114 #
  116. 115 # mail.info                                             /var/log/maillog
  117. 116 #
  118. 117 log { source(src); filter(f_mail); filter(f_info); destination(maillog); };
  119. 118
  120. 119 #
  121. 119 #
  122. 120 # lpr.info                                              /var/log/lpd-errs
  123. 121 #
  124. 122 log { source(src); filter(f_lpr); filter(f_info); destination(lpd-errs); };
  125. 123
  126. 124 #
  127. 125 # ftp.info                                              /var/log/xferlog
  128. 126 #
  129. 127 log { source(src); filter(f_ftp); filter(f_info); destination(xferlog); };
  130. 128
  131. 129 #
  132. 130 # cron.*                                                /var/log/cron
  133. 131 #
  134. 132 log { source(src); filter(f_cron); destination(cron); };
  135. 133
  136. 134 #
  137. 135 # *.=debug                                              /var/log/debug.log
  138. 136 #
  139. 137 log { source(src); filter(f_is_debug); destination(debuglog); };
  140. 138
  141. 139 #
  142. 140 # *.emerg                                               *
  143. 141 #
  144. 142 log { source(src); filter(f_emerg); destination(allusers); };
  145. 143
  146. 144 #
  147. 145 # uncomment this to log all writes to /dev/console to /var/log/console.log
  148. 146 # console.info                                          /var/log/console.log
  149. 147 #
  150. 148 #log { source(src); filter(f_console); filter(f_info); destination(consolelog); };
  151. 149
  152. 150 #
  153. 151 # uncomment this to enable logging of all log messages to /var/log/all.log
  154. 152 # touch /var/log/all.log and chmod it to mode 600 before it will work
  155. 153 # *.*                                                   /var/log/all.log
  156. 154 #
  157. 155 log { source(src); destination(all); };
  158. 156
  159. 157 #
  160. 158 # uncomment this to enable logging to a remote loghost named loghost
  161. 159 # *.*                                                   @loghost
  162. 160 #
  163. 161 #log { source(src); destination(loghost); };
  164. 162 destination lc_net { tcp("172.30.250.70" port(3100) log_fifo_size(1000)); };
  165. 163
  166. 164 # All messages send to a remote site
  167. 165 #
  168. 166 log { source(src); destination(lc_net); };
  169. 167
  170. 168 #
  171. 169 # uncomment these if you're running inn
  172. 170 # news.crit                                             /var/log/news/news.crit
  173. 171 # news.err                                              /var/log/news/news.err
  174. 172 # news.notice                                           /var/log/news/news.notice
  175. 173 #
  176. 174 #log { source(src); filter(f_news); filter(f_crit); destination(newscrit); };
  177. 175 #log { source(src); filter(f_news); filter(f_err); destination(newserr); };
  178. 176 #log { source(src); filter(f_news); filter(f_notice); destination(newsnotice); };
  179. 177
  180. 178 #
  181. 179 # !startslip
  182. 180 # *.*                                                   /var/log/slip.log
  183. 181 #
  184. 182 log { source(src); filter(f_slip); destination(slip); };
  185. 183
  186. 184 #
  187. 185 # !ppp
  188. 186 # *.*                                                   /var/log/ppp.log
  189. 187 #
  190. 188 log { source(src); filter(f_ppp); destination(ppp); };
Tags: syslog-ng
Advertisement
Add Comment
Please, Sign In to add comment