mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-06 17:22:49 +01:00
Merge pull request #4723 from Security-Onion-Solutions/dev
HEAVYNODE_REDIS hotfix
This commit is contained in:
@@ -36,6 +36,14 @@
|
||||
{% set DOCKER_OPTIONS = salt['pillar.get']('logstash:docker_options', {}) %}
|
||||
{% set TEMPLATES = salt['pillar.get']('elasticsearch:templates', {}) %}
|
||||
|
||||
{% if grains.role in ['so-heavynode'] %}
|
||||
{% set EXTRAHOSTHOSTNAME = salt['grains.get']('host') %}
|
||||
{% set EXTRAHOSTIP = salt['pillar.get']('sensor:mainip') %}
|
||||
{% else %}
|
||||
{% set EXTRAHOSTHOSTNAME = MANAGER %}
|
||||
{% set EXTRAHOSTIP = MANAGERIP %}
|
||||
{% endif %}
|
||||
|
||||
include:
|
||||
- elasticsearch
|
||||
|
||||
@@ -145,7 +153,7 @@ so-logstash:
|
||||
- name: so-logstash
|
||||
- user: logstash
|
||||
- extra_hosts:
|
||||
- {{ MANAGER }}:{{ MANAGERIP }}
|
||||
- {{ EXTRAHOSTHOSTNAME }}:{{ EXTRAHOSTIP }}
|
||||
- environment:
|
||||
- LS_JAVA_OPTS=-Xms{{ lsheap }} -Xmx{{ lsheap }}
|
||||
- port_bindings:
|
||||
|
||||
@@ -1,10 +1,13 @@
|
||||
{%- set MANAGER = salt['grains.get']('master') %}
|
||||
{%- if grains.role in ['so-heavynode'] %}
|
||||
{%- set HOST = salt['grains.get']('host') %}
|
||||
{%- else %}
|
||||
{%- set HOST = salt['grains.get']('master') %}
|
||||
{%- endif %}
|
||||
{%- set THREADS = salt['pillar.get']('logstash_settings:ls_input_threads', '') %}
|
||||
{% set BATCH = salt['pillar.get']('logstash_settings:ls_pipeline_batch_size', 125) %}
|
||||
|
||||
{%- set BATCH = salt['pillar.get']('logstash_settings:ls_pipeline_batch_size', 125) %}
|
||||
input {
|
||||
redis {
|
||||
host => '{{ MANAGER }}'
|
||||
host => '{{ HOST }}'
|
||||
port => 9696
|
||||
ssl => true
|
||||
data_type => 'list'
|
||||
|
||||
@@ -1,8 +1,12 @@
|
||||
{%- set MANAGER = salt['grains.get']('master') %}
|
||||
{% set BATCH = salt['pillar.get']('logstash_settings:ls_pipeline_batch_size', 125) %}
|
||||
{%- if grains.role in ['so-heavynode'] %}
|
||||
{%- set HOST = salt['grains.get']('host') %}
|
||||
{%- else %}
|
||||
{%- set HOST = salt['grains.get']('master') %}
|
||||
{%- endif %}
|
||||
{%- set BATCH = salt['pillar.get']('logstash_settings:ls_pipeline_batch_size', 125) %}
|
||||
output {
|
||||
redis {
|
||||
host => '{{ MANAGER }}'
|
||||
host => '{{ HOST }}'
|
||||
port => 6379
|
||||
data_type => 'list'
|
||||
key => 'logstash:unparsed'
|
||||
|
||||
@@ -9,6 +9,11 @@
|
||||
{% set MAININT = salt['pillar.get']('host:mainint') %}
|
||||
{% set MAINIP = salt['grains.get']('ip_interfaces').get(MAININT)[0] %}
|
||||
{% set CUSTOM_FLEET_HOSTNAME = salt['pillar.get']('global:fleet_custom_hostname', None) %}
|
||||
{% if grains.role in ['so-heavynode'] %}
|
||||
{% set COMMONNAME = salt['grains.get']('host') %}
|
||||
{% else %}
|
||||
{% set COMMONNAME = manager %}
|
||||
{% endif %}
|
||||
|
||||
{% if grains.id.split('_')|last in ['manager', 'eval', 'standalone', 'import', 'helixsensor'] %}
|
||||
{% set trusttheca_text = salt['cp.get_file_str']('/etc/pki/ca.crt')|replace('\n', '') %}
|
||||
@@ -83,10 +88,12 @@ removeesp12dir:
|
||||
- days_remaining: 0
|
||||
- days_valid: 820
|
||||
- backup: True
|
||||
{% if grains.role not in ['so-heavynode'] %}
|
||||
- unless:
|
||||
# https://github.com/saltstack/salt/issues/52167
|
||||
# Will trigger 5 days (432000 sec) from cert expiration
|
||||
- 'enddate=$(date -d "$(openssl x509 -in /etc/pki/influxdb.crt -enddate -noout | cut -d= -f2)" +%s) ; now=$(date +%s) ; expire_date=$(( now + 432000)); [ $enddate -gt $expire_date ]'
|
||||
{% endif %}
|
||||
- timeout: 30
|
||||
- retry:
|
||||
attempts: 5
|
||||
@@ -103,7 +110,7 @@ influxkeyperms:
|
||||
# Create a cert for Redis encryption
|
||||
/etc/pki/redis.key:
|
||||
x509.private_key_managed:
|
||||
- CN: {{ manager }}
|
||||
- CN: {{ COMMONNAME }}
|
||||
- bits: 4096
|
||||
- days_remaining: 0
|
||||
- days_valid: 820
|
||||
@@ -123,14 +130,16 @@ influxkeyperms:
|
||||
- ca_server: {{ ca_server }}
|
||||
- signing_policy: registry
|
||||
- public_key: /etc/pki/redis.key
|
||||
- CN: {{ manager }}
|
||||
- CN: {{ COMMONNAME }}
|
||||
- days_remaining: 0
|
||||
- days_valid: 820
|
||||
- backup: True
|
||||
{% if grains.role not in ['so-heavynode'] %}
|
||||
- unless:
|
||||
# https://github.com/saltstack/salt/issues/52167
|
||||
# Will trigger 5 days (432000 sec) from cert expiration
|
||||
- 'enddate=$(date -d "$(openssl x509 -in /etc/pki/redis.crt -enddate -noout | cut -d= -f2)" +%s) ; now=$(date +%s) ; expire_date=$(( now + 432000)); [ $enddate -gt $expire_date ]'
|
||||
{% endif %}
|
||||
- timeout: 30
|
||||
- retry:
|
||||
attempts: 5
|
||||
@@ -147,7 +156,7 @@ rediskeyperms:
|
||||
{% if grains['role'] in ['so-manager', 'so-eval', 'so-helix', 'so-managersearch', 'so-standalone', 'so-import', 'so-heavynode'] %}
|
||||
/etc/pki/filebeat.key:
|
||||
x509.private_key_managed:
|
||||
- CN: {{ manager }}
|
||||
- CN: {{ COMMONNAME }}
|
||||
- bits: 4096
|
||||
- days_remaining: 0
|
||||
- days_valid: 820
|
||||
@@ -168,18 +177,16 @@ rediskeyperms:
|
||||
- ca_server: {{ ca_server }}
|
||||
- signing_policy: filebeat
|
||||
- public_key: /etc/pki/filebeat.key
|
||||
{% if grains.role == 'so-heavynode' %}
|
||||
- CN: {{grains.host}}
|
||||
{% else %}
|
||||
- CN: {{manager}}
|
||||
{% endif %}
|
||||
- CN: {{ COMMONNAME }}
|
||||
- days_remaining: 0
|
||||
- days_valid: 820
|
||||
- backup: True
|
||||
{% if grains.role not in ['so-heavynode'] %}
|
||||
- unless:
|
||||
# https://github.com/saltstack/salt/issues/52167
|
||||
# Will trigger 5 days (432000 sec) from cert expiration
|
||||
- 'enddate=$(date -d "$(openssl x509 -in /etc/pki/filebeat.crt -enddate -noout | cut -d= -f2)" +%s) ; now=$(date +%s) ; expire_date=$(( now + 432000)); [ $enddate -gt $expire_date ]'
|
||||
{% endif %}
|
||||
- timeout: 30
|
||||
- retry:
|
||||
attempts: 5
|
||||
@@ -315,7 +322,7 @@ miniokeyperms:
|
||||
# Create a cert for elasticsearch
|
||||
/etc/pki/elasticsearch.key:
|
||||
x509.private_key_managed:
|
||||
- CN: {{ manager }}
|
||||
- CN: {{ COMMONNAME }}
|
||||
- bits: 4096
|
||||
- days_remaining: 0
|
||||
- days_valid: 820
|
||||
@@ -335,14 +342,16 @@ miniokeyperms:
|
||||
- ca_server: {{ ca_server }}
|
||||
- signing_policy: registry
|
||||
- public_key: /etc/pki/elasticsearch.key
|
||||
- CN: {{ manager }}
|
||||
- CN: {{ COMMONNAME }}
|
||||
- days_remaining: 0
|
||||
- days_valid: 820
|
||||
- backup: True
|
||||
{% if grains.role not in ['so-heavynode'] %}
|
||||
- unless:
|
||||
# https://github.com/saltstack/salt/issues/52167
|
||||
# Will trigger 5 days (432000 sec) from cert expiration
|
||||
- 'enddate=$(date -d "$(openssl x509 -in /etc/pki/elasticsearch.crt -enddate -noout | cut -d= -f2)" +%s) ; now=$(date +%s) ; expire_date=$(( now + 432000)); [ $enddate -gt $expire_date ]'
|
||||
{% endif %}
|
||||
- timeout: 30
|
||||
- retry:
|
||||
attempts: 5
|
||||
@@ -462,7 +471,7 @@ fbcertdir:
|
||||
|
||||
/opt/so/conf/filebeat/etc/pki/filebeat.key:
|
||||
x509.private_key_managed:
|
||||
- CN: {{ manager }}
|
||||
- CN: {{ COMMONNAME }}
|
||||
- bits: 4096
|
||||
- days_remaining: 0
|
||||
- days_valid: 820
|
||||
@@ -483,18 +492,16 @@ fbcertdir:
|
||||
- ca_server: {{ ca_server }}
|
||||
- signing_policy: filebeat
|
||||
- public_key: /opt/so/conf/filebeat/etc/pki/filebeat.key
|
||||
{% if grains.role == 'so-heavynode' %}
|
||||
- CN: {{grains.id}}
|
||||
{% else %}
|
||||
- CN: {{manager}}
|
||||
{% endif %}
|
||||
- CN: {{ COMMONNAME }}
|
||||
- days_remaining: 0
|
||||
- days_valid: 820
|
||||
- backup: True
|
||||
{% if grains.role not in ['so-heavynode'] %}
|
||||
- unless:
|
||||
# https://github.com/saltstack/salt/issues/52167
|
||||
# Will trigger 5 days (432000 sec) from cert expiration
|
||||
- 'enddate=$(date -d "$(openssl x509 -in /opt/so/conf/filebeat/etc/pki/filebeat.crt -enddate -noout | cut -d= -f2)" +%s) ; now=$(date +%s) ; expire_date=$(( now + 432000)); [ $enddate -gt $expire_date ]'
|
||||
{% endif %}
|
||||
- timeout: 30
|
||||
- retry:
|
||||
attempts: 5
|
||||
|
||||
Reference in New Issue
Block a user