Saltstack Official Syslog-NG Formula
No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.

44 líneas
1.0KB

  1. {%- from "syslog_ng/macro.jinja" import rule_builder -%}
  2. {%- from "syslog_ng/map.jinja" import syslog_ng with context -%}
  3. @version: {{ syslog_ng.get('version', '3.3') }}
  4. {%- for module in syslog_ng.get('module', []) %}
  5. @module {{ rule_builder(module) }}
  6. {%- endfor %}
  7. {%- for inc in syslog_ng.get('include', []) %}
  8. @include {{ rule_builder(inc) }}
  9. {%- endfor %}
  10. options {
  11. {%- for rule in syslog_ng.get('options', []) %}
  12. {{ rule_builder(rule) }};
  13. {%- endfor %}
  14. };
  15. {%- for obj in ('source', 'destination', 'filter', 'parser', 'rewrite', 'template') %}
  16. {%- for params in syslog_ng.get(obj, []) %}
  17. {% for name, rules in params.items() %}
  18. {{ obj }} {{ name }} {
  19. {%- for rule in rules %}
  20. {{ rule_builder(rule) }};
  21. {%- endfor %}
  22. };
  23. {%- endfor %}
  24. {%- endfor %}
  25. {%- endfor %}
  26. {% for loggers in syslog_ng.get('log', []) -%}
  27. log {
  28. {%- for rule in loggers %}
  29. {{ rule_builder(rule) }};
  30. {%- endfor %}
  31. };
  32. {% endfor %}
  33. {%- for inc in syslog_ng.get('last_include', []) %}
  34. @include {{ rule_builder(inc) }}
  35. {%- endfor %}