Update all configs to pass user/pass to ES

This commit is contained in:
Jason Ertel
2021-06-02 12:17:15 -04:00
parent 4ff85ab0c4
commit 20e896cacf
19 changed files with 80 additions and 11 deletions

View File

@@ -3,11 +3,15 @@
{%- else %}
{%- set ES = salt['pillar.get']('elasticsearch:mainip', '') -%}
{%- endif %}
{%- set ES_USER = salt['pillar.get']('elasticsearch:auth:users:so_logstash_user:user', '') %})
{%- set ES_PASS = salt['pillar.get']('elasticsearch:auth:users:so_logstash_user:pass', '') %})
output {
if [module] =~ "zeek" and "import" not in [tags] {
elasticsearch {
pipeline => "%{module}.%{dataset}"
hosts => "{{ ES }}"
username => "{{ ES_USER }}"
password => "{{ ES_PASS }}"
index => "so-zeek"
template_name => "so-zeek"
template => "/templates/so-zeek-template.json"

View File

@@ -3,11 +3,15 @@
{%- else %}
{%- set ES = salt['pillar.get']('elasticsearch:mainip', '') -%}
{%- endif %}
{%- set ES_USER = salt['pillar.get']('elasticsearch:auth:users:so_logstash_user:user', '') %})
{%- set ES_PASS = salt['pillar.get']('elasticsearch:auth:users:so_logstash_user:pass', '') %})
output {
if "import" in [tags] {
elasticsearch {
pipeline => "%{module}.%{dataset}"
hosts => "{{ ES }}"
username => "{{ ES_USER }}"
password => "{{ ES_PASS }}"
index => "so-import"
template_name => "so-import"
template => "/templates/so-import-template.json"

View File

@@ -3,10 +3,14 @@
{%- else %}
{%- set ES = salt['pillar.get']('elasticsearch:mainip', '') -%}
{%- endif %}
{%- set ES_USER = salt['pillar.get']('elasticsearch:auth:users:so_logstash_user:user', '') %})
{%- set ES_PASS = salt['pillar.get']('elasticsearch:auth:users:so_logstash_user:pass', '') %})
output {
if [event_type] == "sflow" {
elasticsearch {
hosts => "{{ ES }}"
username => "{{ ES_USER }}"
password => "{{ ES_PASS }}"
index => "so-flow"
template_name => "so-flow"
template => "/templates/so-flow-template.json"

View File

@@ -3,10 +3,14 @@
{%- else %}
{%- set ES = salt['pillar.get']('elasticsearch:mainip', '') -%}
{%- endif %}
{%- set ES_USER = salt['pillar.get']('elasticsearch:auth:users:so_logstash_user:user', '') %})
{%- set ES_PASS = salt['pillar.get']('elasticsearch:auth:users:so_logstash_user:pass', '') %})
output {
if [event_type] == "ids" and "import" not in [tags] {
elasticsearch {
hosts => "{{ ES }}"
username => "{{ ES_USER }}"
password => "{{ ES_PASS }}"
index => "so-ids"
template_name => "so-ids"
template => "/templates/so-ids-template.json"

View File

@@ -3,11 +3,15 @@
{%- else %}
{%- set ES = salt['pillar.get']('elasticsearch:mainip', '') -%}
{%- endif %}
{%- set ES_USER = salt['pillar.get']('elasticsearch:auth:users:so_logstash_user:user', '') %})
{%- set ES_PASS = salt['pillar.get']('elasticsearch:auth:users:so_logstash_user:pass', '') %})
output {
if [module] =~ "syslog" {
elasticsearch {
pipeline => "%{module}"
hosts => "{{ ES }}"
username => "{{ ES_USER }}"
password => "{{ ES_PASS }}"
index => "so-syslog"
template_name => "so-syslog"
template => "/templates/so-syslog-template.json"

View File

@@ -3,11 +3,15 @@
{%- else %}
{%- set ES = salt['pillar.get']('elasticsearch:mainip', '') -%}
{%- endif %}
{%- set ES_USER = salt['pillar.get']('elasticsearch:auth:users:so_logstash_user:user', '') %})
{%- set ES_PASS = salt['pillar.get']('elasticsearch:auth:users:so_logstash_pass:pass', '') %})
output {
if [module] =~ "osquery" and "live_query" not in [dataset] {
elasticsearch {
pipeline => "%{module}.%{dataset}"
hosts => "{{ ES }}"
username => "{{ ES_USER }}"
password => "{{ ES_PASS }}"
index => "so-osquery"
template_name => "so-osquery"
template => "/templates/so-osquery-template.json"

View File

@@ -3,6 +3,8 @@
{%- else %}
{%- set ES = salt['pillar.get']('elasticsearch:mainip', '') -%}
{%- endif %}
{%- set ES_USER = salt['pillar.get']('elasticsearch:auth:users:so_logstash_user:user', '') %})
{%- set ES_PASS = salt['pillar.get']('elasticsearch:auth:users:so_logstash_user:pass', '') %})
{% set FEATURES = salt['pillar.get']('elastic:features', False) %}
filter {
@@ -30,6 +32,8 @@ output {
elasticsearch {
pipeline => "osquery.live_query"
hosts => "{{ ES }}"
username => "{{ ES_USER }}"
password => "{{ ES_PASS }}"
index => "so-osquery"
template_name => "so-osquery"
template => "/templates/so-osquery-template.json"

View File

@@ -3,10 +3,14 @@
{%- else %}
{%- set ES = salt['pillar.get']('elasticsearch:mainip', '') -%}
{%- endif %}
{%- set ES_USER = salt['pillar.get']('elasticsearch:auth:users:so_logstash_user:user', '') %})
{%- set ES_PASS = salt['pillar.get']('elasticsearch:auth:users:so_logstash_user:pass', '') %})
output {
if [dataset] =~ "firewall" {
elasticsearch {
hosts => "{{ ES }}"
username => "{{ ES_USER }}"
password => "{{ ES_PASS }}"
index => "so-firewall"
template_name => "so-firewall"
template => "/templates/so-firewall-template.json"

View File

@@ -3,11 +3,15 @@
{%- else %}
{%- set ES = salt['pillar.get']('elasticsearch:mainip', '') -%}
{%- endif %}
{%- set ES_USER = salt['pillar.get']('elasticsearch:auth:users:so_logstash_user:user', '') %})
{%- set ES_PASS = salt['pillar.get']('elasticsearch:auth:users:so_logstash_user:pass', '') %})
output {
if [module] =~ "suricata" and "import" not in [tags] {
elasticsearch {
pipeline => "%{module}.%{dataset}"
hosts => "{{ ES }}"
username => "{{ ES_USER }}"
password => "{{ ES_PASS }}"
index => "so-ids"
template_name => "so-ids"
template => "/templates/so-ids-template.json"

View File

@@ -3,11 +3,15 @@
{%- else %}
{%- set ES = salt['pillar.get']('elasticsearch:mainip', '') -%}
{%- endif %}
{%- set ES_USER = salt['pillar.get']('elasticsearch:auth:users:so_logstash_user:user', '') %})
{%- set ES_PASS = salt['pillar.get']('elasticsearch:auth:users:so_logstash_user:pass', '') %})
output {
if "beat-ext" in [tags] and "import" not in [tags] {
elasticsearch {
pipeline => "beats.common"
hosts => "{{ ES }}"
username => "{{ ES_USER }}"
password => "{{ ES_PASS }}"
index => "so-beats"
template_name => "so-beats"
template => "/templates/so-beats-template.json"

View File

@@ -3,11 +3,15 @@
{%- else %}
{%- set ES = salt['pillar.get']('elasticsearch:mainip', '') -%}
{%- endif %}
{%- set ES_USER = salt['pillar.get']('elasticsearch:auth:users:so_logstash_user:user', '') %})
{%- set ES_PASS = salt['pillar.get']('elasticsearch:auth:users:so_logstash_user:pass', '') %})
output {
if [module] =~ "ossec" {
elasticsearch {
pipeline => "%{module}"
hosts => "{{ ES }}"
username => "{{ ES_USER }}"
password => "{{ ES_PASS }}"
index => "so-ossec"
template_name => "so-ossec"
template => "/templates/so-ossec-template.json"

View File

@@ -3,11 +3,15 @@
{%- else %}
{%- set ES = salt['pillar.get']('elasticsearch:mainip', '') -%}
{%- endif %}
{%- set ES_USER = salt['pillar.get']('elasticsearch:auth:users:so_logstash_user:user', '') %})
{%- set ES_PASS = salt['pillar.get']('elasticsearch:auth:users:so_logstash_user:pass', '') %})
output {
if [module] =~ "strelka" {
elasticsearch {
pipeline => "%{module}.%{dataset}"
hosts => "{{ ES }}"
username => "{{ ES_USER }}"
password => "{{ ES_PASS }}"
index => "so-strelka"
template_name => "so-strelka"
template => "/templates/so-strelka-template.json"