Skip to content

Commit

Permalink
Fix extra fields for Beats
Browse files Browse the repository at this point in the history
fixes #296
  • Loading branch information
widhalmt committed Jan 15, 2024
1 parent e0996b6 commit aa9557e
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
2 changes: 2 additions & 0 deletions molecule/beats_peculiar/converge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
pattern: '^[[:space:]]+(at|\.{3})[[:space:]]+\b|^Caused by:'
negate: false
match: after
fields:
testfield: thisisatest
elasticsearch_jna_workaround: true
elasticsearch_disable_systemcallfilterchecks: true
elasticstack_full_stack: false
Expand Down
4 changes: 4 additions & 0 deletions molecule/beats_peculiar/verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,7 @@
when:
- beats_filebeat_version.stdout.find('8.4.1') == -1
- elasticstack_release == 8

- name: Check for fields being set
ansible.builtin.command: >
pcregrep -M 'fields:(\n).*testfield: thisisatest' /etc/filebeeat/filebeat.yml
2 changes: 1 addition & 1 deletion roles/beats/templates/filebeat.yml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ filebeat.inputs:
fields:
{% if beats_fields is defined %}
{% for field in beats_fields %}
{{ field }}
{{ field }}: beats_fields['field']
{% endfor %}
{% endif %}
{% if beats_filebeat_log_inputs[input].fields is defined %}
Expand Down

0 comments on commit aa9557e

Please sign in to comment.