2017-09-13 13:43:21 -05:00
|
|
|
# Optional OS Settings
|
|
|
|
|
2019-06-20 13:53:45 -05:00
|
|
|
This page documents settings that can be set in the os yaml files or
|
|
|
|
in config.php. All settings listed here are optional. If they are not
|
|
|
|
set, the global default will be used.
|
2017-09-13 13:43:21 -05:00
|
|
|
|
2018-05-31 03:16:26 -05:00
|
|
|
### User override in config.php
|
2019-06-20 13:53:45 -05:00
|
|
|
|
2017-09-13 13:43:21 -05:00
|
|
|
Users can override these settings in their config.php.
|
|
|
|
|
|
|
|
For example, to set an alternate icon for ios:
|
2019-06-20 13:53:45 -05:00
|
|
|
|
2017-09-13 13:43:21 -05:00
|
|
|
```php
|
|
|
|
$config['os']['ios']['icon'] = 'fuzzybunny';
|
|
|
|
```
|
|
|
|
|
2019-08-08 03:01:58 +02:00
|
|
|
### Ignoring Sensors
|
|
|
|
|
|
|
|
It is possible to filter some sensors from the configuration:
|
|
|
|
|
|
|
|
- Filter all 'current' sensors for Operating System 'vrp'.
|
|
|
|
|
|
|
|
```php
|
|
|
|
$config['os']['vrp']['disabled_sensors']['current'] = true;
|
|
|
|
```
|
|
|
|
|
2020-05-12 16:22:47 +02:00
|
|
|
- Filter all sensors with description matching regexp ```'/PEM Iout/'``` for Operating System iosxe.
|
2019-08-08 03:01:58 +02:00
|
|
|
|
|
|
|
```php
|
|
|
|
$config['os']['iosxe']['disabled_sensors_regex'][] = '/PEM Iout/';
|
|
|
|
```
|
|
|
|
|
2021-07-23 23:46:12 +02:00
|
|
|
- Filter all 'power' sensors with description matching regexp ```'/ Power [TR]x /'``` for Operating System iosxr.
|
|
|
|
|
|
|
|
```php
|
|
|
|
$config['os']['iosxr']['disabled_sensors_regex']['power'][] = '/ Power [TR]x /';
|
|
|
|
```
|
|
|
|
|
2019-08-08 03:01:58 +02:00
|
|
|
- Ignore all temperature sensors
|
|
|
|
|
|
|
|
```php
|
2020-05-12 16:22:47 +02:00
|
|
|
$config['disabled_sensors']['temperature'] = true;
|
2019-08-08 03:01:58 +02:00
|
|
|
```
|
|
|
|
|
2020-05-12 16:22:47 +02:00
|
|
|
- Filter all sensors matching with description regexp ```'/PEM Iout/'```.
|
2019-08-08 03:01:58 +02:00
|
|
|
|
|
|
|
```php
|
|
|
|
$config['disabled_sensors_regex'][] = '/PEM Iout/';
|
|
|
|
```
|
|
|
|
|
2017-09-21 12:02:01 -05:00
|
|
|
### Ignoring Interfaces
|
2019-10-21 02:47:40 +02:00
|
|
|
|
2017-09-21 12:02:01 -05:00
|
|
|
See also: [Global Ignoring Interfaces Config](../../Support/Configuration.md#interfaces-to-be-ignored)
|
|
|
|
|
2019-06-20 13:53:45 -05:00
|
|
|
> These settings are merged with the global settings, so you can only
|
|
|
|
> undo global ones with good_if
|
2017-09-21 12:02:01 -05:00
|
|
|
|
|
|
|
```yaml
|
|
|
|
empty_ifdescr: false # allow empty ifDescr
|
|
|
|
bad_if: # ifDescr (substring, case insensitive)
|
|
|
|
- lp0
|
|
|
|
bad_if_regexp: # ifDescr (regex, case insensitive)
|
|
|
|
- "/^ng[0-9]+$/"
|
|
|
|
bad_ifname_regexp: # ifName (regex, case insensitive)
|
|
|
|
- "/^xdsl_channel /"
|
|
|
|
bad_ifalias_regexp: # ifAlias (regex, case insensitive)
|
|
|
|
- "/^vlan/"
|
|
|
|
bad_iftype: # ifType (substring)
|
|
|
|
- sonet
|
|
|
|
good_if: # ignore all other bad_if settings ifDescr (substring, case insensitive)
|
|
|
|
- virtual
|
2020-01-24 19:58:01 +08:00
|
|
|
bad_ifoperstatus # IfOperStatus (substring, case insensitive)
|
|
|
|
- notPresent
|
2017-09-21 12:02:01 -05:00
|
|
|
```
|
|
|
|
|
2018-05-31 03:16:26 -05:00
|
|
|
### Controlling interface labels
|
2019-10-21 02:47:40 +02:00
|
|
|
|
2018-05-31 03:16:26 -05:00
|
|
|
By default we use ifDescr to label ports/interfaces.
|
2019-06-20 13:53:45 -05:00
|
|
|
Setting either `ifname` or `ifalias` will override that. Only set one
|
|
|
|
of these. ifAlias is user supplied. `ifindex` will append the ifindex
|
|
|
|
to the port label.
|
2018-05-31 03:16:26 -05:00
|
|
|
|
|
|
|
```yaml
|
|
|
|
ifname: true
|
|
|
|
ifalias: true
|
|
|
|
|
|
|
|
ifindex: true
|
|
|
|
```
|
|
|
|
|
2017-10-21 17:51:28 -05:00
|
|
|
### Poller and Discovery Modules
|
2019-06-20 13:53:45 -05:00
|
|
|
|
|
|
|
The various discovery and poller modules can be enabled or disabled
|
|
|
|
per OS. The defaults are usually reasonable, so likely you won't want
|
|
|
|
to change more than a few. These modules can be enabled or disabled
|
|
|
|
per-device in the webui and per os or globally in config.php. Usually,
|
|
|
|
a poller module will not work if it's corresponding discovery module
|
|
|
|
is not enabled.
|
2017-10-21 17:51:28 -05:00
|
|
|
|
2021-08-19 10:32:08 -05:00
|
|
|
You should avoid setting these to false in the OS definitions unless it has a
|
|
|
|
significant negative impact on polling. Setting modules in the definition
|
|
|
|
reduces user control of modules.
|
|
|
|
|
2017-10-21 17:51:28 -05:00
|
|
|
```yaml
|
|
|
|
poller_modules:
|
2018-06-15 03:45:20 -05:00
|
|
|
bgp-peers: true
|
2017-10-21 17:51:28 -05:00
|
|
|
discovery_modules:
|
2018-06-15 03:45:20 -05:00
|
|
|
arp-table: false
|
2017-10-21 17:51:28 -05:00
|
|
|
```
|
|
|
|
|
2018-11-21 17:25:39 -02:00
|
|
|
### SNMP Settings
|
|
|
|
|
|
|
|
#### Disable snmpbulkwalk
|
2019-06-20 13:53:45 -05:00
|
|
|
|
|
|
|
Some devices have buggy snmp implementations and don't respond well to
|
|
|
|
the more efficient snmpbulkwalk. To disable snmpbulkwalk and only use
|
2021-09-02 02:01:41 +02:00
|
|
|
snmpwalk for an OS set the following.
|
2018-11-21 17:25:39 -02:00
|
|
|
|
|
|
|
```yaml
|
2021-09-02 02:01:41 +02:00
|
|
|
snmp_bulk: false
|
2018-11-21 17:25:39 -02:00
|
|
|
```
|
|
|
|
|
2022-01-15 16:59:23 +01:00
|
|
|
If only some specific OIDs fail with snmpbulkwalk. You can disable just those OIDs.
|
|
|
|
This needs to match exactly the OID being walked by LibreNMS. MIB::oid is preferred to prevent name collisions.
|
|
|
|
|
|
|
|
```yaml
|
|
|
|
oids:
|
|
|
|
no_bulk:
|
|
|
|
- UCD-SNMP-MIB::laLoadInt
|
|
|
|
```
|
|
|
|
|
2018-11-21 17:25:39 -02:00
|
|
|
#### Limit the oids per snmpget
|
2019-06-20 13:53:45 -05:00
|
|
|
|
2018-11-21 17:25:39 -02:00
|
|
|
```yaml
|
|
|
|
snmp_max_oid: 8
|
|
|
|
```
|
|
|
|
|
2017-09-13 13:43:21 -05:00
|
|
|
### Storage Settings
|
2019-06-20 13:53:45 -05:00
|
|
|
|
2017-09-13 13:43:21 -05:00
|
|
|
See also: [Global Storage Config](../../Support/Configuration.md#storage-configuration)
|
|
|
|
|
|
|
|
```yaml
|
2018-11-21 17:25:39 -02:00
|
|
|
ignore_mount_array: # exact match
|
2017-09-13 13:43:21 -05:00
|
|
|
- /var/run
|
|
|
|
ignore_mount_string: # substring
|
|
|
|
- run
|
|
|
|
ignore_mount_regexp: # regex
|
|
|
|
- "/^\/var/"
|
|
|
|
```
|