Saltstack Official Syslog-NG Formula
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

252 lines
5.4KB

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