mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-06 17:22:49 +01:00
add GLOBALS.pcap_engine
This commit is contained in:
2
salt/global/map.jinja
Normal file
2
salt/global/map.jinja
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
{% import_yaml 'global/defaults.yaml' as GLOBALDEFAULTS %}
|
||||||
|
{% set GLOBALMERGED = salt['pillar.get']('global', GLOBALDEFAULTS.global, merge=True) %}
|
||||||
@@ -24,21 +24,21 @@
|
|||||||
"statickeyauth": {
|
"statickeyauth": {
|
||||||
"apiKey": "{{ GLOBALS.sensoroni_key }}"
|
"apiKey": "{{ GLOBALS.sensoroni_key }}"
|
||||||
{%- if PCAPMERGED.enabled %}
|
{%- if PCAPMERGED.enabled %}
|
||||||
{%- if PCAPENGINE.steno %}
|
{%- if GLOBALS.pcap_engine == "STENO" %}
|
||||||
},
|
},
|
||||||
"stenoquery": {
|
"stenoquery": {
|
||||||
"executablePath": "/opt/sensoroni/scripts/stenoquery.sh",
|
"executablePath": "/opt/sensoroni/scripts/stenoquery.sh",
|
||||||
"pcapInputPath": "/nsm/pcap",
|
"pcapInputPath": "/nsm/pcap",
|
||||||
"pcapOutputPath": "/nsm/pcapout"
|
"pcapOutputPath": "/nsm/pcapout"
|
||||||
}
|
}
|
||||||
{%- elif PCAPENGINE.suri %}
|
{%- elif GLOBALS.pcap_engine == "SURICATA" %}
|
||||||
},
|
},
|
||||||
"suriquery": {
|
"suriquery": {
|
||||||
"executablePath": "/opt/sensoroni/scripts/suriquery.sh",
|
"executablePath": "/opt/sensoroni/scripts/suriquery.sh",
|
||||||
"pcapInputPath": "/nsm/suripcap",
|
"pcapInputPath": "/nsm/suripcap",
|
||||||
"pcapOutputPath": "/nsm/pcapout"
|
"pcapOutputPath": "/nsm/pcapout"
|
||||||
}
|
}
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
{%- else %}
|
{%- else %}
|
||||||
}
|
}
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
|
|||||||
@@ -12,9 +12,9 @@
|
|||||||
include:
|
include:
|
||||||
- suricata.config
|
- suricata.config
|
||||||
- suricata.sostatus
|
- suricata.sostatus
|
||||||
if blah
|
{% if GLOBALS.pcap_engine == "SURICATA" %}
|
||||||
- suricata.pcap
|
- suricata.pcap
|
||||||
endif
|
{% endif %}
|
||||||
|
|
||||||
so-suricata:
|
so-suricata:
|
||||||
docker_container.running:
|
docker_container.running:
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
{% from 'vars/globals.map.jinja' import GLOBALS %}
|
{% from 'vars/globals.map.jinja' import GLOBALS %}
|
||||||
{% import_yaml 'suricata/defaults.yaml' as SURICATADEFAULTS %}
|
{% from 'suricata/map.jinja' import SURICATAMERGED %}
|
||||||
{% set SURICATAMERGED = salt['pillar.get']('suricata', SURICATADEFAULTS.suricata, merge=True) %}
|
|
||||||
|
|
||||||
suripcapdir:
|
suripcapdir:
|
||||||
file.directory:
|
file.directory:
|
||||||
@@ -10,16 +9,14 @@ suripcapdir:
|
|||||||
- mode: 755
|
- mode: 755
|
||||||
- makedirs: True
|
- makedirs: True
|
||||||
|
|
||||||
{{ SURICATAMERGED.config['af-packet'].threads }}
|
|
||||||
|
|
||||||
for thread in afp.threads
|
{% for i in range(1, SURICATAMERGED.config['af-packet'].threads) + 1) %}
|
||||||
|
|
||||||
suripcapthreaddir:
|
suripcapthread{{i}}dir:
|
||||||
file.directory:
|
file.directory:
|
||||||
- name: /nsm/suripcap/{{thread}}
|
- name: /nsm/suripcap/{{i}}
|
||||||
- user: 940
|
- user: 940
|
||||||
- group: 939
|
- group: 939
|
||||||
- mode: 755
|
- mode: 755
|
||||||
- makedirs: True
|
|
||||||
|
|
||||||
endfor
|
{% endfor %}
|
||||||
|
|||||||
@@ -41,6 +41,8 @@ tgraf_sync_script_{{script}}:
|
|||||||
- mode: 770
|
- mode: 770
|
||||||
- template: jinja
|
- template: jinja
|
||||||
- source: salt://telegraf/scripts/{{script}}
|
- source: salt://telegraf/scripts/{{script}}
|
||||||
|
- defaults:
|
||||||
|
GLOBALS: {{ GLOBALS }}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
||||||
telegraf_sbin:
|
telegraf_sbin:
|
||||||
|
|||||||
@@ -5,13 +5,12 @@
|
|||||||
# https://securityonion.net/license; you may not use this file except in compliance with the
|
# https://securityonion.net/license; you may not use this file except in compliance with the
|
||||||
# Elastic License 2.0.
|
# Elastic License 2.0.
|
||||||
|
|
||||||
{%- if pcap is steno
|
{%- if GLOBALS.pcap_engine == "SURICATA" %}
|
||||||
PCAPLOC=/host/nsm/pcap
|
|
||||||
{%- else %}
|
|
||||||
PCAPLOC=/host/nsm/suripcap
|
PCAPLOC=/host/nsm/suripcap
|
||||||
|
{%- else %}
|
||||||
|
PCAPLOC=/host/nsm/pcap
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
|
|
||||||
|
|
||||||
# if this script isn't already running
|
# if this script isn't already running
|
||||||
if [[ ! "`pidof -x $(basename $0) -o %PPID`" ]]; then
|
if [[ ! "`pidof -x $(basename $0) -o %PPID`" ]]; then
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
{% import 'vars/init.map.jinja' as INIT %}
|
{% import 'vars/init.map.jinja' as INIT %}
|
||||||
{% from 'docker/docker.map.jinja' import DOCKER %}
|
{% from 'docker/docker.map.jinja' import DOCKER %}
|
||||||
|
{% from 'global/map.jinja' import GLOBALMERGED %}
|
||||||
|
|
||||||
{% from 'vars/' ~ INIT.GRAINS.role.split('-')[1] ~ '.map.jinja' import ROLE_GLOBALS %} {# role is so-role so we have to split off the 'so' #}
|
{% from 'vars/' ~ INIT.GRAINS.role.split('-')[1] ~ '.map.jinja' import ROLE_GLOBALS %} {# role is so-role so we have to split off the 'so' #}
|
||||||
|
|
||||||
@@ -20,6 +21,7 @@
|
|||||||
'influxdb_host': INIT.PILLAR.global.influxdb_host,
|
'influxdb_host': INIT.PILLAR.global.influxdb_host,
|
||||||
'manager_ip': INIT.PILLAR.global.managerip,
|
'manager_ip': INIT.PILLAR.global.managerip,
|
||||||
'md_engine': INIT.PILLAR.global.mdengine,
|
'md_engine': INIT.PILLAR.global.mdengine,
|
||||||
|
'pcap_engine': GLOBALMERGED.pcapengine
|
||||||
'pipeline': INIT.PILLAR.global.pipeline,
|
'pipeline': INIT.PILLAR.global.pipeline,
|
||||||
'so_version': INIT.PILLAR.global.soversion,
|
'so_version': INIT.PILLAR.global.soversion,
|
||||||
'so_docker_gateway': DOCKER.gateway,
|
'so_docker_gateway': DOCKER.gateway,
|
||||||
|
|||||||
Reference in New Issue
Block a user