mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-07 09:42:46 +01:00
Merge pull request #1302 from Security-Onion-Solutions/fix/sostatus
Fix/sostatus
This commit is contained in:
@@ -5,6 +5,9 @@
|
|||||||
# to the list predefined by the role / minion id affix
|
# to the list predefined by the role / minion id affix
|
||||||
{% macro append_containers(pillar_name, k, compare )%}
|
{% macro append_containers(pillar_name, k, compare )%}
|
||||||
{% if salt['pillar.get'](pillar_name~':'~k, {}) != compare %}
|
{% if salt['pillar.get'](pillar_name~':'~k, {}) != compare %}
|
||||||
|
{% if k == 'enabled' %}
|
||||||
|
{% set k = pillar_name %}
|
||||||
|
{% endif %}
|
||||||
{% from 'common/maps/'~k~'.map.jinja' import docker as d with context %}
|
{% from 'common/maps/'~k~'.map.jinja' import docker as d with context %}
|
||||||
{% for li in d['containers'] %}
|
{% for li in d['containers'] %}
|
||||||
{{ docker['containers'].append(li) }}
|
{{ docker['containers'].append(li) }}
|
||||||
@@ -21,7 +24,7 @@
|
|||||||
{% if role in ['eval', 'managersearch', 'manager', 'standalone'] %}
|
{% if role in ['eval', 'managersearch', 'manager', 'standalone'] %}
|
||||||
{{ append_containers('manager', 'grafana', 0) }}
|
{{ append_containers('manager', 'grafana', 0) }}
|
||||||
{{ append_containers('global', 'fleet_manager', 0) }}
|
{{ append_containers('global', 'fleet_manager', 0) }}
|
||||||
{{ append_containers('manager', 'wazuh', 0) }}
|
{{ append_containers('global', 'wazuh', 0) }}
|
||||||
{{ append_containers('manager', 'thehive', 0) }}
|
{{ append_containers('manager', 'thehive', 0) }}
|
||||||
{{ append_containers('manager', 'playbook', 0) }}
|
{{ append_containers('manager', 'playbook', 0) }}
|
||||||
{{ append_containers('manager', 'freq', 0) }}
|
{{ append_containers('manager', 'freq', 0) }}
|
||||||
@@ -29,7 +32,7 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if role in ['eval', 'heavynode', 'sensor', 'standalone'] %}
|
{% if role in ['eval', 'heavynode', 'sensor', 'standalone'] %}
|
||||||
{{ append_containers('global', 'strelka', 0) }}
|
{{ append_containers('strelka', 'enabled', 0) }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if role in ['heavynode', 'standalone'] %}
|
{% if role in ['heavynode', 'standalone'] %}
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
{%- from 'common/maps/so-status.map.jinja' import docker with context %}
|
{%- from 'common/maps/so-status.map.jinja' import docker with context %}
|
||||||
{%- set container_list = docker['containers'] | sort %}
|
{%- set container_list = docker['containers'] | sort | unique %}
|
||||||
|
|
||||||
if ! [ "$(id -u)" = 0 ]; then
|
if ! [ "$(id -u)" = 0 ]; then
|
||||||
echo "This command must be run as root"
|
echo "This command must be run as root"
|
||||||
@@ -71,9 +71,9 @@ compare_lists() {
|
|||||||
# {% endraw %}
|
# {% endraw %}
|
||||||
|
|
||||||
create_expected_container_list() {
|
create_expected_container_list() {
|
||||||
{% for item in container_list%}
|
{% for item in container_list -%}
|
||||||
expected_container_list+=("{{ item }}")
|
expected_container_list+=("{{ item }}")
|
||||||
{% endfor %}
|
{% endfor -%}
|
||||||
}
|
}
|
||||||
|
|
||||||
populate_container_lists() {
|
populate_container_lists() {
|
||||||
|
|||||||
@@ -412,6 +412,13 @@ whiptail_enable_components() {
|
|||||||
|
|
||||||
[ -n "$TESTING" ] && return
|
[ -n "$TESTING" ] && return
|
||||||
|
|
||||||
|
GRAFANA=0
|
||||||
|
OSQUERY=0
|
||||||
|
WAZUH=0
|
||||||
|
THEHIVE=0
|
||||||
|
PLAYBOOK=0
|
||||||
|
STRELKA=0
|
||||||
|
|
||||||
COMPONENTS=$(whiptail --title "Security Onion Setup" --checklist \
|
COMPONENTS=$(whiptail --title "Security Onion Setup" --checklist \
|
||||||
"Select Components to install" 20 75 8 \
|
"Select Components to install" 20 75 8 \
|
||||||
GRAFANA "Enable Grafana for system monitoring" ON \
|
GRAFANA "Enable Grafana for system monitoring" ON \
|
||||||
|
|||||||
Reference in New Issue
Block a user