mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Docs: edit existing install url (#13342)
* Docs: edit existing install url not blank * did not define superfences correctly
This commit is contained in:
@@ -34,18 +34,18 @@ your devices. When you have that, you only need the following config
|
||||
to enable the display of device configs within the device page itself:
|
||||
|
||||
!!! setting "external/oxidized"
|
||||
```bash
|
||||
lnms config:set oxidized.enabled true
|
||||
lnms config:set oxidized.url http://127.0.0.1:8888
|
||||
```
|
||||
```bash
|
||||
lnms config:set oxidized.enabled true
|
||||
lnms config:set oxidized.url http://127.0.0.1:8888
|
||||
```
|
||||
|
||||
LibreNMS supports config versioning if Oxidized does. This is known
|
||||
to work with the git output module.
|
||||
|
||||
!!! setting "external/oxidized"
|
||||
```bash
|
||||
lnms config:set oxidized.features.versioning true
|
||||
```
|
||||
```bash
|
||||
lnms config:set oxidized.features.versioning true
|
||||
```
|
||||
|
||||
Oxidized supports various ways to utilise credentials to login to
|
||||
devices, you can specify global username/password within Oxidized,
|
||||
@@ -55,31 +55,31 @@ group credentials within Oxidized. To enable this support please
|
||||
switch on 'Enable the return of groups to Oxidized':
|
||||
|
||||
!!! setting "external/oxidized"
|
||||
```bash
|
||||
lnms config:set oxidized.group_support true
|
||||
```
|
||||
```bash
|
||||
lnms config:set oxidized.group_support true
|
||||
```
|
||||
|
||||
You can set a default group that devices will fall back to with:
|
||||
|
||||
!!! setting "external/oxidized"
|
||||
```bash
|
||||
lnms config:set oxidized.default_group default
|
||||
```
|
||||
```bash
|
||||
lnms config:set oxidized.default_group default
|
||||
```
|
||||
|
||||
You can ignore specific groups
|
||||
|
||||
!!! setting "external/oxidized"
|
||||
```bash
|
||||
lnms config:set oxidized.ignore_groups '["badgroup", "nobackup"]'
|
||||
```
|
||||
```bash
|
||||
lnms config:set oxidized.ignore_groups '["badgroup", "nobackup"]'
|
||||
```
|
||||
|
||||
One trick you can do to ignore all ungrouped devices is set both of these settings
|
||||
|
||||
!!! setting "external/oxidized"
|
||||
```bash
|
||||
lnms config:set oxidized.default_group nobackup
|
||||
lnms config:set oxidized.ignore_groups.+ nobackup
|
||||
```
|
||||
```bash
|
||||
lnms config:set oxidized.default_group nobackup
|
||||
lnms config:set oxidized.ignore_groups.+ nobackup
|
||||
```
|
||||
|
||||
## SELinux
|
||||
|
||||
@@ -123,9 +123,9 @@ Settings>External Settings>Oxidized Integration or add the following
|
||||
to your config.
|
||||
|
||||
!!! setting "external/oxidized"
|
||||
```bash
|
||||
lnms config:set oxidized.reload_nodes true
|
||||
```
|
||||
```bash
|
||||
lnms config:set oxidized.reload_nodes true
|
||||
```
|
||||
|
||||
## Creating overrides
|
||||
|
||||
@@ -151,18 +151,18 @@ To match on the device hostnames or sysNames that contain 'lon-sw' or
|
||||
if the location contains 'London' then you would set the following:
|
||||
|
||||
!!! setting "external/oxidized"
|
||||
```bash
|
||||
lnms config:set oxidized.maps.group.hostname.+ '{"regex": "/^lon-sw/", "value": "london-switches"}'
|
||||
lnms config:set oxidized.maps.group.sysName.+ '{"regex": "/^lon-sw/", "value": "london-switches"}'
|
||||
lnms config:set oxidized.maps.group.location.+ '{"regex": "/london/", "value": "london-switches"}'
|
||||
```
|
||||
```bash
|
||||
lnms config:set oxidized.maps.group.hostname.+ '{"regex": "/^lon-sw/", "value": "london-switches"}'
|
||||
lnms config:set oxidized.maps.group.sysName.+ '{"regex": "/^lon-sw/", "value": "london-switches"}'
|
||||
lnms config:set oxidized.maps.group.location.+ '{"regex": "/london/", "value": "london-switches"}'
|
||||
```
|
||||
|
||||
To match on a device os of edgeos then please use the following:
|
||||
|
||||
!!! setting "external/oxidized"
|
||||
```bash
|
||||
lnms config:set oxidized.maps.group.os.+ '{"match": "edgeos", "value": "wireless"}'
|
||||
```
|
||||
```bash
|
||||
lnms config:set oxidized.maps.group.os.+ '{"match": "edgeos", "value": "wireless"}'
|
||||
```
|
||||
|
||||
Matching on OS requires system name of the OS. For example, "match": "RouterOS"
|
||||
will not work, while "match": "routeros" will.
|
||||
@@ -170,31 +170,29 @@ will not work, while "match": "routeros" will.
|
||||
To edit an existing map, you must use the index to override it.
|
||||
|
||||
!!! setting "external/oxidized"
|
||||
```bash
|
||||
lnms config:get oxidized.maps.os.os
|
||||
array (
|
||||
0 =>
|
||||
array (
|
||||
'match' => 'airos-af-ltu',
|
||||
'value' => 'airfiber',
|
||||
),
|
||||
1 =>
|
||||
array (
|
||||
'match' => 'airos-af',
|
||||
'value' => 'airfiber',
|
||||
),
|
||||
)
|
||||
|
||||
lnms config:set oxidized.maps.os.os.1 '{"match": "airos-af", "value": "something-else"}'
|
||||
```
|
||||
```bash
|
||||
lnms config:get oxidized.maps.os.os
|
||||
[
|
||||
{
|
||||
"match": "airos-af-ltu",
|
||||
"value": "airfiber"
|
||||
},
|
||||
{
|
||||
"match": "airos-af",
|
||||
"value": "airfiber"
|
||||
},
|
||||
]
|
||||
|
||||
lnms config:set oxidized.maps.os.os.1 '{"match": "airos-af", "value": "something-else"}'
|
||||
```
|
||||
|
||||
To override the IP Oxidized uses to poll the device, set the following:
|
||||
|
||||
!!! setting "external/oxidized"
|
||||
```bash
|
||||
lnms config:set oxidized.maps.ip.sysName.+ '{"regex": "/^my.node/", "value": "192.168.1.10"}'
|
||||
lnms config:set oxidized.maps.ip.sysName.+ '{"match": "my-other.node", "value": "192.168.1.20"}'
|
||||
```
|
||||
```bash
|
||||
lnms config:set oxidized.maps.ip.sysName.+ '{"regex": "/^my.node/", "value": "192.168.1.10"}'
|
||||
lnms config:set oxidized.maps.ip.sysName.+ '{"match": "my-other.node", "value": "192.168.1.20"}'
|
||||
```
|
||||
|
||||
This allows extending the configuration further by providing a
|
||||
completely flexible model for custom flags and settings, for example,
|
||||
@@ -202,18 +200,18 @@ below shows the ability to add an ssh_proxy host within Oxidized
|
||||
simply by adding the below to your configuration:
|
||||
|
||||
!!! setting "external/oxidized"
|
||||
```bash
|
||||
lnms config:set oxidized.maps.ssh_proxy.sysName.+ '{"regex": "/^my.node/", "value": "my-ssh-gateway.node"}'
|
||||
```
|
||||
```bash
|
||||
lnms config:set oxidized.maps.ssh_proxy.sysName.+ '{"regex": "/^my.node/", "value": "my-ssh-gateway.node"}'
|
||||
```
|
||||
|
||||
Or of course, any custom value that could be needed or wanted can be
|
||||
applied, for example, setting a "myAttribute" to "Super cool value"
|
||||
for any configured and enabled "routeros" device.
|
||||
|
||||
!!! setting "external/oxidized"
|
||||
```bash
|
||||
lnms config:set oxidized.maps.myAttribute.os.+ '{"match": "routeros", "value": "Super cool value"}'
|
||||
```
|
||||
```bash
|
||||
lnms config:set oxidized.maps.myAttribute.os.+ '{"match": "routeros", "value": "Super cool value"}'
|
||||
```
|
||||
|
||||
Verify the return of groups by querying the API:
|
||||
|
||||
@@ -241,17 +239,17 @@ It's also possible to exclude certain device types and OS' from being
|
||||
output via the API.
|
||||
|
||||
!!! setting "external/oxidized"
|
||||
```bash
|
||||
lnms config:set oxidized.ignore_types '["server", "power"]'
|
||||
lnms config:set oxidized.ignore_os '["linux", "windows"]'
|
||||
```
|
||||
```bash
|
||||
lnms config:set oxidized.ignore_types '["server", "power"]'
|
||||
lnms config:set oxidized.ignore_os '["linux", "windows"]'
|
||||
```
|
||||
|
||||
You can also ignore whole groups of devices
|
||||
|
||||
!!! setting "external/oxidized"
|
||||
```bash
|
||||
lnms config:set oxidized.ignore_groups '["london-switches", "default"]'
|
||||
```
|
||||
```bash
|
||||
lnms config:set oxidized.ignore_groups '["london-switches", "default"]'
|
||||
```
|
||||
|
||||
## Trigger configuration backups
|
||||
|
||||
|
@@ -1,3 +1,27 @@
|
||||
/*
|
||||
* docs-settings-links.js
|
||||
*
|
||||
* -Description-
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @link https://www.librenms.org
|
||||
*
|
||||
* @copyright 2021 Tony Murray
|
||||
* @author Tony Murray <murraytony@gmail.com>
|
||||
*/
|
||||
|
||||
function findGetParameter(parameterName) {
|
||||
let result = null, tmp = [];
|
||||
location.search
|
||||
@@ -24,7 +48,7 @@ function isValidHttpUrl(string) {
|
||||
|
||||
function promptSettingUrl(e) {
|
||||
e.preventDefault();
|
||||
let librenmsUrl = prompt("Enter your LibreNMS URL to get direct settings link.\nNote: This URL is only stored in your browser.");
|
||||
let librenmsUrl = prompt("Enter your LibreNMS URL to get direct settings link.\nNote: This URL is only stored in your browser.", localStorage.getItem('librenms_url'));
|
||||
|
||||
if (! isValidHttpUrl(librenmsUrl)) {
|
||||
alert("Invalid url, must start with http:// or https://")
|
||||
|
Reference in New Issue
Block a user