mirror of
				https://github.com/librenms/librenms.git
				synced 2024-10-07 16:52:45 +00:00 
			
		
		
		
	Serial number and more robust OS version for Netgear switches (#10164)
* Serial number and more robust OS version for Netgear switches * Update netgear.inc.php * Update netgear.inc.php
This commit is contained in:
		@@ -1,5 +1,8 @@
 | 
			
		||||
<?php
 | 
			
		||||
 | 
			
		||||
// sysDescr.0 = XS712T ProSafe 12-Port 10 Gigabit Ethernet (10GbE) Smart Switch, 6.1.0.12, B6.1.0.1
 | 
			
		||||
list($hardware, ) = explode(' ', $device['sysDescr']);
 | 
			
		||||
list(,$version, ) = explode(',', $device['sysDescr']);
 | 
			
		||||
if (!$version) {
 | 
			
		||||
    $version = trim(snmp_get($device, 'entPhysicalSoftwareRev.1', '-OQv', 'ENTITY-MIB', ''), '"');
 | 
			
		||||
}
 | 
			
		||||
$serial = trim(snmp_get($device, 'entPhysicalSerialNum.1', '-OQv', 'ENTITY-MIB', ''), '"');
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user