mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
refactor: Updated os discovery files (a) (#4514)
This commit is contained in:
committed by
Tony Murray
parent
369bfaf508
commit
24fe69be3d
@@ -1,11 +1,5 @@
|
||||
<?php
|
||||
|
||||
if (!$os) {
|
||||
if (strstr($sysDescr, '3Com Switch ')) {
|
||||
$os = '3com';
|
||||
} elseif (strstr($sysDescr, '3Com SuperStack')) {
|
||||
$os = '3com';
|
||||
} elseif (strstr($sysDescr, '3Com Baseline')) {
|
||||
$os = '3com';
|
||||
}
|
||||
if (str_contains($sysDescr, array('3Com Switch ', '3Com SuperStack', '3Com Baseline',))) {
|
||||
$os = '3com';
|
||||
}
|
||||
|
@@ -1,7 +1,5 @@
|
||||
<?php
|
||||
|
||||
if (!$os) {
|
||||
if ((strstr($sysObjectId, '1.3.6.1.4.1.8072.3.2.10')) && (strstr($sysDescr, 'Acano'))) {
|
||||
$os = 'acano';
|
||||
}
|
||||
if (starts_with($sysObjectId, '.1.3.6.1.4.1.8072.3.2.10') && str_contains($sysDescr, 'Acano')) {
|
||||
$os = 'acano';
|
||||
}
|
||||
|
@@ -1,7 +1,5 @@
|
||||
<?php
|
||||
|
||||
if (!$os) {
|
||||
if (strstr($sysObjectId, '.1.3.6.1.4.1.9.1.1117')) {
|
||||
$os = 'acs';
|
||||
}
|
||||
if (starts_with($sysObjectId, '.1.3.6.1.4.1.9.1.1117')) {
|
||||
$os = 'acs';
|
||||
}
|
||||
|
@@ -1,16 +1,7 @@
|
||||
<?php
|
||||
|
||||
if (!$os) {
|
||||
if (strstr($sysDescr, 'Cisco Application Control Software')) {
|
||||
$os = 'acsw';
|
||||
}
|
||||
if (strstr($sysDescr, 'Application Control Engine')) {
|
||||
$os = 'acsw';
|
||||
}
|
||||
}
|
||||
|
||||
if (!$os) {
|
||||
if (strstr($sysObjectId, '.1.3.6.1.4.1.9.1.1291')) {
|
||||
$os = 'acsw';
|
||||
}
|
||||
if (str_contains($sysDescr, array('Application Control Engine', 'Cisco Application Control Software'))) {
|
||||
$os = 'acsw';
|
||||
} elseif (starts_with($sysObjectId, '.1.3.6.1.4.1.9.1.1291')) {
|
||||
$os = 'acsw';
|
||||
}
|
||||
|
@@ -1,5 +1,4 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* LibreNMS ADTRAN AOS OS Discovery module
|
||||
*
|
||||
@@ -12,11 +11,8 @@
|
||||
* the source code distribution for details.
|
||||
*/
|
||||
|
||||
|
||||
if (!$os) {
|
||||
if (preg_match('/NetVanta/', $sysDescr)) {
|
||||
$os = 'adtran-aos';
|
||||
} elseif (strstr($sysObjectId, '.1.3.6.1.4.1.664')) {
|
||||
$os = 'adtran-aos';
|
||||
}
|
||||
if (str_contains($sysDescr, 'NetVanta')) {
|
||||
$os = 'adtran-aos';
|
||||
} elseif (starts_with($sysObjectId, '.1.3.6.1.4.1.664')) {
|
||||
$os = 'adtran-aos';
|
||||
}
|
||||
|
@@ -1,5 +1,4 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* LibreNMS Acceidan MetroNID OS Discovery module
|
||||
*
|
||||
@@ -12,9 +11,6 @@
|
||||
* the source code distribution for details.
|
||||
*/
|
||||
|
||||
|
||||
if (!$os) {
|
||||
if (preg_match('/AMN-/', $sysDescr)) {
|
||||
$os = 'aen';
|
||||
}
|
||||
if (str_contains($sysDescr, 'AMN-')) {
|
||||
$os = 'aen';
|
||||
}
|
||||
|
@@ -9,8 +9,6 @@
|
||||
* option) any later version. Please see LICENSE.txt at the top level of
|
||||
* the source code distribution for details.
|
||||
*/
|
||||
if (!$os) {
|
||||
if (stristr($sysDescr, 'HiveOS')) {
|
||||
$os = 'aerohive';
|
||||
}
|
||||
if (str_contains($sysDescr, 'HiveOS')) {
|
||||
$os = 'aerohive';
|
||||
}
|
||||
|
@@ -1,13 +1,5 @@
|
||||
<?php
|
||||
|
||||
if (!$os) {
|
||||
if (strstr($sysDescr, 'Apple AirPort')) {
|
||||
$os = 'airport';
|
||||
}
|
||||
if (strstr($sysDescr, 'Apple Base Station')) {
|
||||
$os = 'airport';
|
||||
}
|
||||
if (strstr($sysDescr, 'Base Station V3.84')) {
|
||||
$os = 'airport';
|
||||
}
|
||||
if (str_contains($sysDescr, array('Apple AirPort', 'Apple Base Station', 'Base Station V3.84'))) {
|
||||
$os = 'airport';
|
||||
}
|
||||
|
@@ -1,11 +1,5 @@
|
||||
<?php
|
||||
|
||||
if (!$os) {
|
||||
if (preg_match('/8VD-X20/', $sysDescr)) {
|
||||
$os = 'minkelsrms';
|
||||
}
|
||||
|
||||
if (preg_match('/SensorProbe/i', $sysDescr)) {
|
||||
$os = 'akcp';
|
||||
}
|
||||
if (str_contains($sysDescr, 'SensorProbe', true)) {
|
||||
$os = 'akcp';
|
||||
}
|
||||
|
@@ -1,22 +0,0 @@
|
||||
<?php
|
||||
|
||||
// | Alcatel-Lucent OS6850-U24X 6.4.3.520.R01 GA, April 08, 2010. | .1.3.6.1.4.1.6486.800.1.1.2.1.7.1.10 |
|
||||
if (!$os) {
|
||||
if (strpos($sysObjectId, '.1.3.6.1.4.1.6486.800') !== false) {
|
||||
if (strstr($sysDescr, 'AOS-W')) {
|
||||
$os = 'arubaos';
|
||||
} else {
|
||||
$os = 'aos';
|
||||
}
|
||||
} elseif (strpos($sysObjectId, '.1.3.6.1.4.1.6486.801') !== false) {
|
||||
$os = 'aos';
|
||||
} elseif (strpos($sysObjectId, '.1.3.6.1.4.1.6527.1.3') !== false
|
||||
|| strpos($sysObjectId, '.1.3.6.1.4.1.6527.6.2.1.2.2.') !== false // TiMOS-B-2.0.R3 both/mpc ALCATEL SAS-M 7210
|
||||
|| strpos($sysObjectId, '.1.3.6.1.4.1.6527.1.6.1') !== false // TiMOS-B-6.1.R14 both/hops ALCATEL ESS 7450
|
||||
|| strpos($sysObjectId, '.1.3.6.1.4.1.6527.6.1.1.2.') !== false // TiMOS-B-6.0.R2 both/hops ALCATEL-LUCENT SAR 7705
|
||||
|| strpos($sysObjectId, '.1.3.6.1.4.1.6527.1.9.1') !== false // TiMOS-B-6.1.R14 both/hops ALCATEL SR 7710
|
||||
|| strpos($sysObjectId, '.1.3.6.1.4.1.6527.1.15.') !== false // TiMOS-C-12.0.R16 cpm/hops64 ALCATEL XRS 7950
|
||||
) {
|
||||
$os = 'timos';
|
||||
}
|
||||
}//end if
|
@@ -1,11 +1,5 @@
|
||||
<?php
|
||||
|
||||
if (!$os) {
|
||||
if (strstr($sysObjectId, '.1.3.6.1.4.1.207')) {
|
||||
$os = 'allied';
|
||||
}
|
||||
|
||||
if (strstr($sysObjectId, '.1.3.6.1.4.1.207.1.4.126')) {
|
||||
unset($os);
|
||||
}
|
||||
if (starts_with($sysObjectId, '.1.3.6.1.4.1.207') && !starts_with($sysObjectId, '.1.3.6.1.4.1.207.1.4.126')) {
|
||||
$os = 'allied';
|
||||
}
|
||||
|
10
includes/discovery/os/aos.inc.php
Normal file
10
includes/discovery/os/aos.inc.php
Normal file
@@ -0,0 +1,10 @@
|
||||
<?php
|
||||
|
||||
// | Alcatel-Lucent OS6850-U24X 6.4.3.520.R01 GA, April 08, 2010. | .1.3.6.1.4.1.6486.800.1.1.2.1.7.1.10 |
|
||||
if (starts_with($sysObjectId, '.1.3.6.1.4.1.6486.800')) {
|
||||
if (!str_contains($sysDescr, 'AOS-W')) {
|
||||
$os = 'aos';
|
||||
}
|
||||
} elseif (starts_with($sysObjectId, '.1.3.6.1.4.1.6486.801')) {
|
||||
$os = 'aos';
|
||||
}
|
@@ -1,14 +1,14 @@
|
||||
<?php
|
||||
|
||||
if (!$os) {
|
||||
$apcDesc = array(
|
||||
'APC Web/SNMP Management Card',
|
||||
'APC Switched Rack PDU',
|
||||
'APC MasterSwitch PDU',
|
||||
'APC Metered Rack PDU',
|
||||
);
|
||||
$apc_desc = array(
|
||||
'APC Web/SNMP Management Card',
|
||||
'APC Switched Rack PDU',
|
||||
'APC MasterSwitch PDU',
|
||||
'APC Metered Rack PDU',
|
||||
);
|
||||
|
||||
if (str_contains($sysDescr, $apcDesc)) {
|
||||
$os = 'apc';
|
||||
}
|
||||
if (str_contains($sysDescr, $apc_desc)) {
|
||||
$os = 'apc';
|
||||
}
|
||||
|
||||
unset($apc_desc);
|
||||
|
@@ -1,7 +1,6 @@
|
||||
<?php
|
||||
|
||||
if (!$os) {
|
||||
if (strstr($sysDescr, 'Raid Subsystem V')) {
|
||||
$os = 'areca';
|
||||
}
|
||||
|
||||
if (str_contains($sysDescr, 'Raid Subsystem V')) {
|
||||
$os = 'areca';
|
||||
}
|
||||
|
@@ -1,7 +1,5 @@
|
||||
<?php
|
||||
|
||||
if (!$os) {
|
||||
if (strstr($sysDescr, 'Arista Networks EOS')) {
|
||||
$os = 'arista_eos';
|
||||
}
|
||||
if (str_contains($sysDescr, 'Arista Networks EOS')) {
|
||||
$os = 'arista_eos';
|
||||
}
|
||||
|
@@ -1,7 +1,8 @@
|
||||
<?php
|
||||
|
||||
if (!$os) {
|
||||
if (strstr($sysDescr, 'ArubaOS')) {
|
||||
$os = 'arubaos';
|
||||
}
|
||||
// | Alcatel-Lucent OS6850-U24X 6.4.3.520.R01 GA, April 08, 2010. | .1.3.6.1.4.1.6486.800.1.1.2.1.7.1.10 |
|
||||
if (str_contains($sysDescr, 'ArubaOS')) {
|
||||
$os = 'arubaos';
|
||||
} elseif (starts_with($sysObjectId, '.1.3.6.1.4.1.6486.800') && str_contains($sysDescr, 'AOS-W')) {
|
||||
$os = 'arubaos';
|
||||
}
|
||||
|
@@ -1,7 +1,5 @@
|
||||
<?php
|
||||
|
||||
if (!$os) {
|
||||
if (preg_match('/^Cisco\ Adaptive\ Security\ Appliance/', $sysDescr)) {
|
||||
$os = 'asa';
|
||||
}
|
||||
if (starts_with($sysDescr, 'Cisco Adaptive Security Appliance')) {
|
||||
$os = 'asa';
|
||||
}
|
||||
|
@@ -1,9 +1,5 @@
|
||||
<?php
|
||||
|
||||
if (!$os) {
|
||||
if (strstr($sysDescr, 'Ethernet Routing Switch')) {
|
||||
$os = 'avaya-ers';
|
||||
} elseif (strstr($sysDescr, 'ERS-')) {
|
||||
$os = 'avaya-ers';
|
||||
}
|
||||
if (str_contains($sysDescr, array('Ethernet Routing Switch', 'ERS-'))) {
|
||||
$os = 'avaya-ers';
|
||||
}
|
||||
|
@@ -1,7 +1,5 @@
|
||||
<?php
|
||||
|
||||
if (!$os) {
|
||||
if (strstr(snmp_get($device, 'ENTITY-MIB::entPhysicalDescr.1', '-Oqvn'), 'Avaya IP Office')) {
|
||||
$os = "avaya-ipo";
|
||||
}
|
||||
if (str_contains(snmp_get($device, 'ENTITY-MIB::entPhysicalDescr.1', '-Oqvn'), 'Avaya IP Office')) {
|
||||
$os = "avaya-ipo";
|
||||
}
|
||||
|
@@ -11,33 +11,14 @@
|
||||
* the source code distribution for details.
|
||||
*/
|
||||
|
||||
if (!$os) {
|
||||
if (strstr($sysObjectId, '.1.3.6.1.4.1.2272.202')) {
|
||||
// VSP-4850GTS
|
||||
$os = 'avaya-vsp';
|
||||
}
|
||||
if (strstr($sysObjectId, '.1.3.6.1.4.1.2272.203')) {
|
||||
// VSP-4850GTS-PWR+
|
||||
$os = 'avaya-vsp';
|
||||
}
|
||||
if (strstr($sysObjectId, '.1.3.6.1.4.1.2272.205')) {
|
||||
// VSP-8284XSQ
|
||||
$os = 'avaya-vsp';
|
||||
}
|
||||
if (strstr($sysObjectId, '.1.3.6.1.4.1.2272.206')) {
|
||||
// VSP-4450GSX-PWR+
|
||||
$os = 'avaya-vsp';
|
||||
}
|
||||
if (strstr($sysObjectId, '.1.3.6.1.4.1.2272.208')) {
|
||||
// VSP-8404
|
||||
$os = 'avaya-vsp';
|
||||
}
|
||||
if (strstr($sysObjectId, '.1.3.6.1.4.1.2272.209')) {
|
||||
// VSP-7254XSQ
|
||||
$os = 'avaya-vsp';
|
||||
}
|
||||
if (strstr($sysObjectId, '.1.3.6.1.4.1.2272.210')) {
|
||||
// VSP-7254XTQ
|
||||
$os = 'avaya-vsp';
|
||||
}
|
||||
if (starts_with($sysObjectId, array(
|
||||
'.1.3.6.1.4.1.2272.202',
|
||||
'.1.3.6.1.4.1.2272.203',
|
||||
'.1.3.6.1.4.1.2272.205',
|
||||
'.1.3.6.1.4.1.2272.206',
|
||||
'.1.3.6.1.4.1.2272.208',
|
||||
'.1.3.6.1.4.1.2272.209',
|
||||
'.1.3.6.1.4.1.2272.210',
|
||||
))) {
|
||||
$os = 'avaya-vsp';
|
||||
}
|
||||
|
@@ -1,11 +1,5 @@
|
||||
<?php
|
||||
|
||||
if (!$os) {
|
||||
if (preg_match('/^Avocent/', $sysDescr)) {
|
||||
$os = 'avocent';
|
||||
}
|
||||
|
||||
if (preg_match('/^AlterPath/', $sysDescr)) {
|
||||
$os = 'avocent';
|
||||
}
|
||||
if (starts_with($sysDescr, array('Avocent', 'AlterPath'))) {
|
||||
$os = 'avocent';
|
||||
}
|
||||
|
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
if (!$os) {
|
||||
if (strstr($sysObjectId, '.20916.1.')) {
|
||||
$os = 'avtech';
|
||||
}
|
||||
|
||||
|
||||
if (str_contains($sysObjectId, '.20916.1.')) {
|
||||
$os = 'avtech';
|
||||
}
|
||||
|
@@ -1,7 +1,5 @@
|
||||
<?php
|
||||
|
||||
if (!$os) {
|
||||
if (preg_match('/AXIS .* (Network Camera|Video Server|Network Video Encoder)/', $sysDescr)) {
|
||||
$os = 'axiscam';
|
||||
}
|
||||
if (preg_match('/AXIS .* (Network Camera|Video Server|Network Video Encoder)/', $sysDescr)) {
|
||||
$os = 'axiscam';
|
||||
}
|
||||
|
@@ -1,7 +1,5 @@
|
||||
<?php
|
||||
|
||||
if (!$os) {
|
||||
if (preg_match('/^AXIS .* Network Document Server/', $sysDescr)) {
|
||||
$os = 'axisdocserver';
|
||||
}
|
||||
if (preg_match('/^AXIS .* Network Document Server/', $sysDescr)) {
|
||||
$os = 'axisdocserver';
|
||||
}
|
||||
|
5
includes/discovery/os/minkelsrms.inc.php
Normal file
5
includes/discovery/os/minkelsrms.inc.php
Normal file
@@ -0,0 +1,5 @@
|
||||
<?php
|
||||
|
||||
if (str_contains($sysDescr, '8VD-X20')) {
|
||||
$os = 'minkelsrms';
|
||||
}
|
12
includes/discovery/os/timos.inc.php
Normal file
12
includes/discovery/os/timos.inc.php
Normal file
@@ -0,0 +1,12 @@
|
||||
<?php
|
||||
|
||||
if (starts_with($sysObjectId, array(
|
||||
'.1.3.6.1.4.1.6527.1.3',
|
||||
'.1.3.6.1.4.1.6527.6.2.1.2.2.',
|
||||
'.1.3.6.1.4.1.6527.1.6.1',
|
||||
'.1.3.6.1.4.1.6527.6.1.1.2.',
|
||||
'.1.3.6.1.4.1.6527.1.9.1',
|
||||
'.1.3.6.1.4.1.6527.1.15.',
|
||||
))) {
|
||||
$os = 'timos';
|
||||
}
|
Reference in New Issue
Block a user