From 917aa743f9f0febe4d03626a7410376805adc56d Mon Sep 17 00:00:00 2001 From: Tony Murray Date: Fri, 15 Dec 2023 09:39:16 -0600 Subject: [PATCH] Add bad port settings to webui (#15649) * Update manifest * update regex text * remove unused translations --- lang/en/settings.php | 18 +++++++++++++++--- lang/it/settings.php | 1 - lang/uk/settings.php | 1 - lang/zh-TW/settings.php | 1 - misc/config_definitions.json | 20 ++++++++++++++++---- 5 files changed, 31 insertions(+), 10 deletions(-) diff --git a/lang/en/settings.php b/lang/en/settings.php index 843945fd72..59aef877e3 100644 --- a/lang/en/settings.php +++ b/lang/en/settings.php @@ -40,6 +40,7 @@ return [ 'general' => ['name' => 'General Discovery Settings'], 'route' => ['name' => 'Routes Discovery Module'], 'discovery_modules' => ['name' => 'Discovery Modules'], + 'ports' => ['name' => 'Ports Module'], 'storage' => ['name' => 'Storage Module'], 'networks' => ['name' => 'Networks'], ], @@ -66,7 +67,6 @@ return [ 'rrdtool' => ['name' => 'Datastore: RRDTool'], 'snmp' => ['name' => 'SNMP'], 'poller_modules' => ['name' => 'Poller Modules'], - 'interface_types' => ['name' => 'Interface Type by RFC 7224'], ], 'system' => [ 'cleanup' => ['name' => 'Cleanup'], @@ -1086,9 +1086,21 @@ return [ ], ], ], + 'bad_if' => [ + 'description' => 'Bad Interface Names', + 'help' => 'Network interface IF-MIB:!:ifName which should be ignored', + ], + 'bad_if_regexp' => [ + 'description' => 'Bad Interface Name Regex', + 'help' => 'Network interface IF-MIB:!:ifName which should be ignored using regular expressions', + ], + 'bad_ifoperstatus' => [ + 'description' => 'Bad Interface Operating Status', + 'help' => 'Network interface IF-MIB:!:ifOperStatus which should be ignored', + ], 'bad_iftype' => [ - 'description' => 'Bad Interfaces', - 'help' => 'Network Interface Types which should be ignored', + 'description' => 'Bad Interface Types', + 'help' => 'Network interface IF-MIB:!:ifType which should be ignored', ], 'ping' => [ 'description' => 'Path to ping', diff --git a/lang/it/settings.php b/lang/it/settings.php index e1b8c7d920..f8b91b4dc0 100644 --- a/lang/it/settings.php +++ b/lang/it/settings.php @@ -65,7 +65,6 @@ return [ 'rrdtool' => ['name' => 'Datastore: RRDTool'], 'snmp' => ['name' => 'SNMP'], 'poller_modules' => ['name' => 'Poller Modules'], - 'interface_types' => ['name' => 'Interface Type by RFC 7224'], ], 'system' => [ 'cleanup' => ['name' => 'Cleanup'], diff --git a/lang/uk/settings.php b/lang/uk/settings.php index a2c940aa51..c4f55e2619 100644 --- a/lang/uk/settings.php +++ b/lang/uk/settings.php @@ -65,7 +65,6 @@ return [ 'rrdtool' => ['name' => 'Сховище даних: RRDTool'], 'snmp' => ['name' => 'SNMP'], 'poller_modules' => ['name' => 'Модулі опитувача'], - 'interface_types' => ['name' => 'Типи інтерфейсів за RFC 7224'], ], 'system' => [ 'cleanup' => ['name' => 'Очистка'], diff --git a/lang/zh-TW/settings.php b/lang/zh-TW/settings.php index a76ca49166..014f541521 100644 --- a/lang/zh-TW/settings.php +++ b/lang/zh-TW/settings.php @@ -58,7 +58,6 @@ return [ 'rrdtool' => ['name' => 'RRDTool 設定'], 'snmp' => ['name' => 'SNMP'], 'poller_modules' => ['name' => '輪詢器模組'], - 'interface_types' => ['name' => 'RFC 7224 介面類型'], ], 'system' => [ 'cleanup' => ['name' => '清理'], diff --git a/misc/config_definitions.json b/misc/config_definitions.json index fa183b0f75..d5099d8b66 100644 --- a/misc/config_definitions.json +++ b/misc/config_definitions.json @@ -851,6 +851,9 @@ }, "bad_if": { "type": "array", + "group": "discovery", + "section": "ports", + "order": 0, "default": [ "voip-null", "virtual-", @@ -878,16 +881,22 @@ }, "bad_if_regexp": { "type": "array", + "group": "discovery", + "section": "ports", + "order": 1, "default": [ "/^ng[0-9]+$/", "/^sl[0-9]/" - ] + ], + "validate": { + "value.*": "is_regex" + } }, "bad_iftype": { "type": "array", - "group": "poller", - "section": "interface_types", - "order": 0, + "group": "discovery", + "section": "ports", + "order": 3, "default": [ "voiceEncap", "voiceFXO", @@ -907,6 +916,9 @@ }, "bad_ifoperstatus": { "type": "array", + "group": "discovery", + "section": "ports", + "order": 4, "default": [ "notPresent" ]