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'\
|
printf '%s\n'\
|
||||||
"elasticsearch:"\
|
"elasticsearch:"\
|
||||||
" esheap: '$ES_HEAP_SIZE'"\
|
" esheap: '$ES_HEAP_SIZE'"\
|
||||||
" config:"\
|
|
||||||
" node:"\
|
|
||||||
" attr:"\
|
|
||||||
" box_type: hot"\
|
|
||||||
" " >> $PILLARFILE
|
" " >> $PILLARFILE
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -4,26 +4,23 @@
|
|||||||
|
|
||||||
{% set HIGHLANDER = salt['pillar.get']('global:highlander', False) %}
|
{% 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 %}
|
{% if LOGSTASH_NODES | length > 1 %}
|
||||||
{% do ESCONFIG.elasticsearch.config.node.update({'roles': ['master', 'data', 'remote_cluster_client']}) %}
|
{% do ESCONFIG.elasticsearch.config.update({'discovery': {'seed_hosts': []}}) %}
|
||||||
{% if HIGHLANDER %}
|
{% for NODE in LOGSTASH_NODES %}
|
||||||
{% do ESCONFIG.elasticsearch.config.node.roles.extend(['ml', 'transform']) %}
|
{% do ESCONFIG.elasticsearch.config.discovery.seed_hosts.append(NODE.keys()|first) %}
|
||||||
|
{% endfor %}
|
||||||
|
{% if grains.id.split('_') | last == 'manager' %}
|
||||||
|
{% 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 %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% do ESCONFIG.elasticsearch.config.update({'discovery': {'seed_hosts': []}}) %}
|
{% elif grains.id.split('_') | last == 'searchnode' %}
|
||||||
{% 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': ''}) %}
|
|
||||||
{% endif %}
|
|
||||||
{% elif grains.id.split('_') | last not in ['eval', 'standalone', 'import'] %}
|
|
||||||
{% do ESCONFIG.elasticsearch.config.node.update({'roles': ['data', 'ingest']}) %}
|
{% do ESCONFIG.elasticsearch.config.node.update({'roles': ['data', 'ingest']}) %}
|
||||||
{% if HIGHLANDER %}
|
{% if HIGHLANDER %}
|
||||||
{% do ESCONFIG.elasticsearch.config.node.roles.extend(['ml', 'master', 'transform']) %}
|
{% do ESCONFIG.elasticsearch.config.node.roles.extend(['ml', 'master', 'transform']) %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% do ESCONFIG.elasticsearch.config.node.attr.update({'box_type': 'hot'}) %}
|
|
||||||
{% do ESCONFIG.elasticsearch.config.update({'discovery': {'seed_hosts': [GLOBALS.manager]}}) %}
|
{% do ESCONFIG.elasticsearch.config.update({'discovery': {'seed_hosts': [GLOBALS.manager]}}) %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if HIGHLANDER %}
|
{% if HIGHLANDER %}
|
||||||
|
|||||||
@@ -1,8 +1,6 @@
|
|||||||
elasticsearch:
|
elasticsearch:
|
||||||
config:
|
config:
|
||||||
node:
|
node: {}
|
||||||
attr:
|
|
||||||
box_type: hot
|
|
||||||
cluster:
|
cluster:
|
||||||
routing:
|
routing:
|
||||||
allocation:
|
allocation:
|
||||||
|
|||||||
@@ -2,13 +2,6 @@
|
|||||||
"template": {
|
"template": {
|
||||||
"settings": {
|
"settings": {
|
||||||
"index": {
|
"index": {
|
||||||
"routing": {
|
|
||||||
"allocation": {
|
|
||||||
"require": {
|
|
||||||
"box_type": "hot"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"mapping": {
|
"mapping": {
|
||||||
"total_fields": {
|
"total_fields": {
|
||||||
"limit": "3000"
|
"limit": "3000"
|
||||||
|
|||||||
@@ -2,13 +2,6 @@
|
|||||||
"template": {
|
"template": {
|
||||||
"settings": {
|
"settings": {
|
||||||
"index": {
|
"index": {
|
||||||
"routing": {
|
|
||||||
"allocation": {
|
|
||||||
"require": {
|
|
||||||
"box_type": "hot"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"mapping": {
|
"mapping": {
|
||||||
"total_fields": {
|
"total_fields": {
|
||||||
"limit": "3000"
|
"limit": "3000"
|
||||||
|
|||||||
Reference in New Issue
Block a user