Add additional config for Filebeat modules

This commit is contained in:
Wes Lambert
2021-05-06 13:54:28 +00:00
parent 865ba912f8
commit 37929dbd7d
7 changed files with 41 additions and 191 deletions

View File

@@ -1,19 +1,20 @@
{%- if grains['role'] == 'so-eval' -%}
%- if grains['role'] == 'so-eval' -%}
{%- set ES = salt['pillar.get']('manager:mainip', '') -%}
{%- else %}
{%- set ES = salt['pillar.get']('elasticsearch:mainip', '') -%}
{%- endif %}
output {
if [module] =~ "zeek" and "import" not in [tags] {
elasticsearch {
pipeline => "%{module}.%{dataset}"
hosts => "{{ ES }}"
index => "so-zeek"
template_name => "so-zeek"
template => "/templates/so-zeek-template.json"
template_overwrite => true
ssl => true
ssl_certificate_verification => false
}
}
if [event][module] == 'zeek' {
elasticsearch {
id => "zeek_logs"
pipeline => "filebeat-%{[agent][version]}-zeek-%{[fileset][name]}-pipeline"
hosts => "{{ ES }}"
index => "so-zeek-%{+YYYY.MM.dd}"
template_name => "so-common"
template => "/templates/so-common-template.json"
template_overwrite => true
ssl => true
ssl_certificate_verification => false
}
}
}

View File

@@ -4,12 +4,12 @@
{%- set ES = salt['pillar.get']('elasticsearch:mainip', '') -%}
{%- endif %}
output {
if [module] =~ "suricata" and "import" not in [tags] {
if [event][module] =~ "suricata" and "import" not in [tags] {
elasticsearch {
pipeline => "%{module}.%{dataset}"
pipeline => "filebeat-%{[agent][version]}-suricata-%{[fileset][name]}-pipeline"
hosts => "{{ ES }}"
index => "so-ids"
template_name => "so-ids"
template_name => "so-ids"
template => "/templates/so-ids-template.json"
ssl => true
ssl_certificate_verification => false