mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Added Mountpoint ignore options to global settings (#11197)
* Global Settings - Mountpoint ignore options * enhance AppServiceProvider with regex
This commit is contained in:
@@ -125,6 +125,10 @@ class AppServiceProvider extends ServiceProvider
|
||||
return IP::isValid($ip) || Validate::hostname($value);
|
||||
}, __('The :attribute must a valid IP address/network or hostname.'));
|
||||
|
||||
Validator::extend('is_regex', function ($attribute, $value) {
|
||||
return @preg_match($value, null) !== false;
|
||||
}, __(':attribute is not a valid regular expression'));
|
||||
|
||||
Validator::extend('zero_or_exists', function ($attribute, $value, $parameters, $validator) {
|
||||
if ($value === 0) {
|
||||
return true;
|
||||
|
@@ -4,7 +4,7 @@
|
||||
"/js/manifest.js": "/js/manifest.js?id=3c768977c2574a34506e",
|
||||
"/js/vendor.js": "/js/vendor.js?id=8903cec9b99453318869",
|
||||
"/js/lang/de.js": "/js/lang/de.js?id=484fe7d77ae5de103cc6",
|
||||
"/js/lang/en.js": "/js/lang/en.js?id=742db8c3cbe9e680d19e",
|
||||
"/js/lang/en.js": "/js/lang/en.js?id=687dca00d1dd0728975b",
|
||||
"/js/lang/fr.js": "/js/lang/fr.js?id=de8a8623522b64c3a198",
|
||||
"/js/lang/ru.js": "/js/lang/ru.js?id=d79e4e7132dc74cb16e0",
|
||||
"/js/lang/uk.js": "/js/lang/uk.js?id=a7846aab3168b1d79b47",
|
||||
|
@@ -3199,6 +3199,9 @@
|
||||
"type": "boolean"
|
||||
},
|
||||
"ignore_mount": {
|
||||
"group": "system",
|
||||
"section": "mountpoints_to_ignore",
|
||||
"order": 3,
|
||||
"default": [
|
||||
"/kern",
|
||||
"/mnt/cdrom",
|
||||
@@ -3210,14 +3213,23 @@
|
||||
"type": "array"
|
||||
},
|
||||
"ignore_mount_network": {
|
||||
"group": "system",
|
||||
"section": "mountpoints_to_ignore",
|
||||
"order": 0,
|
||||
"default": true,
|
||||
"type": "boolean"
|
||||
},
|
||||
"ignore_mount_optical": {
|
||||
"group": "system",
|
||||
"section": "mountpoints_to_ignore",
|
||||
"order": 1,
|
||||
"default": true,
|
||||
"type": "boolean"
|
||||
},
|
||||
"ignore_mount_regexp": {
|
||||
"group": "system",
|
||||
"section": "mountpoints_to_ignore",
|
||||
"order": 5,
|
||||
"default": [
|
||||
"/on: \\/packages/",
|
||||
"/on: \\/dev/",
|
||||
@@ -3234,10 +3246,16 @@
|
||||
"type": "array"
|
||||
},
|
||||
"ignore_mount_removable": {
|
||||
"group": "system",
|
||||
"section": "mountpoints_to_ignore",
|
||||
"order": 2,
|
||||
"default": true,
|
||||
"type": "boolean"
|
||||
},
|
||||
"ignore_mount_string": {
|
||||
"group": "system",
|
||||
"section": "mountpoints_to_ignore",
|
||||
"order": 4,
|
||||
"default": [
|
||||
"packages",
|
||||
"devfs",
|
||||
|
@@ -54,6 +54,7 @@ return [
|
||||
'proxy' => 'Proxy',
|
||||
'updates' => 'Updates',
|
||||
'server' => 'Server',
|
||||
'mountpoints_to_ignore' => 'Mountpoints to be ignored',
|
||||
],
|
||||
'webui' => [
|
||||
'availability-map' => 'Availability Map Settings',
|
||||
@@ -654,6 +655,30 @@ return [
|
||||
'description' => 'HTTP(S) Proxy',
|
||||
'help' => 'Set this as a fallback if http_proxy or https_proxy environment variable is not available.'
|
||||
],
|
||||
'ignore_mount' => [
|
||||
'description' => 'Mountpoints to be ignored',
|
||||
'help' => 'Don\'t monitor Disc Usage of this Mountpoints'
|
||||
],
|
||||
'ignore_mount_network' => [
|
||||
'description' => 'Ignore Network Mountpoints',
|
||||
'help' => 'Don\'t monitor Disc Usage of Network Mountpoints'
|
||||
],
|
||||
'ignore_mount_optical' => [
|
||||
'description' => 'Ignore Optical Drives',
|
||||
'help' => 'Don\'t monitor Disc Usage of optical Drives'
|
||||
],
|
||||
'ignore_mount_removable' => [
|
||||
'description' => 'Ignore Removable Drives',
|
||||
'help' => 'Don\'t monitor Disc Usage of removable Devices'
|
||||
],
|
||||
'ignore_mount_regexp' => [
|
||||
'description' => 'Mountpoints matching Regex to be ignored',
|
||||
'help' => 'Don\'t monitor Disc Usage of Mountpoints which are matching at least one of this Regular Expressions'
|
||||
],
|
||||
'ignore_mount_string' => [
|
||||
'description' => 'Mountpoints containing String to be ignored',
|
||||
'help' => 'Don\'t monitor Disc Usage of Mountpoints which contains at least one of this Strings'
|
||||
],
|
||||
'ipmitool' => [
|
||||
'description' => 'Path to ipmtool'
|
||||
],
|
||||
|
Reference in New Issue
Block a user