Option to filter Oxidized groups (#12966)

* Add support for Liebert humidity setpoint and UPS powerfactor

* Option to ignore groups so they are not sent to Oxidized

* Revert "Add support for Liebert humidity setpoint and UPS powerfactor"

This reverts commit c338528aba.

* Updated docs

* Added ignore_groups option

* Added descriptions and updated translations

* Update settings.php

* Fixed typo

Co-authored-by: Tony Murray <murraytony@gmail.com>
This commit is contained in:
martinberg
2021-06-28 12:53:16 +02:00
committed by GitHub
parent c505040289
commit 131f5c7e87
5 changed files with 22 additions and 1 deletions

View File

@@ -219,6 +219,12 @@ lnms config:set oxidized.ignore_types '["server", "power"]'
lnms config:set oxidized.ignore_os '["linux", "windows"]'
```
You can also ignore whole groups of devices
```bash
lnms config:set oxidized.ignore_groups '["london-switches", "default"]'
```
# Trigger configuration backups
Using the Oxidized REST API and [Syslog

View File

@@ -4,7 +4,7 @@
"/css/app.css": "/css/app.css?id=996b9e3da0c3ab98067e",
"/js/vendor.js": "/js/vendor.js?id=ccca9695062f1f68aaa8",
"/js/lang/de.js": "/js/lang/de.js?id=db973f6aaff0cda764c6",
"/js/lang/en.js": "/js/lang/en.js?id=5fe21bec9665f75840a0",
"/js/lang/en.js": "/js/lang/en.js?id=c7c74acfea120c671190",
"/js/lang/fr.js": "/js/lang/fr.js?id=096c9e010fc548e53b0a",
"/js/lang/it.js": "/js/lang/it.js?id=b28a63928155eeb4e2a1",
"/js/lang/ru.js": "/js/lang/ru.js?id=f6b7c078755312a0907c",

View File

@@ -1406,6 +1406,10 @@ function list_oxidized(Illuminate\Http\Request $request)
}
}
}
//Exclude groups from being sent to Oxidized
if (in_array($output['group'], Config::get('oxidized.ignore_groups'))) {
break;
}
$return[] = $output;
}

View File

@@ -4082,6 +4082,13 @@
"order": 4,
"type": "text"
},
"oxidized.ignore_groups": {
"default": [],
"type" : "array",
"group": "external",
"section": "oxidized",
"order": 5
},
"oxidized.enabled": {
"default": false,
"group": "external",

View File

@@ -940,6 +940,10 @@ return [
'default_group' => [
'description' => 'Set the default group returned',
],
'ignore_groups' => [
'description' => 'Do not backup these Oxidized groups',
'help' => 'Groups (set via Variable Mapping) excluded from being sent to Oxidized',
],
'enabled' => [
'description' => 'Enable Oxidized support',
],