mirror of
https://github.com/stylersnico/librenms.git
synced 2026-07-12 16:06:25 +02:00
add synology Disk Station Manager recognition
git-svn-id: http://www.observium.org/svn/observer/trunk@3084 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
Binary file not shown.
|
After Width: | Height: | Size: 873 B |
@@ -6,17 +6,23 @@ if (!$os)
|
||||
|
||||
## Specific Linux-derivatives
|
||||
|
||||
if ($os == "linux") {
|
||||
|
||||
if ($os == "linux")
|
||||
{
|
||||
## Check for QNAP Systems TurboNAS
|
||||
$entPhysicalMfgName = snmp_get($device, "ENTITY-MIB::entPhysicalMfgName.1", "-Osqnv");
|
||||
|
||||
if (strpos($entPhysicalMfgName, "QNAP") !== FALSE) { $os = "qnap";}
|
||||
elseif(strstr($sysObjectId, ".1.3.6.1.4.1.5528.100.20.10.2014")) { $os = "netbotz"; }
|
||||
if(strstr($sysObjectId, ".1.3.6.1.4.1.5528.100.20.10.2014")) { $os = "netbotz"; }
|
||||
elseif (strstr($sysDescr, "endian")) { $os = "endian"; }
|
||||
elseif (preg_match("/Cisco Small Business/", $sysDescr)) { $os = "ciscosmblinux"; }
|
||||
}
|
||||
elseif (strpos($entPhysicalMfgName, "QNAP") !== FALSE) { $os = "qnap"; }
|
||||
else
|
||||
{
|
||||
## Check for Synology DSM
|
||||
$hrSystemInitialLoadParameters = trim(snmp_get($device, "hrSystemInitialLoadParameters.0", "-Osqnv"));
|
||||
|
||||
if (strpos($hrSystemInitialLoadParameters, "syno_hw_version") !== FALSE) { $os = "dsm"; }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
@@ -71,5 +71,11 @@ elseif ($device['os'] == "qnap")
|
||||
$version = snmp_get($device, "ENTITY-MIB::entPhysicalFirmwareRev.1", "-Osqnv");
|
||||
$serial = snmp_get($device, "ENTITY-MIB::entPhysicalSerial.1", "-Osqnv");
|
||||
}
|
||||
elseif ($device['os'] == "dsm")
|
||||
{
|
||||
# FIXME only the build, not the actual version number, so won't use this.. yet?
|
||||
# list(,,,$version,) = explode(" ",$poll_device['sysDescr'],5);
|
||||
# $version = "Build " . trim($version,'#');
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
@@ -48,7 +48,7 @@ $config['os'][$os]['over'][2]['graph'] = "device_storage";
|
||||
$config['os'][$os]['over'][2]['text'] = "Storage Usage";
|
||||
|
||||
$os = "qnap";
|
||||
$config['os'][$os]['type'] = "server";
|
||||
$config['os'][$os]['type'] = "storage";
|
||||
$config['os'][$os]['group'] = "unix";
|
||||
$config['os'][$os]['text'] = "QNAP TurboNAS";
|
||||
$config['os'][$os]['ifXmcbc'] = 1;
|
||||
@@ -870,6 +870,12 @@ $config['os'][$os]['text'] = "ArubaOS";
|
||||
$config['os'][$os]['type'] = "wireless";
|
||||
$config['os'][$os]['icon'] = "arubaos";
|
||||
|
||||
$os = "dsm";
|
||||
$config['os'][$os]['text'] = "Synology DSM";
|
||||
$config['os'][$os]['group'] = "unix";
|
||||
$config['os'][$os]['type'] = "storage";
|
||||
$config['os'][$os]['icon'] = "synology";
|
||||
|
||||
foreach ($config['os'] as $this_os => $blah)
|
||||
{
|
||||
if (isset($config['os'][$this_os]['group']))
|
||||
@@ -1071,6 +1077,11 @@ $config['device_types'][$i]['text'] = 'Load Balancers';
|
||||
$config['device_types'][$i]['type'] = 'loadbalancer';
|
||||
$config['device_types'][$i]['icon'] = 'loadbalancer.png';
|
||||
|
||||
$i++;
|
||||
$config['device_types'][$i]['text'] = 'Storage';
|
||||
$config['device_types'][$i]['type'] = 'storage';
|
||||
$config['device_types'][$i]['icon'] = 'storage.png';
|
||||
|
||||
if (isset($config['enable_printers']) && $config['enable_printers'])
|
||||
{
|
||||
$i++;
|
||||
|
||||
Reference in New Issue
Block a user