mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Merge pull request #1479 from laf/issue-1361
ifAlias is now derived from ifDescr if NULL
This commit is contained in:
@@ -399,6 +399,7 @@ $os = 'nos';
|
|||||||
$config['os'][$os]['text'] = 'Brocade NOS';
|
$config['os'][$os]['text'] = 'Brocade NOS';
|
||||||
$config['os'][$os]['type'] = 'network';
|
$config['os'][$os]['type'] = 'network';
|
||||||
$config['os'][$os]['ifname'] = 1;
|
$config['os'][$os]['ifname'] = 1;
|
||||||
|
$config['os'][$os]['ifalias_null'] = 1;
|
||||||
$config['os'][$os]['over'][0]['graph'] = 'device_bits';
|
$config['os'][$os]['over'][0]['graph'] = 'device_bits';
|
||||||
$config['os'][$os]['over'][0]['text'] = 'Device Traffic';
|
$config['os'][$os]['over'][0]['text'] = 'Device Traffic';
|
||||||
$config['os'][$os]['over'][1]['graph'] = 'device_processor';
|
$config['os'][$os]['over'][1]['graph'] = 'device_processor';
|
||||||
|
|||||||
@@ -352,6 +352,11 @@ foreach ($ports as $port) {
|
|||||||
}
|
}
|
||||||
}//end foreach
|
}//end foreach
|
||||||
|
|
||||||
|
if (($port['update']['ifAlias'] == '' || $port['update']['ifAlias'] == NULL) && $config['os'][$os]['ifalias_null'] == 1) {
|
||||||
|
$port['update']['ifAlias'] = $port['ifDescr'];
|
||||||
|
d_echo('Using ifDescr due to ifAlias being NULL');
|
||||||
|
}
|
||||||
|
|
||||||
// Parse description (usually ifAlias) if config option set
|
// Parse description (usually ifAlias) if config option set
|
||||||
if (isset($config['port_descr_parser']) && is_file($config['install_dir'].'/'.$config['port_descr_parser'])) {
|
if (isset($config['port_descr_parser']) && is_file($config['install_dir'].'/'.$config['port_descr_parser'])) {
|
||||||
$port_attribs = array(
|
$port_attribs = array(
|
||||||
|
|||||||
Reference in New Issue
Block a user