mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Windows detect newer versions (#12164)
* Fix Window hardware info flapping * add description * Missing features field * Rename hardware method * Updated test data
This commit is contained in:
@@ -27,10 +27,12 @@ namespace LibreNMS\OS\Shared;
|
||||
|
||||
use App\Models\Device;
|
||||
use Illuminate\Support\Str;
|
||||
use LibreNMS\OS\Traits\ServerHardware;
|
||||
use LibreNMS\OS\Traits\YamlOSDiscovery;
|
||||
|
||||
class Unix extends \LibreNMS\OS
|
||||
{
|
||||
use ServerHardware;
|
||||
use YamlOSDiscovery {
|
||||
YamlOSDiscovery::discoverOS as discoverYamlOS;
|
||||
}
|
||||
@@ -40,7 +42,7 @@ class Unix extends \LibreNMS\OS
|
||||
// yaml discovery overrides this
|
||||
if ($this->hasYamlDiscovery('os')) {
|
||||
$this->discoverYamlOS($device);
|
||||
$this->discoverDellHardware();
|
||||
$this->discoverServerHardware();
|
||||
$this->discoverExtends($device);
|
||||
|
||||
return;
|
||||
@@ -70,24 +72,10 @@ class Unix extends \LibreNMS\OS
|
||||
$device->hardware = 'Generic ARM';
|
||||
}
|
||||
|
||||
$this->discoverDellHardware();
|
||||
$this->discoverServerHardware();
|
||||
$this->discoverExtends($device);
|
||||
}
|
||||
|
||||
protected function discoverDellHardware()
|
||||
{
|
||||
// Detect Dell hardware via OpenManage SNMP
|
||||
$hw = snmp_get($this->getDeviceArray(), '.1.3.6.1.4.1.674.10892.1.300.10.1.9.1', '-Oqv', 'MIB-Dell-10892');
|
||||
if ($hw) {
|
||||
$this->getDevice()->hardware = 'Dell ' . $hw;
|
||||
} else {
|
||||
$hw = trim(snmp_get($this->getDeviceArray(), 'cpqSiProductName.0', '-Oqv', 'CPQSINFO-MIB', 'hp'), '"');
|
||||
if (! empty($hw)) {
|
||||
$this->getDevice()->hardware = $hw;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected function discoverExtends(Device $device)
|
||||
{
|
||||
// Distro "extend" support
|
||||
|
74
LibreNMS/OS/Traits/ServerHardware.php
Normal file
74
LibreNMS/OS/Traits/ServerHardware.php
Normal file
@@ -0,0 +1,74 @@
|
||||
<?php
|
||||
/*
|
||||
* PCHardware.php
|
||||
*
|
||||
* Helpers to discover OS info from various server vendor MIB addons
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @package LibreNMS
|
||||
* @link http://librenms.org
|
||||
* @copyright 2020 Tony Murray
|
||||
* @author Tony Murray <murraytony@gmail.com>
|
||||
*/
|
||||
|
||||
namespace LibreNMS\OS\Traits;
|
||||
|
||||
trait ServerHardware
|
||||
{
|
||||
protected function discoverServerHardware()
|
||||
{
|
||||
$this->discoverDellHardware() || $this->discoverHpHardware();
|
||||
}
|
||||
|
||||
protected function discoverDellHardware()
|
||||
{
|
||||
// Detect Dell hardware via OpenManage SNMP
|
||||
$hw = snmp_get_multi_oid($this->getDeviceArray(), [
|
||||
'MIB-Dell-10892::chassisModelName.1',
|
||||
'MIB-Dell-10892::chassisServiceTagName.1',
|
||||
], '-OUQ', null, 'dell');
|
||||
|
||||
if (empty($hw)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$device = $this->getDevice();
|
||||
if (! empty($hw['MIB-Dell-10892::chassisModelName.1'])) {
|
||||
$device->hardware = 'Dell ' . $hw['MIB-Dell-10892::chassisModelName.1'];
|
||||
}
|
||||
|
||||
$device->serial = $hw['MIB-Dell-10892::chassisServiceTagName.1'] ?? $device->serial;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
protected function discoverHpHardware()
|
||||
{
|
||||
$hw = snmp_get_multi_oid($this->getDeviceArray(), [
|
||||
'CPQSINFO-MIB::cpqSiProductName.0',
|
||||
'CPQSINFO-MIB::cpqSiSysSerialNum.0',
|
||||
], '-OUQ', null, 'hp');
|
||||
|
||||
if (empty($hw)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$device = $this->getDevice();
|
||||
$device->hardware = $hw['CPQSINFO-MIB::cpqSiProductName.0'] ?? $device->hardware;
|
||||
$device->serial = $hw['CPQSINFO-MIB::cpqSiSysSerialNum.0'] ?? $device->serial;
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
142
LibreNMS/OS/Windows.php
Normal file
142
LibreNMS/OS/Windows.php
Normal file
@@ -0,0 +1,142 @@
|
||||
<?php
|
||||
/*
|
||||
* Windows.php
|
||||
*
|
||||
* -Description-
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @package LibreNMS
|
||||
* @link http://librenms.org
|
||||
* @copyright 2020 Tony Murray
|
||||
* @author Tony Murray <murraytony@gmail.com>
|
||||
*/
|
||||
|
||||
namespace LibreNMS\OS;
|
||||
|
||||
use App\Models\Device;
|
||||
use LibreNMS\OS\Traits\ServerHardware;
|
||||
|
||||
class Windows extends \LibreNMS\OS
|
||||
{
|
||||
use ServerHardware;
|
||||
|
||||
public function discoverOS(Device $device): void
|
||||
{
|
||||
if (preg_match('/Hardware: (?<hardware>.*) +- Software: .* Version (?<nt>\S+) +\(Build( Number:)? (?<build>\S+) (?<smp>\S+)/', $device->sysDescr, $matches)) {
|
||||
$device->hardware = $this->parseHardware($matches['hardware']);
|
||||
$device->features = $matches['smp'];
|
||||
|
||||
if ($device->sysObjectID == '.1.3.6.1.4.1.311.1.1.3.1.1') {
|
||||
$device->version = $this->getClientVersion($matches['build'], $matches['version']);
|
||||
} elseif ($device->sysObjectID == '.1.3.6.1.4.1.311.1.1.3.1.2') {
|
||||
$device->version = $this->getServerVersion($matches['build']);
|
||||
} elseif ($device->sysObjectID == '.1.3.6.1.4.1.311.1.1.3.1.3') {
|
||||
$device->version = $this->getDatacenterVersion($matches['build']);
|
||||
}
|
||||
}
|
||||
|
||||
$this->discoverServerHardware();
|
||||
}
|
||||
|
||||
private function parseHardware($processor)
|
||||
{
|
||||
preg_match('/(?<generic>\S+) Family (?<family>\d+) Model (?<model>\d+) Stepping (?<stepping>\d+)/', $processor, $matches);
|
||||
|
||||
$generic = [
|
||||
'AMD64' => 'AMD x64',
|
||||
'Intel64' => 'Intel x64',
|
||||
'EM64T' => 'Intel x64',
|
||||
'x86' => 'Generic x86',
|
||||
'ia64' => 'Intel Itanium IA64',
|
||||
];
|
||||
|
||||
return $generic[$matches['generic']] ?? null;
|
||||
}
|
||||
|
||||
private function getClientVersion($build, $version)
|
||||
{
|
||||
$default = $build > 10000 ? '10 (NT 6.3)' : null;
|
||||
|
||||
$builds = [
|
||||
'19041' => '10 2004 (NT 6.3)',
|
||||
'18363' => '10 1909 (NT 6.3)',
|
||||
'18362' => '10 1903 (NT 6.3)',
|
||||
'17763' => '10 1809 (NT 6.3)',
|
||||
'17134' => '10 1803 (NT 6.3)',
|
||||
'16299' => '10 1709 (NT 6.3)',
|
||||
'15063' => '10 1703 (NT 6.3)',
|
||||
'14393' => '10 1607 (NT 6.3)',
|
||||
'10586' => '10 1511 (NT 6.3)',
|
||||
'10240' => '10 1507 (NT 6.3)',
|
||||
'9600' => '8.1 U1 (NT 6.3)',
|
||||
'9200' => $version == '6.3' ? '8.1 (NT 6.3)' : '8 (NT 6.2)',
|
||||
'7601' => '7 SP1 (NT 6.1)',
|
||||
'7600' => '7 (NT 6.1)',
|
||||
'6002' => 'Vista SP2 (NT 6.0)',
|
||||
'6001' => 'Vista SP1 (NT 6.0)',
|
||||
'6000' => 'Vista (NT 6.0)',
|
||||
'3790' => 'XP x64 (NT 5.2)',
|
||||
'2600' => 'XP (NT 5.1)',
|
||||
'2195' => '2000 (NT 5.0)',
|
||||
'1381' => 'NT 4.0 Workstation',
|
||||
'1057' => 'NT 3.51 Workstation',
|
||||
];
|
||||
|
||||
return $builds[$build] ?? $default;
|
||||
}
|
||||
|
||||
private function getServerVersion($build)
|
||||
{
|
||||
$builds = [
|
||||
'17763' => 'Server 2019 1809 (NT 6.3)',
|
||||
'16299' => 'Server 2016 1709 (NT 6.3)',
|
||||
'14393' => 'Server 2016 (NT 6.3)',
|
||||
'9600' => 'Server 2012 R2 (NT 6.3)',
|
||||
'9200' => 'Server 2012 (NT 6.2)',
|
||||
'7601' => 'Server 2008 R2 SP1 (NT 6.1)',
|
||||
'7600' => 'Server 2008 R2 (NT 6.1)',
|
||||
'6003' => 'Server 2008 SP2 (NT 6.0)',
|
||||
'6002' => 'Server 2008 SP2 (NT 6.0)',
|
||||
'6001' => 'Server 2008 (NT 6.0)',
|
||||
'3790' => 'Server 2003 (NT 5.2)',
|
||||
'2195' => '2000 Server (NT 5.0)',
|
||||
'1381' => 'NT Server 4.0',
|
||||
'1057' => 'NT Server 3.51',
|
||||
];
|
||||
|
||||
return $builds[$build] ?? null;
|
||||
}
|
||||
|
||||
private function getDatacenterVersion($build)
|
||||
{
|
||||
$builds = [
|
||||
'17763' => 'Server 2019 1809 Datacenter (NT 6.3)',
|
||||
'16299' => 'Server 2016 1709 Datacenter (NT 6.3)',
|
||||
'14393' => 'Server 2016 1607 Datacenter (NT 6.3)',
|
||||
'9600' => 'Server 2012 R2 Datacenter (NT 6.3)',
|
||||
'9200' => 'Server 2012 Datacenter (NT 6.2)',
|
||||
'7601' => 'Server 2008 Datacenter R2 SP1 (NT 6.1)',
|
||||
'7600' => 'Server 2008 Datacenter R2 (NT 6.1)',
|
||||
'6002' => 'Server 2008 Datacenter SP2 (NT 6.0)',
|
||||
'6001' => 'Server 2008 Datacenter (NT 6.0)',
|
||||
'3790' => 'Server 2003 Datacenter (NT 5.2)',
|
||||
'2195' => '2000 Datacenter Server (NT 5.0)',
|
||||
'1381' => 'NT Datacenter 4.0',
|
||||
'1057' => 'NT Datacenter 3.51',
|
||||
];
|
||||
|
||||
return $builds[$build] ?? null;
|
||||
}
|
||||
}
|
@@ -206,6 +206,7 @@ class CiHelper
|
||||
{
|
||||
$cs_cmd = [
|
||||
$this->checkPhpExec('php-cs-fixer'),
|
||||
'--config=.php_cs',
|
||||
'fix',
|
||||
'-v',
|
||||
];
|
||||
|
@@ -1,130 +0,0 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Support\Str;
|
||||
|
||||
// sysDescr.0 = STRING: Hardware: x86 Family 6 Model 1 Stepping 9 AT/AT COMPATIBLE - Software: Windows NT Version 4.0 (Build Number: 1381 Multiprocessor Free )
|
||||
// sysDescr.0 = STRING: Hardware: x86 Family 6 Model 3 Stepping 4 AT/AT COMPATIBLE - Software: Windows NT Version 3.51 (Build Number: 1057 Multiprocessor Free )
|
||||
// sysDescr.0 = STRING: Hardware: x86 Family 16 Model 4 Stepping 2 AT/AT COMPATIBLE - Software: Windows 2000 Version 5.1 (Build 2600 Multiprocessor Free)
|
||||
// sysDescr.0 = STRING: Hardware: x86 Family 15 Model 2 Stepping 5 AT/AT COMPATIBLE - Software: Windows 2000 Version 5.0 (Build 2195 Multiprocessor Free)
|
||||
// sysDescr.0 = STRING: Hardware: AMD64 Family 16 Model 2 Stepping 3 AT/AT COMPATIBLE - Software: Windows Version 6.0 (Build 6002 Multiprocessor Free)
|
||||
// sysDescr.0 = STRING: Hardware: EM64T Family 6 Model 26 Stepping 5 AT/AT COMPATIBLE - Software: Windows Version 5.2 (Build 3790 Multiprocessor Free)
|
||||
// sysDescr.0 = STRING: Hardware: Intel64 Family 6 Model 23 Stepping 6 AT/AT COMPATIBLE - Software: Windows Version 6.1 (Build 7600 Multiprocessor Free)
|
||||
// sysDescr.0 = STRING: Hardware: AMD64 Family 16 Model 8 Stepping 0 AT/AT COMPATIBLE - Software: Windows Version 6.1 (Build 7600 Multiprocessor Free)
|
||||
|
||||
if (Str::contains($device['sysDescr'], 'AMD64')) {
|
||||
$hardware = 'AMD x64';
|
||||
} elseif (Str::contains($device['sysDescr'], ['EM64', 'Intel64'])) {
|
||||
$hardware = 'Intel x64';
|
||||
} elseif (Str::contains($device['sysDescr'], 'x86')) {
|
||||
$hardware = 'Generic x86';
|
||||
} elseif (Str::contains($device['sysDescr'], 'ia64')) {
|
||||
$hardware = 'Intel Itanium IA64';
|
||||
}
|
||||
|
||||
if ($device['sysObjectID'] == '.1.3.6.1.4.1.311.1.1.3.1.1') {
|
||||
// Client
|
||||
if (Str::contains($device['sysDescr'], 'Build 14393')) {
|
||||
$version = '10 AU (NT 6.3)';
|
||||
} elseif (Str::contains($device['sysDescr'], 'Build 10586')) {
|
||||
$version = '10 U1 (NT 6.3)';
|
||||
} elseif (Str::contains($device['sysDescr'], 'Build 10240')) {
|
||||
$version = '10 (NT 6.3)';
|
||||
} elseif (Str::contains($device['sysDescr'], 'Build 9600')) {
|
||||
$version = '8.1 U1 (NT 6.3)';
|
||||
} elseif (Str::contains($device['sysDescr'], 'Version 6.3 (Build 9200')) {
|
||||
$version = '8.1 (NT 6.3)';
|
||||
} elseif (Str::contains($device['sysDescr'], 'Build 9200')) {
|
||||
$version = '8 (NT 6.2)';
|
||||
} elseif (Str::contains($device['sysDescr'], 'Build 7601')) {
|
||||
$version = '7 SP1 (NT 6.1)';
|
||||
} elseif (Str::contains($device['sysDescr'], 'Build 7600')) {
|
||||
$version = '7 (NT 6.1)';
|
||||
} elseif (Str::contains($device['sysDescr'], 'Build 6002')) {
|
||||
$version = 'Vista SP2 (NT 6.0)';
|
||||
} elseif (Str::contains($device['sysDescr'], 'Build 6001')) {
|
||||
$version = 'Vista SP1 (NT 6.0)';
|
||||
} elseif (Str::contains($device['sysDescr'], 'Build 6000')) {
|
||||
$version = 'Vista (NT 6.0)';
|
||||
} elseif (Str::contains($device['sysDescr'], 'Build 3790')) {
|
||||
$version = 'XP x64 (NT 5.2)';
|
||||
} elseif (Str::contains($device['sysDescr'], 'Build 2600')) {
|
||||
$version = 'XP (NT 5.1)';
|
||||
} elseif (Str::contains($device['sysDescr'], 'Build 2195')) {
|
||||
$version = '2000 (NT 5.0)';
|
||||
} elseif (Str::contains($device['sysDescr'], 'Build Number: 1381')) {
|
||||
$version = 'NT 4.0 Workstation';
|
||||
} elseif (Str::contains($device['sysDescr'], 'Build Number: 1057')) {
|
||||
$version = 'NT 3.51 Workstation';
|
||||
}
|
||||
} elseif ($device['sysObjectID'] == '.1.3.6.1.4.1.311.1.1.3.1.2') {
|
||||
// Server
|
||||
if (Str::contains($device['sysDescr'], 'Build 14393')) {
|
||||
$version = 'Server 2016 (NT 6.3)';
|
||||
} elseif (Str::contains($device['sysDescr'], 'Build 9600')) {
|
||||
$version = 'Server 2012 R2 (NT 6.3)';
|
||||
} elseif (Str::contains($device['sysDescr'], 'Build 9200')) {
|
||||
$version = 'Server 2012 (NT 6.2)';
|
||||
} elseif (Str::contains($device['sysDescr'], 'Build 7601')) {
|
||||
$version = 'Server 2008 R2 SP1 (NT 6.1)';
|
||||
} elseif (Str::contains($device['sysDescr'], 'Build 7600')) {
|
||||
$version = 'Server 2008 R2 (NT 6.1)';
|
||||
} elseif (Str::contains($device['sysDescr'], 'Build 6002')) {
|
||||
$version = 'Server 2008 SP2 (NT 6.0)';
|
||||
} elseif (Str::contains($device['sysDescr'], 'Build 6001')) {
|
||||
$version = 'Server 2008 (NT 6.0)';
|
||||
} elseif (Str::contains($device['sysDescr'], 'Build 3790')) {
|
||||
$version = 'Server 2003 (NT 5.2)';
|
||||
} elseif (Str::contains($device['sysDescr'], 'Build 2195')) {
|
||||
$version = '2000 Server (NT 5.0)';
|
||||
} elseif (Str::contains($device['sysDescr'], 'Build Number: 1381')) {
|
||||
$version = 'NT Server 4.0';
|
||||
} elseif (Str::contains($device['sysDescr'], 'Build Number: 1057')) {
|
||||
$version = 'NT Server 3.51';
|
||||
}
|
||||
} elseif ($device['sysObjectID'] == '.1.3.6.1.4.1.311.1.1.3.1.3') {
|
||||
// Datacenter
|
||||
if (Str::contains($device['sysDescr'], 'Build 14393')) {
|
||||
$version = 'Server 2016 Datacenter (NT 6.3)';
|
||||
} elseif (Str::contains($device['sysDescr'], 'Build 9600')) {
|
||||
$version = 'Server 2012 R2 Datacenter (NT 6.3)';
|
||||
} elseif (Str::contains($device['sysDescr'], 'Build 9200')) {
|
||||
$version = 'Server 2012 Datacenter (NT 6.2)';
|
||||
} elseif (Str::contains($device['sysDescr'], 'Build 7601')) {
|
||||
$version = 'Server 2008 Datacenter R2 SP1 (NT 6.1)';
|
||||
} elseif (Str::contains($device['sysDescr'], 'Build 7600')) {
|
||||
$version = 'Server 2008 Datacenter R2 (NT 6.1)';
|
||||
} elseif (Str::contains($device['sysDescr'], 'Build 6002')) {
|
||||
$version = 'Server 2008 Datacenter SP2 (NT 6.0)';
|
||||
} elseif (Str::contains($device['sysDescr'], 'Build 6001')) {
|
||||
$version = 'Server 2008 Datacenter (NT 6.0)';
|
||||
} elseif (Str::contains($device['sysDescr'], 'Build 3790')) {
|
||||
$version = 'Server 2003 Datacenter (NT 5.2)';
|
||||
} elseif (Str::contains($device['sysDescr'], 'Build 2195')) {
|
||||
$version = '2000 Datacenter Server (NT 5.0)';
|
||||
} elseif (Str::contains($device['sysDescr'], 'Build Number: 1381')) {
|
||||
$version = 'NT Datacenter 4.0';
|
||||
} elseif (Str::contains($device['sysDescr'], 'Build Number: 1057')) {
|
||||
$version = 'NT Datacenter 3.51';
|
||||
}
|
||||
}//end version if
|
||||
|
||||
if (Str::contains($device['sysDescr'], 'Multiprocessor')) {
|
||||
$features = 'Multiprocessor';
|
||||
} elseif (Str::contains($device['sysDescr'], 'Uniprocessor')) {
|
||||
$features = 'Uniprocessor';
|
||||
}
|
||||
|
||||
// Detect Dell hardware via OpenManage SNMP
|
||||
$hw = snmp_get($device, '.1.3.6.1.4.1.674.10892.1.300.10.1.9.1', '-Oqv', 'MIB-Dell-10892');
|
||||
$hw = trim(str_replace('"', '', $hw));
|
||||
if (! empty($hw)) {
|
||||
$hardware = 'Dell ' . $hw;
|
||||
|
||||
$serial = snmp_get($device, '.1.3.6.1.4.1.674.10892.1.300.10.1.11.1', '-Oqv', 'MIB-Dell-10892');
|
||||
$serial = trim(str_replace('"', '', $serial));
|
||||
} else {
|
||||
$hw = trim(snmp_get($device, 'cpqSiProductName.0', '-Oqv', 'CPQSINFO-MIB', 'hp'), '"');
|
||||
if (! empty($hw)) {
|
||||
$hardware = $hw;
|
||||
}
|
||||
}
|
23
tests/data/windows.json
Normal file
23
tests/data/windows.json
Normal file
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"os": {
|
||||
"discovery": {
|
||||
"devices": [
|
||||
{
|
||||
"sysName": "",
|
||||
"sysObjectID": ".1.3.6.1.4.1.311.1.1.3.1.2",
|
||||
"sysDescr": "Hardware: Intel64 Family 6 Model 26 Stepping 4 AT/AT COMPATIBLE - Software: Windows Version 6.1 (Build 7601 Multiprocessor Free)",
|
||||
"sysContact": null,
|
||||
"version": "Server 2008 R2 SP1 (NT 6.1)",
|
||||
"hardware": "Dell PowerEdge 2650",
|
||||
"features": "Multiprocessor",
|
||||
"os": "windows",
|
||||
"type": "server",
|
||||
"serial": "1234567",
|
||||
"icon": "windows.svg",
|
||||
"location": null
|
||||
}
|
||||
]
|
||||
},
|
||||
"poller": "matches discovery"
|
||||
}
|
||||
}
|
23
tests/data/windows_1057c.json
Normal file
23
tests/data/windows_1057c.json
Normal file
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"os": {
|
||||
"discovery": {
|
||||
"devices": [
|
||||
{
|
||||
"sysName": "",
|
||||
"sysObjectID": ".1.3.6.1.4.1.311.1.1.3.1.1",
|
||||
"sysDescr": "Hardware: x86 Family 6 Model 3 Stepping 4 AT/AT COMPATIBLE - Software: Windows NT Version 3.51 (Build Number: 1057 Multiprocessor Free )",
|
||||
"sysContact": null,
|
||||
"version": "NT 3.51 Workstation",
|
||||
"hardware": "Generic x86",
|
||||
"features": "Multiprocessor",
|
||||
"os": "windows",
|
||||
"type": "server",
|
||||
"serial": null,
|
||||
"icon": "windows.svg",
|
||||
"location": null
|
||||
}
|
||||
]
|
||||
},
|
||||
"poller": "matches discovery"
|
||||
}
|
||||
}
|
23
tests/data/windows_1381s.json
Normal file
23
tests/data/windows_1381s.json
Normal file
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"os": {
|
||||
"discovery": {
|
||||
"devices": [
|
||||
{
|
||||
"sysName": "",
|
||||
"sysObjectID": ".1.3.6.1.4.1.311.1.1.3.1.2",
|
||||
"sysDescr": "Hardware: x86 Family 6 Model 1 Stepping 9 AT/AT COMPATIBLE - Software: Windows NT Version 4.0 (Build Number: 1381 Multiprocessor Free )",
|
||||
"sysContact": null,
|
||||
"version": "NT Server 4.0",
|
||||
"hardware": "Generic x86",
|
||||
"features": "Multiprocessor",
|
||||
"os": "windows",
|
||||
"type": "server",
|
||||
"serial": null,
|
||||
"icon": "windows.svg",
|
||||
"location": null
|
||||
}
|
||||
]
|
||||
},
|
||||
"poller": "matches discovery"
|
||||
}
|
||||
}
|
23
tests/data/windows_2195d.json
Normal file
23
tests/data/windows_2195d.json
Normal file
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"os": {
|
||||
"discovery": {
|
||||
"devices": [
|
||||
{
|
||||
"sysName": "",
|
||||
"sysObjectID": ".1.3.6.1.4.1.311.1.1.3.1.3",
|
||||
"sysDescr": "Hardware: x86 Family 15 Model 2 Stepping 5 AT/AT COMPATIBLE - Software: Windows 2000 Version 5.0 (Build 2195 Multiprocessor Free)",
|
||||
"sysContact": null,
|
||||
"version": "2000 Datacenter Server (NT 5.0)",
|
||||
"hardware": "ProLiant ML350 Gen6",
|
||||
"features": "Multiprocessor",
|
||||
"os": "windows",
|
||||
"type": "server",
|
||||
"serial": "AB123456CD",
|
||||
"icon": "windows.svg",
|
||||
"location": null
|
||||
}
|
||||
]
|
||||
},
|
||||
"poller": "matches discovery"
|
||||
}
|
||||
}
|
23
tests/data/windows_2600c.json
Normal file
23
tests/data/windows_2600c.json
Normal file
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"os": {
|
||||
"discovery": {
|
||||
"devices": [
|
||||
{
|
||||
"sysName": "",
|
||||
"sysObjectID": ".1.3.6.1.4.1.311.1.1.3.1.1",
|
||||
"sysDescr": "Hardware: x86 Family 16 Model 4 Stepping 2 AT/AT COMPATIBLE - Software: Windows 2000 Version 5.1 (Build 2600 Multiprocessor Free)",
|
||||
"sysContact": null,
|
||||
"version": "XP (NT 5.1)",
|
||||
"hardware": "Generic x86",
|
||||
"features": "Multiprocessor",
|
||||
"os": "windows",
|
||||
"type": "server",
|
||||
"serial": null,
|
||||
"icon": "windows.svg",
|
||||
"location": null
|
||||
}
|
||||
]
|
||||
},
|
||||
"poller": "matches discovery"
|
||||
}
|
||||
}
|
23
tests/data/windows_3790s.json
Normal file
23
tests/data/windows_3790s.json
Normal file
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"os": {
|
||||
"discovery": {
|
||||
"devices": [
|
||||
{
|
||||
"sysName": "",
|
||||
"sysObjectID": ".1.3.6.1.4.1.311.1.1.3.1.2",
|
||||
"sysDescr": "Hardware: EM64T Family 6 Model 26 Stepping 5 AT/AT COMPATIBLE - Software: Windows Version 5.2 (Build 3790 Multiprocessor Free)",
|
||||
"sysContact": null,
|
||||
"version": "Server 2003 (NT 5.2)",
|
||||
"hardware": "Intel x64",
|
||||
"features": "Multiprocessor",
|
||||
"os": "windows",
|
||||
"type": "server",
|
||||
"serial": null,
|
||||
"icon": "windows.svg",
|
||||
"location": null
|
||||
}
|
||||
]
|
||||
},
|
||||
"poller": "matches discovery"
|
||||
}
|
||||
}
|
23
tests/data/windows_6002c.json
Normal file
23
tests/data/windows_6002c.json
Normal file
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"os": {
|
||||
"discovery": {
|
||||
"devices": [
|
||||
{
|
||||
"sysName": "",
|
||||
"sysObjectID": ".1.3.6.1.4.1.311.1.1.3.1.1",
|
||||
"sysDescr": "Hardware: AMD64 Family 16 Model 2 Stepping 3 AT/AT COMPATIBLE - Software: Windows Version 6.0 (Build 6002 Multiprocessor Free)",
|
||||
"sysContact": null,
|
||||
"version": "Vista SP2 (NT 6.0)",
|
||||
"hardware": "AMD x64",
|
||||
"features": "Multiprocessor",
|
||||
"os": "windows",
|
||||
"type": "server",
|
||||
"serial": null,
|
||||
"icon": "windows.svg",
|
||||
"location": null
|
||||
}
|
||||
]
|
||||
},
|
||||
"poller": "matches discovery"
|
||||
}
|
||||
}
|
23
tests/data/windows_7600c.json
Normal file
23
tests/data/windows_7600c.json
Normal file
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"os": {
|
||||
"discovery": {
|
||||
"devices": [
|
||||
{
|
||||
"sysName": "",
|
||||
"sysObjectID": ".1.3.6.1.4.1.311.1.1.3.1.1",
|
||||
"sysDescr": "Hardware: AMD64 Family 16 Model 8 Stepping 0 AT/AT COMPATIBLE - Software: Windows Version 6.1 (Build 7600 Multiprocessor Free)",
|
||||
"sysContact": null,
|
||||
"version": "7 (NT 6.1)",
|
||||
"hardware": "AMD x64",
|
||||
"features": "Multiprocessor",
|
||||
"os": "windows",
|
||||
"type": "server",
|
||||
"serial": null,
|
||||
"icon": "windows.svg",
|
||||
"location": null
|
||||
}
|
||||
]
|
||||
},
|
||||
"poller": "matches discovery"
|
||||
}
|
||||
}
|
23
tests/data/windows_7600s.json
Normal file
23
tests/data/windows_7600s.json
Normal file
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"os": {
|
||||
"discovery": {
|
||||
"devices": [
|
||||
{
|
||||
"sysName": "",
|
||||
"sysObjectID": ".1.3.6.1.4.1.311.1.1.3.1.2",
|
||||
"sysDescr": "Hardware: Intel64 Family 6 Model 23 Stepping 6 AT/AT COMPATIBLE - Software: Windows Version 6.1 (Build 7600 Multiprocessor Free)",
|
||||
"sysContact": null,
|
||||
"version": "Server 2008 R2 (NT 6.1)",
|
||||
"hardware": "Intel x64",
|
||||
"features": "Multiprocessor",
|
||||
"os": "windows",
|
||||
"type": "server",
|
||||
"serial": null,
|
||||
"icon": "windows.svg",
|
||||
"location": null
|
||||
}
|
||||
]
|
||||
},
|
||||
"poller": "matches discovery"
|
||||
}
|
||||
}
|
23
tests/data/windows_9600d.json
Normal file
23
tests/data/windows_9600d.json
Normal file
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"os": {
|
||||
"discovery": {
|
||||
"devices": [
|
||||
{
|
||||
"sysName": "",
|
||||
"sysObjectID": ".1.3.6.1.4.1.311.1.1.3.1.3",
|
||||
"sysDescr": "Hardware: AMD64 Family 16 Model 2 Stepping 3 AT/AT COMPATIBLE - Software: Windows Version 6.3 (Build 9600 Multiprocessor Free)",
|
||||
"sysContact": null,
|
||||
"version": "Server 2012 R2 Datacenter (NT 6.3)",
|
||||
"hardware": "AMD x64",
|
||||
"features": "Multiprocessor",
|
||||
"os": "windows",
|
||||
"type": "server",
|
||||
"serial": null,
|
||||
"icon": "windows.svg",
|
||||
"location": null
|
||||
}
|
||||
]
|
||||
},
|
||||
"poller": "matches discovery"
|
||||
}
|
||||
}
|
@@ -1,2 +1,4 @@
|
||||
1.3.6.1.2.1.1.1.0|4|Hardware: Intel64 Family 6 Model 26 Stepping 4 AT/AT COMPATIBLE - Software: Windows Version 6.1 (Build 7601 Multiprocessor Free)
|
||||
1.3.6.1.2.1.1.2.0|6|1.3.6.1.4.1.311.1.1.3.1.2
|
||||
1.3.6.1.4.1.674.10892.1.300.10.1.9.1|4|PowerEdge 2650
|
||||
1.3.6.1.4.1.674.10892.1.300.10.1.11.1|4|1234567
|
||||
|
2
tests/snmpsim/windows_1057c.snmprec
Normal file
2
tests/snmpsim/windows_1057c.snmprec
Normal file
@@ -0,0 +1,2 @@
|
||||
1.3.6.1.2.1.1.1.0|4|Hardware: x86 Family 6 Model 3 Stepping 4 AT/AT COMPATIBLE - Software: Windows NT Version 3.51 (Build Number: 1057 Multiprocessor Free )
|
||||
1.3.6.1.2.1.1.2.0|6|1.3.6.1.4.1.311.1.1.3.1.1
|
2
tests/snmpsim/windows_1381s.snmprec
Normal file
2
tests/snmpsim/windows_1381s.snmprec
Normal file
@@ -0,0 +1,2 @@
|
||||
1.3.6.1.2.1.1.1.0|4|Hardware: x86 Family 6 Model 1 Stepping 9 AT/AT COMPATIBLE - Software: Windows NT Version 4.0 (Build Number: 1381 Multiprocessor Free )
|
||||
1.3.6.1.2.1.1.2.0|6|1.3.6.1.4.1.311.1.1.3.1.2
|
4
tests/snmpsim/windows_2195d.snmprec
Normal file
4
tests/snmpsim/windows_2195d.snmprec
Normal file
@@ -0,0 +1,4 @@
|
||||
1.3.6.1.2.1.1.1.0|4|Hardware: x86 Family 15 Model 2 Stepping 5 AT/AT COMPATIBLE - Software: Windows 2000 Version 5.0 (Build 2195 Multiprocessor Free)
|
||||
1.3.6.1.2.1.1.2.0|6|1.3.6.1.4.1.311.1.1.3.1.3
|
||||
1.3.6.1.4.1.232.2.2.2.1.0|4|AB123456CD
|
||||
1.3.6.1.4.1.232.2.2.4.2.0|4|ProLiant ML350 Gen6
|
2
tests/snmpsim/windows_2600c.snmprec
Normal file
2
tests/snmpsim/windows_2600c.snmprec
Normal file
@@ -0,0 +1,2 @@
|
||||
1.3.6.1.2.1.1.1.0|4|Hardware: x86 Family 16 Model 4 Stepping 2 AT/AT COMPATIBLE - Software: Windows 2000 Version 5.1 (Build 2600 Multiprocessor Free)
|
||||
1.3.6.1.2.1.1.2.0|6|1.3.6.1.4.1.311.1.1.3.1.1
|
2
tests/snmpsim/windows_3790s.snmprec
Normal file
2
tests/snmpsim/windows_3790s.snmprec
Normal file
@@ -0,0 +1,2 @@
|
||||
1.3.6.1.2.1.1.1.0|4|Hardware: EM64T Family 6 Model 26 Stepping 5 AT/AT COMPATIBLE - Software: Windows Version 5.2 (Build 3790 Multiprocessor Free)
|
||||
1.3.6.1.2.1.1.2.0|6|1.3.6.1.4.1.311.1.1.3.1.2
|
2
tests/snmpsim/windows_6002c.snmprec
Normal file
2
tests/snmpsim/windows_6002c.snmprec
Normal file
@@ -0,0 +1,2 @@
|
||||
1.3.6.1.2.1.1.1.0|4|Hardware: AMD64 Family 16 Model 2 Stepping 3 AT/AT COMPATIBLE - Software: Windows Version 6.0 (Build 6002 Multiprocessor Free)
|
||||
1.3.6.1.2.1.1.2.0|6|1.3.6.1.4.1.311.1.1.3.1.1
|
2
tests/snmpsim/windows_7600c.snmprec
Normal file
2
tests/snmpsim/windows_7600c.snmprec
Normal file
@@ -0,0 +1,2 @@
|
||||
1.3.6.1.2.1.1.1.0|4|Hardware: AMD64 Family 16 Model 8 Stepping 0 AT/AT COMPATIBLE - Software: Windows Version 6.1 (Build 7600 Multiprocessor Free)
|
||||
1.3.6.1.2.1.1.2.0|6|1.3.6.1.4.1.311.1.1.3.1.1
|
2
tests/snmpsim/windows_7600s.snmprec
Normal file
2
tests/snmpsim/windows_7600s.snmprec
Normal file
@@ -0,0 +1,2 @@
|
||||
1.3.6.1.2.1.1.1.0|4|Hardware: Intel64 Family 6 Model 23 Stepping 6 AT/AT COMPATIBLE - Software: Windows Version 6.1 (Build 7600 Multiprocessor Free)
|
||||
1.3.6.1.2.1.1.2.0|6|1.3.6.1.4.1.311.1.1.3.1.2
|
Reference in New Issue
Block a user