Skip to content

Commit

Permalink
Merge pull request #3455 from laf/issue-2404
Browse files Browse the repository at this point in the history
Added Sophos detection
  • Loading branch information
laf committed May 2, 2016
2 parents da4d03c + 0ef7921 commit 2e0a915
Show file tree
Hide file tree
Showing 4 changed files with 1,106 additions and 11 deletions.
Binary file added html/images/os/sophos.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 11 additions & 0 deletions includes/definitions.inc.php
Expand Up @@ -1035,6 +1035,17 @@
$config['os'][$os]['over'][0]['text'] = 'Traffic';
$config['os'][$os]['icon'] = 'zyxel';

$os = 'sophos';
$config['os'][$os]['text'] = 'Sophos UTM Firewall';
$config['os'][$os]['type'] = 'firewall';
$config['os'][$os]['icon'] = 'sophos';
$config['os'][$os]['over'][0]['graph'] = 'device_bits';
$config['os'][$os]['over'][0]['text'] = 'Traffic';
$config['os'][$os]['over'][1]['graph'] = 'device_processor';
$config['os'][$os]['over'][1]['text'] = 'CPU Usage';
$config['os'][$os]['over'][2]['graph'] = 'device_mempool';
$config['os'][$os]['over'][2]['text'] = 'Memory Usage';

$os = 'prestige';
$config['os'][$os]['text'] = 'ZyXEL Prestige';
$config['os'][$os]['type'] = 'network';
Expand Down
25 changes: 14 additions & 11 deletions includes/discovery/os/linux.inc.php
Expand Up @@ -18,40 +18,40 @@
if (strstr($sysObjectId, '.1.3.6.1.4.1.5528.100.20.10.2014') || strstr($sysObjectId, '.1.3.6.1.4.1.5528.100.20.10.2016')) {
$os = 'netbotz';
}
else if (strstr($sysDescr, 'endian')) {
elseif (strstr($sysDescr, 'endian')) {
$os = 'endian';
}
else if (preg_match('/Cisco Small Business/', $sysDescr)) {
elseif (preg_match('/Cisco Small Business/', $sysDescr)) {
$os = 'ciscosmblinux';
}
else if (strpos($entPhysicalMfgName, 'QNAP') !== false) {
elseif (strpos($entPhysicalMfgName, 'QNAP') !== false) {
$os = 'qnap';
}
else if (stristr($sysObjectId, 'packetlogic') || strstr($sysObjectId, '.1.3.6.1.4.1.15397.2')) {
elseif (stristr($sysObjectId, 'packetlogic') || strstr($sysObjectId, '.1.3.6.1.4.1.15397.2')) {
$os = 'procera';
}
else if (strstr($sysObjectId, '.1.3.6.1.4.1.10002.1') || strstr($sysObjectId, '.1.3.6.1.4.1.41112.1.4') || strpos(trim(snmp_get($device, 'dot11manufacturerName.5', '-Osqnv', 'IEEE802dot11-MIB')), 'Ubiquiti') !== false) {
elseif (strstr($sysObjectId, '.1.3.6.1.4.1.10002.1') || strstr($sysObjectId, '.1.3.6.1.4.1.41112.1.4') || strpos(trim(snmp_get($device, 'dot11manufacturerName.5', '-Osqnv', 'IEEE802dot11-MIB')), 'Ubiquiti') !== false) {
$os = 'airos';
if (strpos(trim(snmp_get($device, 'dot11manufacturerProductName.5', '-Osqnv', 'IEEE802dot11-MIB')), 'UAP') !== false) {
$os = 'unifi';
}
else if (strpos(trim(snmp_get($device, 'dot11manufacturerProductName.2', '-Osqnv', 'IEEE802dot11-MIB')), 'UAP') !== false) {
elseif (strpos(trim(snmp_get($device, 'dot11manufacturerProductName.2', '-Osqnv', 'IEEE802dot11-MIB')), 'UAP') !== false) {
$os = 'unifi';
}
else if (strpos(trim(snmp_get($device, 'dot11manufacturerProductName.3', '-Osqnv', 'IEEE802dot11-MIB')), 'UAP') !== false) {
elseif (strpos(trim(snmp_get($device, 'dot11manufacturerProductName.3', '-Osqnv', 'IEEE802dot11-MIB')), 'UAP') !== false) {
$os = 'unifi';
}
else if (strpos(trim(snmp_get($device, 'dot11manufacturerProductName.4', '-Osqnv', 'IEEE802dot11-MIB')), 'UAP') !== false) {
elseif (strpos(trim(snmp_get($device, 'dot11manufacturerProductName.4', '-Osqnv', 'IEEE802dot11-MIB')), 'UAP') !== false) {
$os = 'unifi';
}
else if (strpos(trim(snmp_get($device, 'dot11manufacturerProductName.6', '-Osqnv', 'IEEE802dot11-MIB')), 'UAP') !== false) {
elseif (strpos(trim(snmp_get($device, 'dot11manufacturerProductName.6', '-Osqnv', 'IEEE802dot11-MIB')), 'UAP') !== false) {
$os = 'unifi';
}
else if (trim(snmp_get($device, 'fwVersion.1', '-Osqnv', 'UBNT-AirFIBER-MIB')) != '') {
elseif (trim(snmp_get($device, 'fwVersion.1', '-Osqnv', 'UBNT-AirFIBER-MIB')) != '') {
$os = 'airos-af';
}
}
else if (snmp_get($device, 'GANDI-MIB::rxCounter.0', '-Osqnv', 'GANDI-MIB') !== false) {
elseif (snmp_get($device, 'GANDI-MIB::rxCounter.0', '-Osqnv', 'GANDI-MIB') !== false) {
$os = 'pktj';
$pktj_mibs = array (
"rxCounter" => "GANDI-MIB", // RX Packets
Expand All @@ -68,6 +68,9 @@
elseif (stristr($sysObjectId, 'cumulusMib') || strstr($sysObjectId, '.1.3.6.1.4.1.40310')) {
$os = 'cumulus';
}
elseif (strstr($sysObjectId, '.1.3.6.1.4.1.8072.3.2.10')) {
$os = 'sophos';
}
else {
// Check for Synology DSM
$hrSystemInitialLoadParameters = trim(snmp_get($device, 'HOST-RESOURCES-MIB::hrSystemInitialLoadParameters.0', '-Osqnv'));
Expand Down

0 comments on commit 2e0a915

Please sign in to comment.