mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-07 01:32:47 +01:00
2.4 searchnode es config
This commit is contained in:
@@ -1,18 +1,18 @@
|
||||
{% from 'vars/globals.map.jinja' import GLOBALS %}
|
||||
{% import_yaml 'elasticsearch/defaults.yaml' as ESCONFIG with context %}
|
||||
{% from 'logstash/map.jinja' import REDIS_NODES with context %}
|
||||
{% from 'logstash/map.jinja' import LOGSTASH_NODES with context %}
|
||||
|
||||
{% set HIGHLANDER = salt['pillar.get']('global:highlander', False) %}
|
||||
|
||||
{% if grains.id.split('_') | last in ['manager','managersearch'] %}
|
||||
{% if REDIS_NODES | length > 1 %}
|
||||
{% if LOGSTASH_NODES | length > 1 %}
|
||||
{% do ESCONFIG.elasticsearch.config.node.update({'roles': ['master', 'data', 'remote_cluster_client']}) %}
|
||||
{% if HIGHLANDER %}
|
||||
{% do ESCONFIG.elasticsearch.config.node.roles.extend(['ml', 'transform']) %}
|
||||
{% endif %}
|
||||
{% do ESCONFIG.elasticsearch.config.update({'discovery': {'seed_hosts': [GLOBALS.manager]}}) %}
|
||||
{% for SN in REDIS_NODES.keys() %}
|
||||
{% do ESCONFIG.elasticsearch.config.discovery.seed_hosts.append(SN) %}
|
||||
{% do ESCONFIG.elasticsearch.config.update({'discovery': {'seed_hosts': []}}) %}
|
||||
{% for NODE in LOGSTASH_NODES %}
|
||||
{% do ESCONFIG.elasticsearch.config.discovery.seed_hosts.append(NODE.keys()|first) %}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% if grains.id.split('_') | last == 'manager' %}
|
||||
|
||||
@@ -15,7 +15,7 @@ include:
|
||||
{% set ROLES = salt['pillar.get']('elasticsearch:roles', {}) %}
|
||||
{% from 'elasticsearch/config.map.jinja' import ESCONFIG with context %}
|
||||
{% from 'elasticsearch/template.map.jinja' import ES_INDEX_SETTINGS without context %}
|
||||
{% from 'logstash/map.jinja' import REDIS_NODES with context %}
|
||||
{% from 'logstash/map.jinja' import LOGSTASH_NODES %}
|
||||
|
||||
vm.max_map_count:
|
||||
sysctl.present:
|
||||
@@ -293,9 +293,9 @@ so-elasticsearch:
|
||||
- networks:
|
||||
- sosbridge:
|
||||
- ipv4_address: {{ DOCKER.containers['so-elasticsearch'].ip }}
|
||||
- extra_hosts: {{ REDIS_NODES }}
|
||||
- extra_hosts: {{ LOGSTASH_NODES }}
|
||||
- environment:
|
||||
{% if REDIS_NODES | length == 1 %}
|
||||
{% if LOGSTASH_NODES | length == 1 %}
|
||||
- discovery.type=single-node
|
||||
{% endif %}
|
||||
- ES_JAVA_OPTS=-Xms{{ GLOBALS.elasticsearch.es_heap }} -Xmx{{ GLOBALS.elasticsearch.es_heap }} -Des.transport.cname_in_publish_address=true -Dlog4j2.formatMsgNoLookups=true
|
||||
|
||||
Reference in New Issue
Block a user