mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Allow syslog hooks to be set by lnms config:set (#16302)
Also allow --ignore-checks to work for os settings
This commit is contained in:
@ -50,7 +50,9 @@ class SetConfigCommand extends LnmsCommand
|
||||
if (preg_match('/^os\.(?<os>[a-z_\-]+)\.(?<setting>.*)$/', $setting, $matches)) {
|
||||
$os = $matches['os'];
|
||||
try {
|
||||
$this->validateOsSetting($os, $matches['setting'], $value);
|
||||
if (! $force) {
|
||||
$this->validateOsSetting($os, $matches['setting'], $value);
|
||||
}
|
||||
} catch (ValidationException $e) {
|
||||
$this->error(trans('commands.config:set.errors.invalid'));
|
||||
$this->line($e->getMessage());
|
||||
|
@ -391,6 +391,22 @@
|
||||
"type": "integer",
|
||||
"minimum": 1
|
||||
},
|
||||
"syslog_hook": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"regex": {
|
||||
"type": "string"
|
||||
},
|
||||
"script": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": ["regex", "script"],
|
||||
"additionalProperties": false
|
||||
}
|
||||
},
|
||||
"ifXmcbc": {
|
||||
"type": "boolean"
|
||||
},
|
||||
|
Reference in New Issue
Block a user