Saltstack Official Syslog-NG Formula
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

242 lines
5.2KB

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