mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-06 09:12:45 +01:00
support for modifying nic channels
This commit is contained in:
@@ -454,6 +454,7 @@ function add_sensor_to_minion() {
|
||||
echo "sensor:"
|
||||
echo " interface: '$INTERFACE'"
|
||||
echo " mtu: 9000"
|
||||
echo " channels: 1"
|
||||
echo "zeek:"
|
||||
echo " enabled: True"
|
||||
echo " config:"
|
||||
|
||||
4
salt/sensor/defaults.yaml
Normal file
4
salt/sensor/defaults.yaml
Normal file
@@ -0,0 +1,4 @@
|
||||
sensor:
|
||||
interface: bond0
|
||||
mtu: 9000
|
||||
channels: 1
|
||||
@@ -9,6 +9,8 @@
|
||||
# in the software, and you may not remove or obscure any functionality in the
|
||||
# software that is protected by the license key."
|
||||
|
||||
{% from 'sensor/map.jinja' import SENSORMERGED %}
|
||||
|
||||
{% if 'vrt' in salt['pillar.get']('features') and salt['grains.get']('salt-cloud', {}) %}
|
||||
|
||||
include:
|
||||
@@ -28,3 +30,18 @@ execute_checksum:
|
||||
- name: /etc/NetworkManager/dispatcher.d/pre-up.d/99-so-checksum-offload-disable
|
||||
- onchanges:
|
||||
- file: offload_script
|
||||
|
||||
combine_bond_script:
|
||||
file.managed:
|
||||
- name: /usr/sbin/so-combine-bond
|
||||
- source: salt://sensor/tools/sbin_jinja/so-combine-bond
|
||||
- mode: 755
|
||||
- template: jinja
|
||||
- defaults:
|
||||
CHANNELS: {{ SENSORMERGED.channels }}
|
||||
|
||||
execute_combine_bond:
|
||||
cmd.run:
|
||||
- name: /usr/sbin/so-combine-bond
|
||||
- onchanges:
|
||||
- file: combine_bond_script
|
||||
|
||||
7
salt/sensor/map.jinja
Normal file
7
salt/sensor/map.jinja
Normal file
@@ -0,0 +1,7 @@
|
||||
{# Copyright Security Onion Solutions LLC and/or licensed to Security Onion Solutions LLC under one
|
||||
or more contributor license agreements. Licensed under the Elastic License 2.0 as shown at
|
||||
https://securityonion.net/license; you may not use this file except in compliance with the
|
||||
Elastic License 2.0. #}
|
||||
|
||||
{% import_yaml 'sensor/defaults.yaml' as SENSORDEFAULTS %}
|
||||
{% set SENSORMERGED = salt['pillar.get']('sensor', SENSORDEFAULTS.sensor, merge=True) %}
|
||||
@@ -7,3 +7,9 @@ sensor:
|
||||
description: Maximum Transmission Unit (MTU) of the sensor monitoring interface.
|
||||
helpLink: network.html
|
||||
readonly: True
|
||||
channels:
|
||||
description: Set the size of the nic channels. This is rarely changed from 1
|
||||
helpLink: network.html
|
||||
forcedType: int
|
||||
node: True
|
||||
advanced: True
|
||||
|
||||
@@ -5,10 +5,8 @@
|
||||
|
||||
. /usr/sbin/so-common
|
||||
|
||||
{% set NICCHANNELS = salt['pillar.get']('sensor:channels', '1') %}
|
||||
|
||||
# Number of channels to set
|
||||
CHANNELS={{ NICCHANNELS }}
|
||||
CHANNELS={{ CHANNELS }}
|
||||
|
||||
# Exit on any error
|
||||
set -e
|
||||
Reference in New Issue
Block a user