diff --git a/back/app.conf b/back/app.conf index fd65a635..3d6ce1dc 100755 --- a/back/app.conf +++ b/back/app.conf @@ -25,6 +25,9 @@ DAYS_TO_KEEP_EVENTS=90 # Used for generating links in emails. Make sure not to add a trailing slash! REPORT_DASHBOARD_URL='http://netalertx' +# Make sure at least these 2 scanners are enabled for new installs, other defaults are taken from the config.json +INTRNT_RUN='schedule' +ARPSCAN_RUN='schedule' # Email #------------------------------------- diff --git a/front/plugins/arp_scan/config.json b/front/plugins/arp_scan/config.json index 993c7f9e..14f47a8c 100755 --- a/front/plugins/arp_scan/config.json +++ b/front/plugins/arp_scan/config.json @@ -70,7 +70,7 @@ { "function": "RUN", "type": "text.select", - "default_value": "schedule", + "default_value": "disabled", "options": [ "disabled", "once", diff --git a/front/plugins/internet_ip/config.json b/front/plugins/internet_ip/config.json index 7a800614..ebfaf8cb 100755 --- a/front/plugins/internet_ip/config.json +++ b/front/plugins/internet_ip/config.json @@ -64,7 +64,7 @@ "function": "RUN", "events": ["run"], "type": "text.select", - "default_value": "schedule", + "default_value": "disabled", "options": ["disabled", "once", "schedule", "always_after_scan"], "localized": ["name", "description"], "name": [ diff --git a/front/plugins/newdev_template/config.json b/front/plugins/newdev_template/config.json index 373136ba..dafe94fb 100755 --- a/front/plugins/newdev_template/config.json +++ b/front/plugins/newdev_template/config.json @@ -627,6 +627,25 @@ "string": "Check to start using the new code for cleaning device names. Removes all labels starting with underscore and removes network domain and search list." } ] + }, + { + "function": "NAME_CLEANUP_REGEX", + "type": "list", + "default_value": ["XC5fYWlycGxheQ==", "XC5fdGNw", "XC5sb2NhbGRvbWFpbg==", "XC5sb2NhbA==", "XC5fZXNwaG9tZWxpYg==", "XC5fZ29vZ2xlY2FzdA==", "XC5sYW4=", "XC5ob21l", "LVthLWZBLUYwLTldezMyfQ==", "Iy4q" ], + "options": [], + "localized": ["name", "description"], + "name": [ + { + "language_code": "en_us", + "string": "Cleanup REGEX" + } + ], + "description": [ + { + "language_code": "en_us", + "string": "All the newly discovered device names are clened up by applying the following REGEX expression in this order." + } + ] } ], "required": [ diff --git a/front/plugins/snmp_discovery/README.md b/front/plugins/snmp_discovery/README.md index 52ce83e0..805da55e 100755 --- a/front/plugins/snmp_discovery/README.md +++ b/front/plugins/snmp_discovery/README.md @@ -54,7 +54,7 @@ jokob@SecurityGateway-USG:~$ snmptranslate -On -IR ipNetToMediaPhysAddress .1.3.6.1.2.1.4.22.1.2 ``` -- Use the `snmpwalk -v 2c -OXsq -c public 192.168.1.1 .1.3.6.1.2.1.4.22.1.2` command in NetAlertX +- Use the `snmpwalk -v 2c -OXsq -c public 192.168.1.1 .1.3.6.1.2.1.4.22.1.2` command in NetAlertX diff --git a/front/plugins/sync/config.json b/front/plugins/sync/config.json index 862efcfb..a873141a 100755 --- a/front/plugins/sync/config.json +++ b/front/plugins/sync/config.json @@ -202,7 +202,7 @@ }, { "function": "plugins", - "type": "text.multiselect", + "type": "list.select", "maxLength": 50, "default_value": [], "options": ["{value}"], diff --git a/server/helper.py b/server/helper.py index 06efa775..13b82320 100755 --- a/server/helper.py +++ b/server/helper.py @@ -332,7 +332,8 @@ def setting_value_to_python_type(set_type, set_value): elif set_type in ['integer.select', 'integer']: value = int(set_value) - elif set_type in ['text.multiselect', 'list', 'subnets', 'list.select']: + # belwo covers 'text.multiselect', 'list', 'subnets', 'list.select', 'textarea.list', 'list' + elif set_type in ['text.multiselect', 'list', 'subnets', 'list.select', 'textarea.list'] or 'list' in set_type: # Handle string mylog('debug', [f'[SETTINGS] Handling set_type: "{set_type}", set_value: "{set_value}"']) diff --git a/server/initialise.py b/server/initialise.py index 57a7279f..ecb4238c 100755 --- a/server/initialise.py +++ b/server/initialise.py @@ -131,7 +131,7 @@ def importConfigs (db, all_plugins): # ---------------------------------------- # ccd(key, default, config_dir, name, inputtype, options, group, events=[], desc = "", regex = "", setJsonMetadata = {}, overrideTemplate = {}) - conf.LOADED_PLUGINS = ccd('LOADED_PLUGINS', [] , c_d, 'Loaded plugins', 'text.multiselect', '', 'General') + conf.LOADED_PLUGINS = ccd('LOADED_PLUGINS', [] , c_d, 'Loaded plugins', 'list.select', '', 'General') conf.SCAN_SUBNETS = ccd('SCAN_SUBNETS', ['192.168.1.0/24 --interface=eth1', '192.168.1.0/24 --interface=eth0'] , c_d, 'Subnets to scan', 'subnets', '', 'General') conf.LOG_LEVEL = ccd('LOG_LEVEL', 'verbose' , c_d, 'Log verboseness', 'text.select', "['none', 'minimal', 'verbose', 'debug']", 'General') conf.TIMEZONE = ccd('TIMEZONE', 'Europe/Berlin' , c_d, 'Time zone', 'text', '', 'General')