mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Updated LTM discovery to fix route domain ID breaking the hex to stri… (#8146)
* Updated LTM discovery to fix route domain ID breaking the hex to string IPv4 conversion * fixed whitespaces * fixed whitespaces
This commit is contained in:
@@ -73,6 +73,11 @@ if (!is_null($ltmVirtualServEntry) || !is_null($ltmVsStatusEntry) || !is_null($l
|
||||
// The UID is far too long to have in a RRD filename, use a hash of it instead.
|
||||
$result['hash'] = hash('crc32', $result['UID']);
|
||||
|
||||
// Trim IPv4 response to remove route domain ID
|
||||
if (strlen($ltmVirtualServEntry['1.3.6.1.4.1.3375.2.2.10.1.2.1.3.'.$index]) == 23) {
|
||||
$ltmVirtualServEntry['1.3.6.1.4.1.3375.2.2.10.1.2.1.3.'.$index] = substr($ltmVirtualServEntry['1.3.6.1.4.1.3375.2.2.10.1.2.1.3.'.$index], 0, 11);
|
||||
}
|
||||
|
||||
// Now that we have our UID we can pull all the other data we need.
|
||||
$result['IP'] = IP::fromHexString($ltmVirtualServEntry['1.3.6.1.4.1.3375.2.2.10.1.2.1.3.'.$index], true);
|
||||
$result['port'] = $ltmVirtualServEntry['1.3.6.1.4.1.3375.2.2.10.1.2.1.6.'.$index];
|
||||
|
Reference in New Issue
Block a user