Saltstack Official Syslog-NG Formula
Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.

230 lines
5.1KB

  1. # -*- coding: utf-8 -*-
  2. # vim: ft=yaml
  3. ---
  4. syslog_ng:
  5. options:
  6. - chain_hostnames: false
  7. - flush_lines: 0
  8. - use_dns: false
  9. - use_fqdn: false
  10. - owner: root
  11. - group: adm
  12. - perm: =0640
  13. - stats_freq: 0
  14. - bad_hostname: "^gconfd$"
  15. source:
  16. - s_src:
  17. - system: null
  18. - internal: null
  19. destination:
  20. # First some standard logfile
  21. - d_auth:
  22. - file:
  23. - /var/log/auth.log
  24. - d_cron:
  25. - file:
  26. - /var/log/cron.log
  27. - d_daemon:
  28. - file:
  29. - /var/log/daemon.log
  30. - d_kern:
  31. - file:
  32. - /var/log/kern.log
  33. - d_lpr:
  34. - file:
  35. - /var/log/lpr.log
  36. - d_mail:
  37. - file:
  38. - /var/log/mail.log
  39. - d_syslog:
  40. - file:
  41. - /var/log/syslog
  42. - d_user:
  43. - file:
  44. - /var/log/user.log
  45. - d_uucp:
  46. - file:
  47. - /var/log/uucp.log
  48. # This files are the log come from the mail subsystem.
  49. - d_mailinfo:
  50. - file:
  51. - /var/log/mail.info
  52. - d_mailwarn:
  53. - file:
  54. - /var/log/mail.warn
  55. - d_mailerr:
  56. - file:
  57. - /var/log/mail.err
  58. # Logging for INN news system
  59. - d_newscrit:
  60. - file:
  61. - /var/log/news/news.crit
  62. - d_newserr:
  63. - file:
  64. - /var/log/news/news.err
  65. - d_newsnotice:
  66. - file:
  67. - /var/log/news/news.notice
  68. # Some 'catch-all' logfiles
  69. - d_debug:
  70. - file:
  71. - /var/log/debug
  72. - d_error:
  73. - file:
  74. - /var/log/error
  75. - d_messages:
  76. - file:
  77. - /var/log/messages
  78. # The root's console.
  79. - d_console:
  80. - usertty:
  81. - root
  82. # Virtual console.
  83. - d_console_all:
  84. - file:
  85. - '`tty10`'
  86. # The named pipe /dev/xconsole is for the nsole' utility.
  87. - d_xconsole:
  88. - pipe:
  89. - /dev/xconsole
  90. # Debian only
  91. - d_ppp:
  92. - file:
  93. - /var/log/ppp.log
  94. filter:
  95. - f_dbg:
  96. - level: =debug
  97. - f_info:
  98. - level: =info
  99. - f_notice:
  100. - level: =notice
  101. - f_warn:
  102. - level: =warn
  103. - f_err:
  104. - level: =err
  105. - f_crit:
  106. - level: =crit .. emerg
  107. - f_error:
  108. - level: =err .. emerg
  109. - f_console:
  110. - level: =warn .. emerg
  111. - f_debug:
  112. - =level(debug) and not facility(auth, authpriv, news, mail)
  113. - f_messages:
  114. - =level(info,notice,warn) and not facility(auth,authpriv,cron,daemon,mail,news)
  115. - f_auth:
  116. - =facility(auth, authpriv) and not filter(f_debug)
  117. - f_cron:
  118. - =facility(cron) and not filter(f_debug)
  119. - f_daemon:
  120. - =facility(daemon) and not filter(f_debug)
  121. - f_kern:
  122. - =facility(kern) and not filter(f_debug)
  123. - f_lpr:
  124. - =facility(lpr) and not filter(f_debug)
  125. - f_local:
  126. # yamllint disable-line rule:line-length
  127. - =facility(local0, local1, local3, local4, local5, local6, local7) and not filter(f_debug)
  128. - f_mail:
  129. - =facility(mail) and not filter(f_debug)
  130. - f_news:
  131. - =facility(news) and not filter(f_debug)
  132. - f_syslog3:
  133. - =not facility(auth, authpriv, mail) and not filter(f_debug)
  134. - f_user:
  135. - =facility(user) and not filter(f_debug)
  136. - f_uucp:
  137. - =facility(uucp) and not filter(f_debug)
  138. - f_cnews:
  139. - =level(notice, err, crit) and facility(news)
  140. - f_cother:
  141. - =level(debug, info, notice, warn) or facility(daemon, mail)
  142. - f_ppp:
  143. - =facility(local2) and not filter(f_debug)
  144. log:
  145. -
  146. - source: =s_src
  147. - filter: =f_auth
  148. - destination: =d_auth
  149. -
  150. - source: =s_src
  151. - filter: =f_cron
  152. - destination: =d_cron
  153. -
  154. - source: =s_src
  155. - filter: =f_daemon
  156. - destination: =d_daemon
  157. -
  158. - source: =s_src
  159. - filter: =f_kern
  160. - destination: =d_kern
  161. -
  162. - source: =s_src
  163. - filter: =f_lpr
  164. - destination: =d_lpr
  165. -
  166. - source: =s_src
  167. - filter: =f_syslog3
  168. - destination: =d_syslog
  169. -
  170. - source: =s_src
  171. - filter: =f_user
  172. - destination: =d_user
  173. -
  174. - source: =s_src
  175. - filter: =f_uucp
  176. - destination: =d_uucp
  177. -
  178. - source: =s_src
  179. - filter: =f_mail
  180. - destination: =d_mail
  181. -
  182. - source: =s_src
  183. - filter: =f_news
  184. - filter: =f_crit
  185. - destination: =d_newscrit
  186. -
  187. - source: =s_src
  188. - filter: =f_news
  189. - filter: =f_err
  190. - destination: =d_newserr
  191. -
  192. - source: =s_src
  193. - filter: =f_news
  194. - filter: =f_notice
  195. - destination: =d_newsnotice
  196. -
  197. - source: =s_src
  198. - filter: =f_debug
  199. - destination: =d_debug
  200. -
  201. - source: =s_src
  202. - filter: =f_error
  203. - destination: =d_error
  204. -
  205. - source: =s_src
  206. - filter: =f_messages
  207. - destination: =d_messages
  208. -
  209. - source: =s_src
  210. - filter: =f_console
  211. - destination: =d_console_all
  212. - destination: =d_xconsole
  213. -
  214. - source: =s_src
  215. - filter: =f_crit
  216. - destination: =d_console