If added to agent.conf template localfile tag

This commit is contained in:
Gonzalo Acuña 2022-04-27 19:07:07 -03:00
parent a6093aedd9
commit d1b80ebd29
No known key found for this signature in database
GPG Key ID: 646BA79A313A2270
2 changed files with 38 additions and 36 deletions

View File

@ -1,7 +1,7 @@
--- ---
filebeat_version: 7.10.2 filebeat_version: 7.10.2
wazuh_template_branch: v4.3.0 wazuh_template_branch: 4.3
filebeat_node_name: node-1 filebeat_node_name: node-1

View File

@ -43,41 +43,43 @@
</syscheck> </syscheck>
{% endif %} {% endif %}
{% for localfile in agent_config.localfiles %} {% if agent_config.localfiles is defined %}
<localfile> {% for localfile in agent_config.localfiles %}
<log_format>{{ localfile.format }}</log_format> <localfile>
{% if localfile.format == 'command' or localfile.format == 'full_command' %} <log_format>{{ localfile.format }}</log_format>
<command>{{ localfile.command }}</command> {% if localfile.format == 'command' or localfile.format == 'full_command' %}
{% if localfile.alias is defined %} <command>{{ localfile.command }}</command>
<alias>{{ localfile.alias }}</alias> {% if localfile.alias is defined %}
{% endif %} <alias>{{ localfile.alias }}</alias>
{% if localfile.frequency is defined %} {% endif %}
<frequency>{{ localfile.frequency }}</frequency> {% if localfile.frequency is defined %}
{% endif %} <frequency>{{ localfile.frequency }}</frequency>
{% else %} {% endif %}
<location>{{ localfile.location }}</location> {% else %}
{% if localfile.format == 'eventchannel' %} <location>{{ localfile.location }}</location>
{% if localfile.only_future_events is defined %} {% if localfile.format == 'eventchannel' %}
<only-future-events>{{ localfile.only_future_events }}</only_future_events> {% if localfile.only_future_events is defined %}
{% endif %} <only-future-events>{{ localfile.only_future_events }}</only_future_events>
{% if localfile.query is defined %} {% endif %}
<query>{{ localfile.query }}</query> {% if localfile.query is defined %}
{% endif %} <query>{{ localfile.query }}</query>
{% endif %} {% endif %}
{% endif %} {% endif %}
{% if localfile.format == 'json' and localfile.labels is defined %} {% endif %}
{% for item in localfile.labels %} {% if localfile.format == 'json' and localfile.labels is defined %}
<label key="{{ item.key }}">{{ item.value }}</label> {% for item in localfile.labels %}
{% endfor %} <label key="{{ item.key }}">{{ item.value }}</label>
{% endif %} {% endfor %}
{% if localfile.target is defined %} {% endif %}
<target>{{ localfile.target }}</target> {% if localfile.target is defined %}
{% endif %} <target>{{ localfile.target }}</target>
{% if localfile.out_format is defined %} {% endif %}
<out_format>{{ localfile.out_format }}</out_format> {% if localfile.out_format is defined %}
{% endif %} <out_format>{{ localfile.out_format }}</out_format>
</localfile> {% endif %}
{% endfor %} </localfile>
{% endfor %}
{% endif %}
{% if agent_config.rootcheck is defined %} {% if agent_config.rootcheck is defined %}
<rootcheck> <rootcheck>