mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Fixed Procera ports ifIndex and ports added by the poller (#9384)
DO NOT DELETE THIS TEXT #### Please note > Please read this information carefully. You can run `./scripts/pre-commit.php` to check your code before submitting. - [x] Have you followed our [code guidelines?](http://docs.librenms.org/Developing/Code-Guidelines/) #### Testers If you would like to test this pull request then please run: `./scripts/github-apply <pr_id>`, i.e `./scripts/github-apply 5926` After you are done testing, you can remove the changes with `./scripts/github-remove`. If there are schema changes, you can ask on discord how to revert.
This commit is contained in:
committed by
Neil Lathwood
parent
dc8647697f
commit
533c9022c9
@@ -417,7 +417,7 @@ foreach ($port_stats as $ifIndex => $port) {
|
||||
d_echo(' valid');
|
||||
|
||||
// Port newly discovered?
|
||||
if (! $ports[$port_id]) {
|
||||
if (!$port_id || empty($ports[$port_id])) {
|
||||
/**
|
||||
* When using the ifName or ifDescr as means to map discovered ports to
|
||||
* known ports in the DB (think of port association mode) it's possible
|
||||
|
||||
@@ -72,7 +72,7 @@ foreach ($packetlogic_stats as $index => $port) {
|
||||
$procera_port['ifSpeed'] = $mediaType[$negotiatedMedia]['ifSpeed'];
|
||||
$procera_port['ifDuplex'] = $mediaType[$negotiatedMedia]['ifDuplex'];
|
||||
$procera_port['ifType'] = 'ethernetCsmacd';
|
||||
array_push($port_stats, $procera_port);
|
||||
$port_stats[$index] = $procera_port;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
2256
tests/data/procera.json
Normal file
2256
tests/data/procera.json
Normal file
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user