Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wazuh-manager: syslog_output need option to change level #965

Open
k2patel opened this issue Jul 28, 2023 · 2 comments
Open

wazuh-manager: syslog_output need option to change level #965

k2patel opened this issue Jul 28, 2023 · 2 comments

Comments

@k2patel
Copy link

k2patel commented Jul 28, 2023

Hello,

According to documentation https://documentation.wazuh.com/current/user-manual/reference/ossec-conf/syslog-output.html#level, level is most time important and would help reduce the unnecessary noice while sending out logs.
It would be great to have option to changes that along with port, format etc.

Thank you.

@k2patel
Copy link
Author

k2patel commented Jul 28, 2023

Following block (quick rewrite) might work to handle error and define default value when not explicitly defined.

{% for syslog_output in wazuh_manager_config.syslog_outputs %}
{% if syslog_output.server is not none  %}
  <syslog_output>
    <server>{{ syslog_output.server }}</server>
    {% if syslog_output.level is defined %}
    <level>{{ syslog_output.level }}</level>
    {% endif %}
    {% if syslog_output.port is defined %}
    <port>{{ syslog_output.port }}</port>
    {% else %}
    <port>514</port>
    {% endif %}
    {% if syslog_output.format is defined %}
    <format>{{ syslog_output.format }}</format>
    {% else %}
    <format>default</format>
    {% endif %}
  </syslog_output>
{% endif %}
{% endfor %}
{% endif %}

@jonhattan
Copy link

It would be nice to have the ability to change syslog level with a single variable.

FYI I've proposed a MR that allows to override any template, so you can maintain your changes out of the role and facilitate role updates -> #1337

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants