mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-06 09:12:45 +01:00
Change Elastic Logic
This commit is contained in:
@@ -129,10 +129,6 @@ function add_elastic_to_minion() {
|
||||
printf '%s\n'\
|
||||
"elasticsearch:"\
|
||||
" esheap: '$ES_HEAP_SIZE'"\
|
||||
" config:"\
|
||||
" node:"\
|
||||
" attr:"\
|
||||
" box_type: hot"\
|
||||
" " >> $PILLARFILE
|
||||
}
|
||||
|
||||
|
||||
@@ -4,26 +4,23 @@
|
||||
|
||||
{% set HIGHLANDER = salt['pillar.get']('global:highlander', False) %}
|
||||
|
||||
{% if grains.id.split('_') | last in ['manager','managersearch'] %}
|
||||
{% if grains.id.split('_') | last in ['manager','managersearch','standalone'] %}
|
||||
{% 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': []}}) %}
|
||||
{% for NODE in LOGSTASH_NODES %}
|
||||
{% do ESCONFIG.elasticsearch.config.discovery.seed_hosts.append(NODE.keys()|first) %}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% if grains.id.split('_') | last == 'manager' %}
|
||||
{% do ESCONFIG.elasticsearch.config.node.attr.update({'box_type': ''}) %}
|
||||
{% do ESCONFIG.elasticsearch.config.node.update({'roles': ['master','remote_cluster_client']}) %}
|
||||
{% else %}
|
||||
{% do ESCONFIG.elasticsearch.config.node.update({'roles': ['master', 'data', 'remote_cluster_client']}) %}
|
||||
{% endif %}
|
||||
{% elif grains.id.split('_') | last not in ['eval', 'standalone', 'import'] %}
|
||||
{% endif %}
|
||||
{% elif grains.id.split('_') | last == 'searchnode' %}
|
||||
{% do ESCONFIG.elasticsearch.config.node.update({'roles': ['data', 'ingest']}) %}
|
||||
{% if HIGHLANDER %}
|
||||
{% do ESCONFIG.elasticsearch.config.node.roles.extend(['ml', 'master', 'transform']) %}
|
||||
{% endif %}
|
||||
{% do ESCONFIG.elasticsearch.config.node.attr.update({'box_type': 'hot'}) %}
|
||||
{% do ESCONFIG.elasticsearch.config.update({'discovery': {'seed_hosts': [GLOBALS.manager]}}) %}
|
||||
{% endif %}
|
||||
{% if HIGHLANDER %}
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
elasticsearch:
|
||||
config:
|
||||
node:
|
||||
attr:
|
||||
box_type: hot
|
||||
node: {}
|
||||
cluster:
|
||||
routing:
|
||||
allocation:
|
||||
|
||||
@@ -2,13 +2,6 @@
|
||||
"template": {
|
||||
"settings": {
|
||||
"index": {
|
||||
"routing": {
|
||||
"allocation": {
|
||||
"require": {
|
||||
"box_type": "hot"
|
||||
}
|
||||
}
|
||||
},
|
||||
"mapping": {
|
||||
"total_fields": {
|
||||
"limit": "3000"
|
||||
|
||||
@@ -2,13 +2,6 @@
|
||||
"template": {
|
||||
"settings": {
|
||||
"index": {
|
||||
"routing": {
|
||||
"allocation": {
|
||||
"require": {
|
||||
"box_type": "hot"
|
||||
}
|
||||
}
|
||||
},
|
||||
"mapping": {
|
||||
"total_fields": {
|
||||
"limit": "3000"
|
||||
|
||||
Reference in New Issue
Block a user