Merge remote-tracking branch 'remotes/origin/dev' into issue/6469

This commit is contained in:
m0duspwnens
2021-12-15 17:08:56 -05:00
10 changed files with 57 additions and 30 deletions

View File

@@ -0,0 +1 @@
-Dlog4j2.formatMsgNoLookups=true

View File

@@ -57,6 +57,10 @@ logstash:
- gid: 931
- home: /opt/so/conf/logstash
lslibdir:
file.absent:
- name: /opt/so/conf/logstash/lib
lsetcdir:
file.directory:
- name: /opt/so/conf/logstash/etc

View File

@@ -7,19 +7,37 @@
{%- set ES_PASS = salt['pillar.get']('elasticsearch:auth:users:so_elastic_user:pass', '') %}
output {
if "beat-ext" in [tags] and "import" not in [tags] and "filebeat" not in [metadata][pipeline] {
elasticsearch {
pipeline => "beats.common"
hosts => "{{ ES }}"
{% if salt['pillar.get']('elasticsearch:auth:enabled') is sameas true %}
user => "{{ ES_USER }}"
password => "{{ ES_PASS }}"
{% endif %}
index => "so-beats"
template_name => "so-beats"
template => "/templates/so-beats-template.json"
template_overwrite => true
ssl => true
ssl_certificate_verification => false
}
if [metadata][_id] {
elasticsearch {
pipeline => "beats.common"
hosts => "{{ ES }}"
{% if salt['pillar.get']('elasticsearch:auth:enabled') is sameas true %}
user => "{{ ES_USER }}"
password => "{{ ES_PASS }}"
{% endif %}
index => "so-beats"
template_name => "so-beats"
template => "/templates/so-beats-template.json"
template_overwrite => true
ssl => true
ssl_certificate_verification => false
document_id => "%{[metadata][_id]}"
}
} else {
elasticsearch {
pipeline => "beats.common"
hosts => "{{ ES }}"
{% if salt['pillar.get']('elasticsearch:auth:enabled') is sameas true %}
user => "{{ ES_USER }}"
password => "{{ ES_PASS }}"
{% endif %}
index => "so-beats"
template_name => "so-beats"
template => "/templates/so-beats-template.json"
template_overwrite => true
ssl => true
ssl_certificate_verification => false
}
}
}
}