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

Allow overriding modules, including max_file_size for file_integrity/system #34

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,38 @@ auditbeat_processors: |
auditbeat_portage:
package: =auditbeat-{{ auditbeat_service.version }}
getbinpkg: no

auditbeat_module:
auditd:
enabled: true
file_integrity:
enabled: true
paths:
- /bin
- /usr/bin
- /sbin
- /usr/sbin
- /etc
system:
enabled: true
datasets:
- host
- login
- package
- process
- socket
- user

auditbeat_module_windows:
file_integrity:
enabled: true
paths:
- C:\windows
- C:\windows\system32
- C:\Program Files
- C:\Program Files (x86)
system:
enabled: true
datasets:
- host
- process
3 changes: 3 additions & 0 deletions templates/auditbeat.yml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ auditbeat.modules:
- module: file_integrity
paths:
{{ auditbeat_module.file_integrity.paths | to_nice_yaml | trim | indent(4) }}
max_file_size: {{ auditbeat_module.file_integrity.max_file_size | default("100 MiB") }}
{% endif %}
{% if auditbeat_module.system.enabled | bool %}
- module: system
Expand All @@ -30,6 +31,8 @@ auditbeat.modules:
# File patterns of the login record files.
login.wtmp_file_pattern: {{ auditbeat_module.system.login_wtmp_pattern | default('/var/log/wtmp*') }}
login.btmp_file_pattern: {{ auditbeat_module.system.login_btmp_pattern | default('/var/log/btmp*') }}

process.hash.max_file_size: {{ auditbeat_module.system["process.hash.max_file_size"] | default("100 MiB") }}
{% endif %}
#==================== Elasticsearch template setting ==========================
setup.template.enabled: {{ auditbeat_template.enabled | default(true) }}
Expand Down
33 changes: 0 additions & 33 deletions vars/main.yml
Original file line number Diff line number Diff line change
@@ -1,35 +1,2 @@
---
# vars file for ansible-role-auditbeat
auditbeat_module:
auditd:
enabled: true
file_integrity:
enabled: true
paths:
- /bin
- /usr/bin
- /sbin
- /usr/sbin
- /etc
system:
enabled: true
datasets:
- host
- login
- package
- process
- socket
- user
auditbeat_module_windows:
file_integrity:
enabled: true
paths:
- C:\windows
- C:\windows\system32
- C:\Program Files
- C:\Program Files (x86)
system:
enabled: true
datasets:
- host
- process