Clarify Oxidized Groups Documentation

Break groups out into their own section.
Show how to specify credentials for groups in Oxidized.

Issue #2464
This commit is contained in:
Tony Murray
2016-01-15 10:32:48 -06:00
parent 61af4f9d7f
commit 94ab3141f8

View File

@ -31,14 +31,6 @@ You can set a default group that devices will fall back to with:
$config['oxidized']['default_group'] = 'default';
```
To return a group to Oxidized you can do this by matching a regex for either hostname or location. The order is hostname is matched first, if nothing is found then location is attempted.
The first match found will be used. To match on the device hostnames that contain 'lon-sw' or if the location contains 'London' then you would place the following within config.php:
```php
$config['oxidized']['group']['hostname'][] = array('regex' => '/^lon-sw/', 'group' => 'london-switches');
$config['oxidized']['group']['location'][] = array('regex' => '/london/', 'group' => 'london-switches');
```
### Feeding Oxidized
Oxidized has support for feeding devices into it via an API call, support for Oxidized has been added to the LibreNMS API. A sample config for Oxidized is provided below.
@ -60,6 +52,27 @@ You will need to configure default credentials for your devices, LibreNMS doesn'
X-Auth-Token: '01582bf94c03104ecb7953dsadsadwed'
```
### Using Groups
To return a group to Oxidized you can do this by matching a regex for either hostname or location. The order is hostname is matched first, if nothing is found then location is attempted.
The first match found will be used. To match on the device hostnames that contain 'lon-sw' or if the location contains 'London' then you would place the following within config.php:
```php
$config['oxidized']['group']['hostname'][] = array('regex' => '/^lon-sw/', 'group' => 'london-switches');
$config['oxidized']['group']['location'][] = array('regex' => '/london/', 'group' => 'london-switches');
```
If you need to, you can specify credentials for groups by using the following in your oxidized config:
```bash
groups:
<groupname>:
username: <user>
password: <password>
```
### Miscellaneous
If you have devices which you do not wish to appear in Oxidized then you can edit those devices in Device -> Edit -> Misc and enable "Exclude from Oxidized?"
It's also possible to exclude certain device types and OS' from being output via the API. This is currently only possible via config.php: