Localfiles fix

This commit is contained in:
Gonzalo Acuña 2022-05-03 16:56:14 -03:00
parent acec963826
commit bbe2a2280b
No known key found for this signature in database
GPG Key ID: 646BA79A313A2270

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>