Commit version 24.12.13800
This commit is contained in:
@ -1,27 +0,0 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Observium
|
||||
*
|
||||
* This file is part of Observium.
|
||||
*
|
||||
* @package observium
|
||||
* @subpackage poller
|
||||
* @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2019 Observium Limited
|
||||
*
|
||||
*/
|
||||
|
||||
//ACD-DESC-MIB::acdDescCommercialName.0 = STRING: AMO-10000-NE
|
||||
//ACD-DESC-MIB::acdDescMacBaseAddr.0 = STRING: 30:30:3a:31:35:3a:41:44:3a:30:38:3a:45:46:3a:35:38
|
||||
//ACD-DESC-MIB::acdDescIdentifier.0 = STRING: G080-0157
|
||||
//ACD-DESC-MIB::acdDescFirmwareVersion.0 = STRING: AMO_10GE_5.3.1.1_23046
|
||||
//ACD-DESC-MIB::acdDescHardwareVersion.0 = STRING: 500-018-03:9:16
|
||||
|
||||
$data = snmp_get_multi_oid($device, 'acdDescFirmwareVersion.0', array(), 'ACD-DESC-MIB');
|
||||
$version = $data[0]['acdDescFirmwareVersion'];
|
||||
if (preg_match('/^(\w[^_\W]+_)*(?<version>[\d\.\-]+)/', $version, $matches))
|
||||
{
|
||||
$version = $matches['version'];
|
||||
}
|
||||
|
||||
// EOF
|
@ -6,60 +6,10 @@
|
||||
*
|
||||
* @package observium
|
||||
* @subpackage poller
|
||||
* @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2020 Observium Limited
|
||||
* @copyright (C) Adam Armstrong
|
||||
*
|
||||
*/
|
||||
|
||||
// FIXME. I'm not sure that it works correctly
|
||||
// The ACE I could find have sysDescr "ACEdirector 3", so most of the sysDescr magic below won't do anything.
|
||||
// Hardware through sysObjectID works though.
|
||||
|
||||
$poll_device['sysDescr'] = str_replace('IOS (tm)', 'IOS (tm),', $poll_device['sysDescr']);
|
||||
$poll_device['sysDescr'] = str_replace(') RELEASE', '), RELEASE', $poll_device['sysDescr']);
|
||||
|
||||
echo("\n".$poll_device['sysDescr']."\n");
|
||||
|
||||
list(,$features,$version) = explode(',', $poll_device['sysDescr']);
|
||||
|
||||
$version = str_replace(' Version ', '', $version);
|
||||
list(,$features) = explode('(', $features);
|
||||
list(,$features) = explode('-', $features);
|
||||
|
||||
/* FIXME I not think that this is actial
|
||||
if ($entPhysical['entPhysicalContainedIn'] === '0')
|
||||
{
|
||||
if (!empty($entPhysical['entPhysicalSoftwareRev']))
|
||||
{
|
||||
$version = $entPhysical['entPhysicalSoftwareRev'];
|
||||
}
|
||||
if (!empty($entPhysical['entPhysicalModelName']))
|
||||
{
|
||||
$hardware = $entPhysical['entPhysicalModelName'];
|
||||
} else {
|
||||
$hardware = $entPhysical['entPhysicalName'];
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
list($version) = explode(',', $version);
|
||||
|
||||
# if ($slot_1 == '-1' && strpos($descr_1, 'No') === FALSE) { $ciscomodel = $descr_1; }
|
||||
# if (($contained_1 == '0' || $name_1 == 'Chassis') && strpos($model_1, 'No') === FALSE) { $ciscomodel = $model_1; list($version_1) = explode(',',$ver_1); }
|
||||
# if ($contained_1001 == '0' && strpos($model_1001, 'No') === FALSE) { $ciscomodel = $model_1001; }
|
||||
# $ciscomodel = str_replace('"', '',$ciscomodel);
|
||||
# if ($ciscomodel) { $hardware = $ciscomodel; unset($ciscomodel); }
|
||||
|
||||
if ($hardware == '') { $hardware = snmp_get($device, 'sysObjectID.0', '-Osqv', 'SNMPv2-MIB:CISCO-PRODUCTS-MIB:ALTEON-ROOT-MIB'); }
|
||||
|
||||
#if(isset($cisco_hardware_oids[$poll_device['sysObjectID']])) { $hardware = $cisco_hardware_oids[$poll_device['sysObjectID']]; }
|
||||
|
||||
if (strpos($poll_device['sysDescr'], 'IOS XR'))
|
||||
{
|
||||
list(,$version) = explode(',', $poll_device['sysDescr']);
|
||||
$version = trim($version);
|
||||
list(,$version) = explode(' ', $version);
|
||||
list($version) = explode("\n", $version);
|
||||
trim($version);
|
||||
}
|
||||
include __DIR__ . '/cisco.inc.php';
|
||||
|
||||
// EOF
|
||||
|
@ -4,9 +4,9 @@
|
||||
*
|
||||
* This file is part of Observium.
|
||||
*
|
||||
* @package observium
|
||||
* @subpackage poller
|
||||
* @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2022 Observium Limited
|
||||
* @package observium
|
||||
* @subpackage poller
|
||||
* @copyright (C) Adam Armstrong
|
||||
*
|
||||
*/
|
||||
|
||||
@ -16,18 +16,18 @@
|
||||
// IEEE802dot11-MIB::dot11manufacturerProductVersion[5] = STRING: XW.ar934x.v6.1.9.32918.190108.1737
|
||||
|
||||
if ($hw = snmp_getnext_oid($device, 'dot11manufacturerProductName', 'IEEE802dot11-MIB')) {
|
||||
$hardware = $hw;
|
||||
$hardware = $hw;
|
||||
|
||||
if ($ver = snmp_getnext_oid($device, 'dot11manufacturerProductVersion', 'IEEE802dot11-MIB')) {
|
||||
list(,$version) = explode(".v", $ver, 2);
|
||||
$version = implode('.', array_slice(explode('.', $version), 0, 4)); // Leave only first 4 numbers: 8.7.0.42152.200203.1256 -> 8.7.0.42152
|
||||
}
|
||||
if ($ver = snmp_getnext_oid($device, 'dot11manufacturerProductVersion', 'IEEE802dot11-MIB')) {
|
||||
[, $version] = explode(".v", $ver, 2);
|
||||
$version = implode('.', array_slice(explode('.', $version), 0, 4)); // Leave only first 4 numbers: 8.7.0.42152.200203.1256 -> 8.7.0.42152
|
||||
}
|
||||
|
||||
if (safe_empty($serial) && ($mac = snmp_getnext_oid($device, 'dot11MACAddress', 'IEEE802dot11-MIB')) &&
|
||||
is_valid_param($mac, 'serial')) {
|
||||
// Not real hardware serial, but use mac as serial
|
||||
$serial = str_replace(':', '', $mac);
|
||||
}
|
||||
if (safe_empty($serial) && ($mac = snmp_getnext_oid($device, 'dot11MACAddress', 'IEEE802dot11-MIB')) &&
|
||||
is_valid_param($mac, 'serial')) {
|
||||
// Not real hardware serial, but use mac as serial
|
||||
$serial = str_replace(':', '', $mac);
|
||||
}
|
||||
}
|
||||
|
||||
// EOF
|
||||
|
@ -5,50 +5,44 @@
|
||||
*
|
||||
* This file is part of Observium.
|
||||
*
|
||||
* @package observium
|
||||
* @subpackage poller
|
||||
* @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2019 Observium Limited
|
||||
* @package observium
|
||||
* @subpackage poller
|
||||
* @copyright (C) Adam Armstrong
|
||||
*
|
||||
*/
|
||||
|
||||
// Allied Telesis have somewhat messy MIBs. It's often hard to work out what is where. :)
|
||||
if (!$hardware)
|
||||
{
|
||||
// AtiSwitch-MIB::atiswitchProductType.0 = INTEGER: at8024GB(2)
|
||||
// AtiSwitch-MIB::atiswitchSw.0 = STRING: AT-S39
|
||||
// AtiSwitch-MIB::atiswitchSwVersion.0 = STRING: v3.3.0
|
||||
if (!$hardware) {
|
||||
// AtiSwitch-MIB::atiswitchProductType.0 = INTEGER: at8024GB(2)
|
||||
// AtiSwitch-MIB::atiswitchSw.0 = STRING: AT-S39
|
||||
// AtiSwitch-MIB::atiswitchSwVersion.0 = STRING: v3.3.0
|
||||
|
||||
$hardware = snmp_get($device, 'atiswitchProductType.0', '-OsvQU', 'AtiSwitch-MIB');
|
||||
if ($hardware)
|
||||
{
|
||||
$version = snmp_get($device, 'atiswitchSwVersion.0', '-OsvQU', 'AtiSwitch-MIB');
|
||||
$features = snmp_get($device, 'atiswitchSw.0', '-OsvQU', 'AtiSwitch-MIB');
|
||||
$hardware = snmp_get($device, 'atiswitchProductType.0', '-OsvQU', 'AtiSwitch-MIB');
|
||||
if ($hardware) {
|
||||
$version = snmp_get($device, 'atiswitchSwVersion.0', '-OsvQU', 'AtiSwitch-MIB');
|
||||
$features = snmp_get($device, 'atiswitchSw.0', '-OsvQU', 'AtiSwitch-MIB');
|
||||
|
||||
$hardware = str_replace('at', 'AT-', $hardware);
|
||||
$version = str_replace('v', '', $version);
|
||||
} else {
|
||||
// AtiL2-MIB::atiL2SwProduct.0 = STRING: "AT-8326GB"
|
||||
// AtiL2-MIB::atiL2SwVersion.0 = STRING: "AT-S41 v1.1.6 "
|
||||
$hardware = snmp_get($device, 'atiL2SwProduct.0', '-OsvQU', 'AtiL2-MIB');
|
||||
if ($hardware)
|
||||
{
|
||||
$version = snmp_get($device, 'atiL2SwVersion.0', '-OsvQU', 'AtiL2-MIB');
|
||||
$hardware = str_replace('at', 'AT-', $hardware);
|
||||
$version = str_replace('v', '', $version);
|
||||
} else {
|
||||
// AtiL2-MIB::atiL2SwProduct.0 = STRING: "AT-8326GB"
|
||||
// AtiL2-MIB::atiL2SwVersion.0 = STRING: "AT-S41 v1.1.6 "
|
||||
$hardware = snmp_get($device, 'atiL2SwProduct.0', '-OsvQU', 'AtiL2-MIB');
|
||||
if ($hardware) {
|
||||
$version = snmp_get($device, 'atiL2SwVersion.0', '-OsvQU', 'AtiL2-MIB');
|
||||
|
||||
list($features, $version) = explode(' ', $version);
|
||||
$version = str_replace('v', '', $version);
|
||||
[$features, $version] = explode(' ', $version);
|
||||
$version = str_replace('v', '', $version);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (!$version)
|
||||
{
|
||||
// Same as above
|
||||
$version = snmp_get($device, 'atiswitchSwVersion.0', '-OsvQU', 'AtiSwitch-MIB');
|
||||
if (!$version)
|
||||
{
|
||||
$version = snmp_get($device, 'atiL2SwVersion.0', '-OsvQU', 'AtiL2-MIB');
|
||||
list($features, $version) = explode(' ', $version);
|
||||
}
|
||||
$version = str_replace('v', '', $version);
|
||||
} elseif (!$version) {
|
||||
// Same as above
|
||||
$version = snmp_get($device, 'atiswitchSwVersion.0', '-OsvQU', 'AtiSwitch-MIB');
|
||||
if (!$version) {
|
||||
$version = snmp_get($device, 'atiL2SwVersion.0', '-OsvQU', 'AtiL2-MIB');
|
||||
[$features, $version] = explode(' ', $version);
|
||||
}
|
||||
$version = str_replace('v', '', $version);
|
||||
}
|
||||
|
||||
// EOF
|
||||
|
@ -4,12 +4,14 @@
|
||||
*
|
||||
* This file is part of Observium.
|
||||
*
|
||||
* @package observium
|
||||
* @subpackage poller
|
||||
* @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2020 Observium Limited
|
||||
* @package observium
|
||||
* @subpackage poller
|
||||
* @copyright (C) Adam Armstrong
|
||||
*
|
||||
*/
|
||||
|
||||
if (!$hardware) { $hardware = 'AW+'; }
|
||||
if (!$hardware) {
|
||||
$hardware = 'AW+';
|
||||
}
|
||||
|
||||
// EOF
|
||||
|
@ -1,21 +1,15 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Observium
|
||||
*
|
||||
* This file is part of Observium.
|
||||
*
|
||||
* @package observium
|
||||
* @subpackage poller
|
||||
* @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2019 Observium Limited
|
||||
* @package observium
|
||||
* @subpackage poller
|
||||
* @copyright (C) Adam Armstrong
|
||||
*
|
||||
*/
|
||||
|
||||
$hardware = rewrite_definition_hardware($device, $poll_device['sysObjectID']);
|
||||
|
||||
//preg_match('/(?:Alcatel-Lucent\ |)(?P<hardware>[\w\-\ ]*)(?P<version>(?:\d+\.){2,}\w+)/', $poll_device['sysDescr'], $matches);
|
||||
//$hardware = trim($matches['hardware']);
|
||||
//if ($hardware === '') { $hardware = 'Generic'; }
|
||||
//$version = $matches['version'];
|
||||
$hardware = get_model_param($device, 'hardware', $poll_device['sysObjectID']);
|
||||
|
||||
// EOF
|
||||
|
@ -5,9 +5,9 @@
|
||||
*
|
||||
* This file is part of Observium.
|
||||
*
|
||||
* @package observium
|
||||
* @subpackage poller
|
||||
* @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2019 Observium Limited
|
||||
* @package observium
|
||||
* @subpackage poller
|
||||
* @copyright (C) Adam Armstrong
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -6,112 +6,264 @@
|
||||
*
|
||||
* @package observium
|
||||
* @subpackage poller
|
||||
* @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2021 Observium Limited
|
||||
* @copyright (C) Adam Armstrong
|
||||
*
|
||||
*/
|
||||
|
||||
if (match_oid_num($device['sysObjectID'], '.1.3.6.1.4.1.5528')) {
|
||||
// Exclude old netbotz
|
||||
return;
|
||||
// Exclude old netbotz
|
||||
|
||||
// These oids are in APC's "experimental" tree
|
||||
// PowerNet-Discovery-MIB::apcDiscoveryDeviceSerialNumber.1 = STRING: 00:C0:B7:8E:94:2F
|
||||
// PowerNet-Discovery-MIB::apcDiscoveryDeviceSerialNumber.2 = STRING: 00:C0:B7:8E:94:2F
|
||||
// PowerNet-Discovery-MIB::apcDiscoveryFirmwareName.1 = STRING: apc_bw04_aos_440.bin
|
||||
// PowerNet-Discovery-MIB::apcDiscoveryFirmwareName.2 = STRING: apc_bw04_bw_440.bin
|
||||
// PowerNet-Discovery-MIB::apcDiscoveryFirmwareRevision.1 = STRING: V4.4.0(20140827_1358)
|
||||
// PowerNet-Discovery-MIB::apcDiscoveryFirmwareRevision.2 = STRING: V4.4.0(20140827_1358)
|
||||
|
||||
if (empty($version) && $AOSrev = snmp_get_oid($device, 'apcDiscoveryFirmwareRevision.1', 'PowerNet-Discovery-MIB')) {
|
||||
$version = explode('(', ltrim($AOSrev, 'vV'))[0];
|
||||
$serial = snmp_get_oid($device, 'apcDiscoveryDeviceSerialNumber.1', 'PowerNet-Discovery-MIB');
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
if (match_oid_num($device['sysObjectID'], '.1.3.6.1.4.1.52674')) {
|
||||
// Exclude netbotz v5
|
||||
|
||||
// These oids are in APC's "experimental" tree
|
||||
// PowerNet-Discovery-MIB::apcDiscoveryDeviceSerialNumber.1 = STRING: QA19241XXXXX
|
||||
// PowerNet-Discovery-MIB::apcDiscoveryFirmwareName.1 = STRING: env_mon_nb075x
|
||||
// PowerNet-Discovery-MIB::apcDiscoveryFirmwareRevision.1 = STRING: 5.2.0.3061
|
||||
if (empty($version) && $AOSrev = snmp_get_oid($device, 'apcDiscoveryFirmwareRevision.1', 'PowerNet-Discovery-MIB')) {
|
||||
$version = explode('(', ltrim($AOSrev, 'vV'))[0];
|
||||
$serial = snmp_get_oid($device, 'apcDiscoveryDeviceSerialNumber.1', 'PowerNet-Discovery-MIB');
|
||||
}
|
||||
|
||||
// PowerNet-Discovery-MIB::apcDiscoveryModel.1 = STRING: NetBotz Rack Monitor 750
|
||||
// PowerNet-Discovery-MIB::apcDiscoverySerialNumber.1 = STRING: QA192417XXXXX
|
||||
// PowerNet-Discovery-MIB::apcDiscoveryStatus.1 = INTEGER: deviceNormal(2)
|
||||
// PowerNet-Discovery-MIB::apcDiscoveryLabelString.1 = STRING: NetBotz Rack Monitor 750
|
||||
if (empty($hardware) && $hw = snmp_get_oid($device, 'apcDiscoveryModel.1', 'PowerNet-Discovery-MIB')) {
|
||||
$hardware = $hw;
|
||||
//$serial = snmp_get_oid($device, 'apcDiscoverySerialNumber.1', 'PowerNet-Discovery-MIB');
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
// PowerNet-MIB::networkAir
|
||||
if (match_oid_num($device['sysObjectID'], '.1.3.6.1.4.1.318.1.3.14')) {
|
||||
// Cooling units use different hardware/serial table
|
||||
// Cooling units use different hardware/serial table
|
||||
|
||||
// PowerNet-MIB::coolingUnitAboutDescription.1.1 = STRING: "Model Number"
|
||||
// PowerNet-MIB::coolingUnitAboutDescription.1.2 = STRING: "Serial Number"
|
||||
// PowerNet-MIB::coolingUnitAboutDescription.1.3 = STRING: "Firmware Revision"
|
||||
// PowerNet-MIB::coolingUnitAboutDescription.1.4 = STRING: "Hardware Revision"
|
||||
// PowerNet-MIB::coolingUnitAboutDescription.1.5 = STRING: "Manufacture Date"
|
||||
// PowerNet-MIB::coolingUnitAboutDescription.1.6 = STRING: "Application Version"
|
||||
// PowerNet-MIB::coolingUnitAboutDescription.1.7 = STRING: "OS Version"
|
||||
// PowerNet-MIB::coolingUnitAboutDescription.1.8 = STRING: "APC Boot Monitor"
|
||||
// PowerNet-MIB::coolingUnitAboutValue.1.1 = STRING: "ACRC301S"
|
||||
// PowerNet-MIB::coolingUnitAboutValue.1.2 = STRING: "JK161600XXXX"
|
||||
// PowerNet-MIB::coolingUnitAboutValue.1.3 = STRING: "1.4.2"
|
||||
// PowerNet-MIB::coolingUnitAboutValue.1.4 = STRING: "01"
|
||||
// PowerNet-MIB::coolingUnitAboutValue.1.5 = STRING: "04/20/2016"
|
||||
// PowerNet-MIB::coolingUnitAboutValue.1.6 = STRING: "v6.1.0"
|
||||
// PowerNet-MIB::coolingUnitAboutValue.1.7 = STRING: "v6.1.0"
|
||||
// PowerNet-MIB::coolingUnitAboutValue.1.8 = STRING: "v1.0.8"
|
||||
$coolingUnitAboutTable = snmpwalk_cache_twopart_oid($device, 'coolingUnitAboutTable', [], 'PowerNet-MIB');
|
||||
foreach ($coolingUnitAboutTable[1] as $entry) {
|
||||
switch ($entry['coolingUnitAboutDescription']) {
|
||||
case 'Model Number':
|
||||
$hardware = $entry['coolingUnitAboutValue'];
|
||||
break;
|
||||
case 'Serial Number':
|
||||
$serial = $entry['coolingUnitAboutValue'];
|
||||
break;
|
||||
case 'Firmware Revision': // or 'OS Version'?
|
||||
$version = $entry['coolingUnitAboutValue'];
|
||||
break;
|
||||
case 'Hardware Revision':
|
||||
if ($hardware) {
|
||||
$hardware .= ' ' . $entry['coolingUnitAboutValue'];
|
||||
// PowerNet-Discovery-MIB::apcDiscoveryModel.1 = STRING: RC
|
||||
// PowerNet-Discovery-MIB::apcDiscoverySerialNumber.1 = STRING: JK161600XXXX
|
||||
// PowerNet-Discovery-MIB::apcDiscoveryStatus.1 = INTEGER: deviceNormal(2)
|
||||
// PowerNet-Discovery-MIB::apcDiscoveryLabelString.1 = STRING: RC
|
||||
|
||||
// PowerNet-MIB::coolingUnitAboutDescription.1.1 = STRING: "Model Number"
|
||||
// PowerNet-MIB::coolingUnitAboutDescription.1.2 = STRING: "Serial Number"
|
||||
// PowerNet-MIB::coolingUnitAboutDescription.1.3 = STRING: "Firmware Revision"
|
||||
// PowerNet-MIB::coolingUnitAboutDescription.1.4 = STRING: "Hardware Revision"
|
||||
// PowerNet-MIB::coolingUnitAboutDescription.1.5 = STRING: "Manufacture Date"
|
||||
// PowerNet-MIB::coolingUnitAboutDescription.1.6 = STRING: "Application Version"
|
||||
// PowerNet-MIB::coolingUnitAboutDescription.1.7 = STRING: "OS Version"
|
||||
// PowerNet-MIB::coolingUnitAboutDescription.1.8 = STRING: "APC Boot Monitor"
|
||||
// PowerNet-MIB::coolingUnitAboutValue.1.1 = STRING: "ACRC301S"
|
||||
// PowerNet-MIB::coolingUnitAboutValue.1.2 = STRING: "JK161600XXXX"
|
||||
// PowerNet-MIB::coolingUnitAboutValue.1.3 = STRING: "1.4.2"
|
||||
// PowerNet-MIB::coolingUnitAboutValue.1.4 = STRING: "01"
|
||||
// PowerNet-MIB::coolingUnitAboutValue.1.5 = STRING: "04/20/2016"
|
||||
// PowerNet-MIB::coolingUnitAboutValue.1.6 = STRING: "v6.1.0"
|
||||
// PowerNet-MIB::coolingUnitAboutValue.1.7 = STRING: "v6.1.0"
|
||||
// PowerNet-MIB::coolingUnitAboutValue.1.8 = STRING: "v1.0.8"
|
||||
$coolingUnitAboutTable = snmpwalk_cache_twopart_oid($device, 'coolingUnitAboutTable', [], 'PowerNet-MIB');
|
||||
foreach ($coolingUnitAboutTable[1] as $entry) {
|
||||
switch ($entry['coolingUnitAboutDescription']) {
|
||||
case 'Model Number':
|
||||
$hardware = $entry['coolingUnitAboutValue'];
|
||||
break;
|
||||
case 'Serial Number':
|
||||
$serial = $entry['coolingUnitAboutValue'];
|
||||
break;
|
||||
case 'Firmware Revision': // or 'OS Version'?
|
||||
$version = $entry['coolingUnitAboutValue'];
|
||||
break;
|
||||
case 'Hardware Revision':
|
||||
if ($hardware) {
|
||||
$hardware .= ' ' . $entry['coolingUnitAboutValue'];
|
||||
}
|
||||
break;
|
||||
case 'Application Version':
|
||||
$features = $entry['coolingUnitAboutValue'];
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case 'Application Version':
|
||||
$features = $entry['coolingUnitAboutValue'];
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Mostly hardware/version detected by sysDescr definitions
|
||||
if (empty($hardware))
|
||||
{
|
||||
$apc_oids = [
|
||||
'ups' => [ 'model' => 'upsBasicIdentModel', 'hwrev' => 'upsAdvIdentFirmwareRevision', 'fwrev' => 'upsAdvIdentFirmwareRevision' ], # UPS
|
||||
'ats' => [ 'model' => 'atsIdentModelNumber', 'hwrev' => 'atsIdentHardwareRev', 'fwrev' => 'atsIdentFirmwareRev' ], # ATS
|
||||
'rPDU' => [ 'model' => 'rPDUIdentModelNumber', 'hwrev' => 'rPDUIdentHardwareRev', 'fwrev' => 'rPDUIdentFirmwareRev' ], # PDU
|
||||
'rPDU2' => [ 'model' => 'rPDU2IdentModelNumber', 'hwrev' => 'rPDU2IdentHardwareRev', 'fwrev' => 'rPDU2IdentFirmwareRev' ], # PDU
|
||||
'sPDU' => [ 'model' => 'sPDUIdentModelNumber', 'hwrev' => 'sPDUIdentHardwareRev', 'fwrev' => 'sPDUIdentFirmwareRev' ], # Masterswitch/AP9606
|
||||
'ems' => [ 'model' => 'emsIdentProductNumber', 'hwrev' => 'emsIdentHardwareRev', 'fwrev' => 'emsIdentFirmwareRev' ], # NetBotz 200
|
||||
'airIRRC' => [ 'model' => 'airIRRCUnitIdentModelNumber', 'hwrev' => 'airIRRCUnitIdentHardwareRevision', 'fwrev' => 'airIRRCUnitIdentFirmwareRevision' ], # In-Row Chiller
|
||||
'airPA' => [ 'model' => 'airPAModelNumber', 'hwrev' => 'airPAHardwareRevision', 'fwrev' => 'airPAFirmwareRevision' ], # A/C
|
||||
//'xPDU' => [ 'model' => 'xPDUIdentModelNumber', 'hwrev' => 'xPDUIdentHardwareRev', 'fwrev' => 'xPDUIdentFirmwareAppRev' ], # PDU, moved to definitions
|
||||
'xATS' => [ 'model' => 'xATSIdentModelNumber', 'hwrev' => 'xATSIdentHardwareRev', 'fwrev' => 'xATSIdentFirmwareAppRev' ], # ATS
|
||||
'isx' => [ 'model' => 'isxModularPduIdentModelNumber', 'hwrev' => 'isxModularPduIdentMonitorCardHardwareRev', 'fwrev' => 'isxModularPduIdentMonitorCardFirmwareAppRev' ], # Modular PDU
|
||||
];
|
||||
if (empty($hardware)) {
|
||||
|
||||
// These oids are in APC's "experimental" tree, but there is no "real" UPS equivalent for the firmware versions.
|
||||
$AOSrev = snmp_get_oid($device, '.1.3.6.1.4.1.318.1.4.2.4.1.4.1', 'PowerNet-MIB');
|
||||
if ($AOSrev)
|
||||
{
|
||||
$version = $AOSrev;
|
||||
$features = snmp_get_oid($device, '.1.3.6.1.4.1.318.1.4.2.4.1.4.2', 'PowerNet-MIB');
|
||||
}
|
||||
$apc_oids = [
|
||||
# UPS
|
||||
// PowerNet-Discovery-MIB::apcDiscoveryModel.1 = STRING: Smart-UPS
|
||||
// PowerNet-Discovery-MIB::apcDiscoverySerialNumber.1 = STRING: AS11272XXXXX
|
||||
// PowerNet-Discovery-MIB::apcDiscoveryStatus.1 = INTEGER: deviceNormal(2)
|
||||
// PowerNet-Discovery-MIB::apcDiscoveryLabelString.1 = STRING: Smart-UPS 3000 XL
|
||||
'ups' => [
|
||||
'model' => 'upsBasicIdentModel',
|
||||
'hwrev' => 'upsAdvIdentFirmwareRevision',
|
||||
'fwrev' => 'upsAdvIdentFirmwareRevision',
|
||||
'serial' => 'upsAdvIdentSerialNumber'
|
||||
],
|
||||
# ATS
|
||||
// PowerNet-Discovery-MIB::apcDiscoveryModel.1 = STRING: ATS
|
||||
// PowerNet-Discovery-MIB::apcDiscoverySerialNumber.1 = STRING: 5A1910TXXXXX
|
||||
// PowerNet-Discovery-MIB::apcDiscoveryStatus.1 = INTEGER: deviceNormal(2)
|
||||
// PowerNet-Discovery-MIB::apcDiscoveryLabelString.1 = STRING: Automatic Transfer Switch
|
||||
'ats' => [
|
||||
'model' => 'atsIdentModelNumber',
|
||||
'hwrev' => 'atsIdentHardwareRev',
|
||||
'fwrev' => 'atsIdentFirmwareRev',
|
||||
'serial' => 'atsIdentSerialNumber'
|
||||
],
|
||||
# PDU
|
||||
'rPDU' => [
|
||||
'model' => 'rPDUIdentModelNumber',
|
||||
'hwrev' => 'rPDUIdentHardwareRev',
|
||||
'fwrev' => 'rPDUIdentFirmwareRev',
|
||||
'serial' => 'rPDUIdentSerialNumber'
|
||||
],
|
||||
# PDU2
|
||||
'rPDU2' => [
|
||||
'model' => 'rPDU2IdentModelNumber',
|
||||
'hwrev' => 'rPDU2IdentHardwareRev',
|
||||
'fwrev' => 'rPDU2IdentFirmwareRev',
|
||||
'serial' => 'rPDU2IdentSerialNumber'
|
||||
],
|
||||
# Masterswitch/AP9606
|
||||
'sPDU' => [
|
||||
'model' => 'sPDUIdentModelNumber',
|
||||
'hwrev' => 'sPDUIdentHardwareRev',
|
||||
'fwrev' => 'sPDUIdentFirmwareRev',
|
||||
'serial' => 'sPDUIdentSerialNumber'
|
||||
],
|
||||
# NetBotz 200/250
|
||||
'ems' => [
|
||||
'model' => 'emsIdentProductNumber',
|
||||
'hwrev' => 'emsIdentHardwareRev',
|
||||
'fwrev' => 'emsIdentFirmwareRev',
|
||||
'serial' => 'emsIdentSerialNumber'
|
||||
],
|
||||
# In-Row Chiller
|
||||
'airIRRC' => [
|
||||
'model' => 'airIRRCUnitIdentModelNumber',
|
||||
'hwrev' => 'airIRRCUnitIdentHardwareRevision',
|
||||
'fwrev' => 'airIRRCUnitIdentFirmwareRevision',
|
||||
'serial' => 'airIRRCUnitIdentSerialNumber'
|
||||
],
|
||||
# A/C
|
||||
'airPA' => [
|
||||
'model' => 'airPAModelNumber',
|
||||
'hwrev' => 'airPAHardwareRevision',
|
||||
'fwrev' => 'airPAFirmwareRevision',
|
||||
'serial' => 'airPASerialNumber'
|
||||
],
|
||||
# PDU, moved to definitions
|
||||
// 'xPDU' => [
|
||||
// 'model' => 'xPDUIdentModelNumber',
|
||||
// 'hwrev' => 'xPDUIdentHardwareRev',
|
||||
// 'fwrev' => 'xPDUIdentFirmwareAppRev',
|
||||
// 'serial' => 'xPDUIdentSerialNumber'
|
||||
// ],
|
||||
# ATS
|
||||
'xATS' => [
|
||||
'model' => 'xATSIdentModelNumber',
|
||||
'hwrev' => 'xATSIdentHardwareRev',
|
||||
'fwrev' => 'xATSIdentFirmwareAppRev',
|
||||
'serial' => 'xATSIdentSerialNumber'
|
||||
],
|
||||
# Modular PDU
|
||||
'isx' => [
|
||||
'model' => 'isxModularPduIdentModelNumber',
|
||||
'hwrev' => 'isxModularPduIdentMonitorCardHardwareRev',
|
||||
'fwrev' => 'isxModularPduIdentMonitorCardFirmwareAppRev',
|
||||
'serial' => 'isxModularPduIdentSerialNumber'
|
||||
],
|
||||
];
|
||||
$apc_keys = array_keys($apc_oids); // all keys
|
||||
|
||||
foreach ($apc_oids as $oid_list)
|
||||
{
|
||||
if (!$hardware)
|
||||
{
|
||||
$model = snmp_getnext_oid($device, $oid_list['model'], 'PowerNet-MIB');
|
||||
if (empty($model)) { continue; }
|
||||
// These oids are in APC's "experimental" tree, but there is no "real" UPS equivalent for the firmware versions.
|
||||
if (empty($version) && $AOSrev = snmp_get_oid($device, 'apcDiscoveryFirmwareRevision.1', 'PowerNet-Discovery-MIB')) {
|
||||
$version = $AOSrev;
|
||||
$serial = snmp_get_oid($device, 'apcDiscoveryDeviceSerialNumber.1', 'PowerNet-Discovery-MIB');
|
||||
$features = snmp_get_oid($device, 'apcDiscoveryModel.1', 'PowerNet-Discovery-MIB');
|
||||
if (preg_match('/^AP\d/', $features) &&
|
||||
$label = snmp_get_oid($device, 'apcDiscoveryLabelString.1', 'PowerNet-Discovery-MIB')) {
|
||||
// PowerNet-Discovery-MIB::apcDiscoveryModel.1 = STRING: AP8953
|
||||
// PowerNet-Discovery-MIB::apcDiscoverySerialNumber.1 = STRING: ZA10470XXXXX
|
||||
// PowerNet-Discovery-MIB::apcDiscoveryStatus.1 = INTEGER: deviceSevere(4)
|
||||
// PowerNet-Discovery-MIB::apcDiscoveryLabelString.1 = STRING: Switched Rack PDU
|
||||
$features = $label;
|
||||
}
|
||||
|
||||
$hardware = trim($model . ' ' . snmp_getnext_oid($device, $oid_list['hwrev'], 'PowerNet-MIB'));
|
||||
// Force known oids by model/features
|
||||
switch (TRUE) {
|
||||
case str_contains_array($features, [ 'Smart-UPS', 'Symmetra', 'GVSUPS', 'Galaxy' ]):
|
||||
$apc_keys = [ 'ups' ];
|
||||
break;
|
||||
|
||||
if (!$AOSrev)
|
||||
{
|
||||
$version = snmp_getnext_oid($device, $oid_list['fwrev'], 'PowerNet-MIB');
|
||||
}
|
||||
case str_starts_with($features, 'ATS'):
|
||||
$apc_keys = [ 'ats' ];
|
||||
break;
|
||||
|
||||
break;
|
||||
case str_starts_with($features, 'NetBotz Rack Monitor'):
|
||||
$apc_keys = [ 'ems' ];
|
||||
break;
|
||||
|
||||
case str_starts_with($features, 'rd3xx'):
|
||||
$apc_keys = [ 'airIRRC' ];
|
||||
break;
|
||||
|
||||
case str_contains($features, 'Rack PDU'):
|
||||
case match_oid_num($device['sysObjectID'], '.1.3.6.1.4.1.318.1.3.4'):
|
||||
$apc_keys = [ 'rPDU2', 'rPDU' ];
|
||||
break;
|
||||
|
||||
case str_contains($features, 'InfraStruXure PDU'):
|
||||
case match_oid_num($device['sysObjectID'], '.1.3.6.1.4.1.318.1.3.15'):
|
||||
$apc_keys = [ 'xPDU' ];
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
foreach ($apc_keys as $key) {
|
||||
if (!safe_empty($hardware)) {
|
||||
break;
|
||||
}
|
||||
$oids = $apc_oids[$key];
|
||||
|
||||
$model = snmp_getnext_oid($device, $oids['model'], 'PowerNet-MIB');
|
||||
if (empty($model)) {
|
||||
continue;
|
||||
}
|
||||
$hardware = trim($model . ' ' . snmp_getnext_oid($device, $oids['hwrev'], 'PowerNet-MIB'));
|
||||
|
||||
if (empty($version)) {
|
||||
$version = snmp_getnext_oid($device, $oids['fwrev'], 'PowerNet-MIB');
|
||||
}
|
||||
if (empty($serial)) {
|
||||
$serial = snmp_getnext_oid($device, $oids['serial'], 'PowerNet-MIB');
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// v3.7.4 -> 3.7.4
|
||||
if (strlen($version))
|
||||
{
|
||||
$version = ltrim($version, 'v');
|
||||
if (strlen($version)) {
|
||||
$version = ltrim($version, 'vV');
|
||||
}
|
||||
|
||||
if (strlen($features) && preg_match('/^v?\d/', $features))
|
||||
{
|
||||
$features = 'App ' . ltrim($features, 'v');
|
||||
if (strlen($features) && preg_match('/^v?\d/', $features)) {
|
||||
$features = 'App ' . ltrim($features, 'v');
|
||||
}
|
||||
|
||||
// EOF
|
||||
|
@ -1,13 +1,12 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Observium
|
||||
*
|
||||
* This file is part of Observium.
|
||||
*
|
||||
* @package observium
|
||||
* @subpackage poller
|
||||
* @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2019 Observium Limited
|
||||
* @package observium
|
||||
* @subpackage poller
|
||||
* @copyright (C) Adam Armstrong
|
||||
*
|
||||
*/
|
||||
|
||||
@ -17,17 +16,16 @@
|
||||
//$badchars = array('(', ')', ',');
|
||||
//list(,,$hardware,,$version,) = str_replace($badchars, '', explode (' ', $poll_device['sysDescr']));
|
||||
|
||||
$hardware = rewrite_definition_hardware($device, $poll_device['sysObjectID']);
|
||||
$hardware = get_model_param($device, 'hardware', $poll_device['sysObjectID']);
|
||||
|
||||
// Stuff about the controller
|
||||
$aruba_info = snmpwalk_cache_oid($device, 'wlsxSwitchRole', array(), 'WLSX-SWITCH-MIB');
|
||||
$aruba_info = snmpwalk_cache_oid($device, 'wlsxSwitchRole', [], 'WLSX-SWITCH-MIB');
|
||||
$aruba_info = snmpwalk_cache_oid($device, 'wlsxSwitchMasterIp', $aruba_info, 'WLSX-SWITCH-MIB');
|
||||
|
||||
if ($aruba_info[0]['wlsxSwitchRole'] == 'master')
|
||||
{
|
||||
$features = 'Master Controller';
|
||||
if ($aruba_info[0]['wlsxSwitchRole'] === 'master') {
|
||||
$features = 'Master Controller';
|
||||
} else {
|
||||
$features = 'Local Controller for '.$aruba_info[0]['wlsxSwitchMasterIp'];
|
||||
$features = 'Local Controller for ' . $aruba_info[0]['wlsxSwitchMasterIp'];
|
||||
}
|
||||
|
||||
// EOF
|
||||
|
42
includes/polling/os/asrockrack-ipmi.inc.php
Normal file
42
includes/polling/os/asrockrack-ipmi.inc.php
Normal file
@ -0,0 +1,42 @@
|
||||
<?php
|
||||
/**
|
||||
* Observium
|
||||
*
|
||||
* This file is part of Observium.
|
||||
*
|
||||
* @package observium
|
||||
* @subpackage poller
|
||||
* @copyright (C) Adam Armstrong
|
||||
*
|
||||
*/
|
||||
|
||||
// MIBs for this os/hardware inaccessible
|
||||
|
||||
if ($hw = snmp_get_oid($device, '.1.3.6.1.4.1.49622.4.0')) {
|
||||
// Chassis Type:
|
||||
// Chassis Part Number:
|
||||
// Chassis Serial:
|
||||
// Chassis Extra:
|
||||
// Board Mfg Date: Tue Apr 19 03:25:00 2022
|
||||
// Board Mfg: ASRockRack
|
||||
// Board Product: X470D4U
|
||||
// Board Serial: 220923140000124
|
||||
// Board Part Number:
|
||||
// Board Extra:
|
||||
// Product Manufacturer:
|
||||
// Product Name:
|
||||
// Product Part Number:
|
||||
// Product Version:
|
||||
// Product Serial:
|
||||
// Product Asset Tag:
|
||||
// Product Extra:
|
||||
foreach (explode("\n", $hw) as $line) {
|
||||
if (str_starts_with('Board Product', $line)) {
|
||||
$hardware = explode(': ', $line, 2)[1];
|
||||
} elseif (str_starts_with('Board Serial', $line)) {
|
||||
$serial = explode(': ', $line, 2)[1];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// EOF
|
@ -5,19 +5,18 @@
|
||||
*
|
||||
* This file is part of Observium.
|
||||
*
|
||||
* @package observium
|
||||
* @subpackage poller
|
||||
* @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2019 Observium Limited
|
||||
* @package observium
|
||||
* @subpackage poller
|
||||
* @copyright (C) Adam Armstrong
|
||||
*
|
||||
*/
|
||||
|
||||
// FIXME. Move to polling graphs
|
||||
$workq_depth = snmp_get($device, 'workQueueMessages.0', '-Ovq', 'ASYNCOS-MAIL-MIB');
|
||||
if (is_numeric($workq_depth))
|
||||
{
|
||||
rrdtool_update_ng($device, 'asyncos-workq', array('DEPTH' => $workq_depth));
|
||||
//echo("Work Queue: $workq_depth\n");
|
||||
$graphs['asyncos_workq'] = TRUE;
|
||||
if (is_numeric($workq_depth)) {
|
||||
rrdtool_update_ng($device, 'asyncos-workq', ['DEPTH' => $workq_depth]);
|
||||
//echo("Work Queue: $workq_depth\n");
|
||||
$graphs['asyncos_workq'] = TRUE;
|
||||
}
|
||||
|
||||
// EOF
|
||||
|
@ -5,14 +5,14 @@
|
||||
*
|
||||
* This file is part of Observium.
|
||||
*
|
||||
* @package observium
|
||||
* @subpackage poller
|
||||
* @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2019 Observium Limited
|
||||
* @package observium
|
||||
* @subpackage poller
|
||||
* @copyright (C) Adam Armstrong
|
||||
*
|
||||
*/
|
||||
|
||||
$hardware = snmp_get($device,'1.3.6.1.4.1.4547.2.3.1.3.0','-OQv');
|
||||
$serial = snmp_get($device,'1.3.6.1.4.1.4547.2.3.1.9.0','-OQv');
|
||||
list($version) = explode(' ',snmp_get($device,'1.3.6.1.4.1.4547.2.3.1.4.0','-OQv'));
|
||||
$hardware = snmp_get($device, '1.3.6.1.4.1.4547.2.3.1.3.0', '-OQv');
|
||||
$serial = snmp_get($device, '1.3.6.1.4.1.4547.2.3.1.9.0', '-OQv');
|
||||
[$version] = explode(' ', snmp_get($device, '1.3.6.1.4.1.4547.2.3.1.4.0', '-OQv'));
|
||||
|
||||
// EOF
|
||||
|
@ -4,53 +4,46 @@
|
||||
*
|
||||
* This file is part of Observium.
|
||||
*
|
||||
* @package observium
|
||||
* @subpackage poller
|
||||
* @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2020 Observium Limited
|
||||
* @package observium
|
||||
* @subpackage poller
|
||||
* @copyright (C) Adam Armstrong
|
||||
*
|
||||
*/
|
||||
|
||||
if (preg_match('/^(?<hw>[A-Z][\w\-+ ]+) +HW:\w+ +FW:[\w\.]+ +SW:v?(?<version>[\w\.]+)/', $poll_device['sysDescr'], $matches))
|
||||
{
|
||||
//Ethernet Switch 325-24G HW:01 FW:3.6.0.1 SW:v3.6.1.04 BN:04 (c) Nortel Networks
|
||||
//Ethernet Routing Switch 2526T HW:03 FW:1.0.0.14 SW:v4.1.1.002 BN:02 (c) Nortel Networks
|
||||
//Ethernet Routing Switch 3524GT-PWR+ HW:01 FW:1.0.0.15 SW:v5.2.2.003 BN:03 (c) Avaya Networks
|
||||
//Ethernet Switch 3510-24T HW:33 FW:4.0.0.7 SW:v4.0.4.00
|
||||
//Business Policy Switch 2000 HW:03 FW:V0.36 SW:v1.0.0.81
|
||||
//Business Policy Switch 2000 HW:06 FW:3.0.0.5 SW:v3.0.6.08 ISVN:2
|
||||
//Wireless LAN Controller WC8180 HW:07 FW:1.0.2.1 SW:v2.1.1.029 BN:29 (c) Avaya
|
||||
//Business Secure Router - Ethernet - BSR222 HW:a7 FW:VBSR222_2.6.0.0.011 SW:VM1.09 BN:22-jan-2010 (c) Nortel Networks
|
||||
$hardware = str_replace('- Ethernet - ', '', $matches['hw']);
|
||||
$version = $matches['version'];
|
||||
}
|
||||
else if (preg_match('/^(?<hw>[A-Z][\w\-+ ]+) \((?<version>[\w\.]+)\)/', $poll_device['sysDescr'], $matches))
|
||||
{
|
||||
//ERS-8306 (4.2.0.1)
|
||||
//MERS-8610co (6.0.1.1OE)
|
||||
//Passport-1612G (1.2.2.0)
|
||||
$hardware = str_replace(array('MERS', 'ERS', '-'), array('Metro Ethernet Routing Switch', 'Ethernet Routing Switch', ' '), $matches['hw']);
|
||||
$version = $matches['version'];
|
||||
if (preg_match('/^(?<hw>[A-Z][\w\-+ ]+) +HW:\w+ +FW:[\w\.]+ +SW:v?(?<version>[\w\.]+)/', $poll_device['sysDescr'], $matches)) {
|
||||
//Ethernet Switch 325-24G HW:01 FW:3.6.0.1 SW:v3.6.1.04 BN:04 (c) Nortel Networks
|
||||
//Ethernet Routing Switch 2526T HW:03 FW:1.0.0.14 SW:v4.1.1.002 BN:02 (c) Nortel Networks
|
||||
//Ethernet Routing Switch 3524GT-PWR+ HW:01 FW:1.0.0.15 SW:v5.2.2.003 BN:03 (c) Avaya Networks
|
||||
//Ethernet Switch 3510-24T HW:33 FW:4.0.0.7 SW:v4.0.4.00
|
||||
//Business Policy Switch 2000 HW:03 FW:V0.36 SW:v1.0.0.81
|
||||
//Business Policy Switch 2000 HW:06 FW:3.0.0.5 SW:v3.0.6.08 ISVN:2
|
||||
//Wireless LAN Controller WC8180 HW:07 FW:1.0.2.1 SW:v2.1.1.029 BN:29 (c) Avaya
|
||||
//Business Secure Router - Ethernet - BSR222 HW:a7 FW:VBSR222_2.6.0.0.011 SW:VM1.09 BN:22-jan-2010 (c) Nortel Networks
|
||||
$hardware = str_replace('- Ethernet - ', '', $matches['hw']);
|
||||
$version = $matches['version'];
|
||||
} elseif (preg_match('/^(?<hw>[A-Z][\w\-+ ]+) \((?<version>[\w\.]+)\)/', $poll_device['sysDescr'], $matches)) {
|
||||
//ERS-8306 (4.2.0.1)
|
||||
//MERS-8610co (6.0.1.1OE)
|
||||
//Passport-1612G (1.2.2.0)
|
||||
$hardware = str_replace(['MERS', 'ERS', '-'], ['Metro Ethernet Routing Switch', 'Ethernet Routing Switch', ' '], $matches['hw']);
|
||||
$version = $matches['version'];
|
||||
}
|
||||
|
||||
if (str_starts($poll_device['sysObjectID'], '.1.3.6.1.4.1.2272.'))
|
||||
{
|
||||
if (!$version)
|
||||
{
|
||||
// Build 4.1.0.0 on Fri Jun 16 21:42:04 PDT 2006
|
||||
$version = snmp_get($device, 'rcSysVersion.0', '-Oqvn', 'RAPID-CITY');
|
||||
list(,$version) = explode(' ', $version);
|
||||
}
|
||||
if (str_starts($poll_device['sysObjectID'], '.1.3.6.1.4.1.2272.')) {
|
||||
if (!$version) {
|
||||
// Build 4.1.0.0 on Fri Jun 16 21:42:04 PDT 2006
|
||||
$version = snmp_get($device, 'rcSysVersion.0', '-Oqvn', 'RAPID-CITY');
|
||||
[, $version] = explode(' ', $version);
|
||||
}
|
||||
} else {
|
||||
if (!$version)
|
||||
{
|
||||
$version = snmp_get($device, '.1.3.6.1.4.1.45.1.6.4.2.1.10.0', '-Oqvn');
|
||||
$version = str_replace('v', '', $version);
|
||||
}
|
||||
$serial = snmp_get($device, '.1.3.6.1.2.1.47.1.1.1.1.11.1', '-Oqvn'); // entPhysicalSerialNum.1
|
||||
if ($serial == '')
|
||||
{
|
||||
$serial = snmp_get($device, '.1.3.6.1.2.1.47.1.1.1.1.11.2', '-Oqvn'); // entPhysicalSerialNum.2
|
||||
}
|
||||
if (!$version) {
|
||||
$version = snmp_get($device, '.1.3.6.1.4.1.45.1.6.4.2.1.10.0', '-Oqvn');
|
||||
$version = str_replace('v', '', $version);
|
||||
}
|
||||
$serial = snmp_get($device, '.1.3.6.1.2.1.47.1.1.1.1.11.1', '-Oqvn'); // entPhysicalSerialNum.1
|
||||
if ($serial == '') {
|
||||
$serial = snmp_get($device, '.1.3.6.1.2.1.47.1.1.1.1.11.2', '-Oqvn'); // entPhysicalSerialNum.2
|
||||
}
|
||||
}
|
||||
|
||||
// EOF
|
||||
|
@ -5,18 +5,17 @@
|
||||
*
|
||||
* This file is part of Observium.
|
||||
*
|
||||
* @package observium
|
||||
* @subpackage poller
|
||||
* @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2019 Observium Limited
|
||||
* @package observium
|
||||
* @subpackage poller
|
||||
* @copyright (C) Adam Armstrong
|
||||
*
|
||||
*/
|
||||
|
||||
//FIXME. Need sysDescr examples
|
||||
if (str_contains_array($poll_device['sysDescr'], array( 'DSR', 'AV3')))
|
||||
{
|
||||
list($hardware, $version) = explode(' ', $poll_device['sysDescr']);
|
||||
$hardware = trim($hardware);
|
||||
$version = trim($version);
|
||||
if (str_contains_array($poll_device['sysDescr'], ['DSR', 'AV3'])) {
|
||||
[$hardware, $version] = explode(' ', $poll_device['sysDescr']);
|
||||
$hardware = trim($hardware);
|
||||
$version = trim($version);
|
||||
}
|
||||
|
||||
// EOF
|
||||
|
@ -5,9 +5,9 @@
|
||||
*
|
||||
* This file is part of Observium.
|
||||
*
|
||||
* @package observium
|
||||
* @subpackage poller
|
||||
* @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2019 Observium Limited
|
||||
* @package observium
|
||||
* @subpackage poller
|
||||
* @copyright (C) Adam Armstrong
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -5,19 +5,18 @@
|
||||
*
|
||||
* This file is part of Observium.
|
||||
*
|
||||
* @package observium
|
||||
* @subpackage poller
|
||||
* @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2019 Observium Limited
|
||||
* @package observium
|
||||
* @subpackage poller
|
||||
* @copyright (C) Adam Armstrong
|
||||
*
|
||||
*/
|
||||
|
||||
// BIANCA-BRICK-MIB::biboAdmSWVersion.0 = STRING: V.7.5 Rev. 7 (Patch 6) IPSec from 2010/02/11 00:00:00
|
||||
|
||||
$data = snmp_get_multi_oid($device, 'biboAdmSWVersion.0', array(), 'BIANCA-BRICK-MIB');
|
||||
$version = $data[0]['biboAdmSWVersion'];
|
||||
if (preg_match('/^(V\.)?(?<version>\d+[\.\d]+( Rev\. \d+)?( \(Patch \d+\))?)/', $version, $matches))
|
||||
{
|
||||
$version = $matches['version'];
|
||||
$data = snmp_get_multi_oid($device, 'biboAdmSWVersion.0', [], 'BIANCA-BRICK-MIB');
|
||||
$version = $data[0]['biboAdmSWVersion'];
|
||||
if (preg_match('/^(V\.)?(?<version>\d+[\.\d]+( Rev\. \d+)?( \(Patch \d+\))?)/', $version, $matches)) {
|
||||
$version = $matches['version'];
|
||||
}
|
||||
|
||||
// EOF
|
@ -4,9 +4,9 @@
|
||||
*
|
||||
* This file is part of Observium.
|
||||
*
|
||||
* @package observium
|
||||
* @subpackage poller
|
||||
* @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2022 Observium Limited
|
||||
* @package observium
|
||||
* @subpackage poller
|
||||
* @copyright (C) Adam Armstrong
|
||||
*
|
||||
*/
|
||||
|
||||
@ -16,7 +16,7 @@
|
||||
// ALVARION-DOT11-WLAN-TST-MIB::brzLighteOemProjectNameString.0 = STRING: "BreezeACCESS VL"
|
||||
|
||||
if ($unit_type = snmp_get_oid($device, 'brzaccVLUnitType.0', 'ALVARION-DOT11-WLAN-MIB')) {
|
||||
$features = rewrite_breeze_type($unit_type);
|
||||
$features = rewrite_breeze_type($unit_type);
|
||||
}
|
||||
|
||||
unset($unit_type);
|
||||
|
@ -5,9 +5,9 @@
|
||||
*
|
||||
* This file is part of Observium.
|
||||
*
|
||||
* @package observium
|
||||
* @subpackage poller
|
||||
* @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2019 Observium Limited
|
||||
* @package observium
|
||||
* @subpackage poller
|
||||
* @copyright (C) Adam Armstrong
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -1,53 +0,0 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Observium
|
||||
*
|
||||
* This file is part of Observium.
|
||||
*
|
||||
* @package observium
|
||||
* @subpackage poller
|
||||
* @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2019 Observium Limited
|
||||
*
|
||||
*/
|
||||
|
||||
# SNMPv2-SMI::enterprises.2435.2.4.3.2435.5.13.3.0 = STRING: "Brother HL-2070N series"
|
||||
$hardware = snmp_get($device, '1.3.6.1.4.1.2435.2.4.3.2435.5.13.3.0', '-OQv');
|
||||
|
||||
# SNMPv2-SMI::enterprises.11.2.3.9.4.2.1.1.3.3.0 = STRING: "A7J913764"
|
||||
$serial = snmp_get($device, '1.3.6.1.4.1.11.2.3.9.4.2.1.1.3.3.0', '-OQv');
|
||||
|
||||
# SNMPv2-SMI::enterprises.2435.2.4.3.1240.6.5.0 = STRING: "Firmware Ver.1.33 (06.07.21)"
|
||||
$version = snmp_get($device, '1.3.6.1.4.1.2435.2.4.3.1240.6.5.0', '-OQv');
|
||||
|
||||
preg_match("/Ver\.(.*) \(/", $version, $matches);
|
||||
if ($matches[1]) { $version = $matches[1]; }
|
||||
|
||||
# SNMPv2-SMI::enterprises.2435.2.3.9.1.1.7.0 = STRING: "MFG:Brother;CMD:HBP,PJL,PCL,PCLXL,POSTSCRIPT;MDL:MFC-8440;CLS:PRINTER;"
|
||||
if ($hardware == '')
|
||||
{
|
||||
$jdinfo = explode(';',snmp_get($device, '1.3.6.1.4.1.2435.2.3.9.1.1.7.0', '-OQv'));
|
||||
|
||||
foreach ($jdinfo as $jdi)
|
||||
{
|
||||
list($key,$value) = explode(':',$jdi);
|
||||
$jetdirect[$key] = $value;
|
||||
}
|
||||
|
||||
$hardware = $jetdirect['MDL'];
|
||||
}
|
||||
|
||||
# SNMPv2-SMI::enterprises.2435.2.3.9.4.2.1.5.5.1.0 = STRING: "000A5J431816"
|
||||
if ($serial == '')
|
||||
{
|
||||
$serial = snmp_get($device, '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.5.1.0', '-OQv');
|
||||
}
|
||||
|
||||
# Strip off useless brand fields
|
||||
$hardware = str_replace('Brother ','',$hardware);
|
||||
$hardware = str_ireplace(' series','',$hardware);
|
||||
|
||||
# Sometimes firmware outputs serial as hex-string
|
||||
$serial = snmp_hexstring($serial);
|
||||
|
||||
// EOF
|
@ -1,64 +1,60 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Observium
|
||||
*
|
||||
* This file is part of Observium.
|
||||
*
|
||||
* @package observium
|
||||
* @subpackage poller
|
||||
* @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2019 Observium Limited
|
||||
* @package observium
|
||||
* @subpackage poller
|
||||
* @copyright (C) Adam Armstrong
|
||||
*
|
||||
*/
|
||||
|
||||
$hardware = rewrite_definition_hardware($device, $poll_device['sysObjectID']);
|
||||
if (strstr($hardware, 'E7'))
|
||||
{
|
||||
/**
|
||||
E7-Calix-MIB::e7CardRowStatus.1.1 = INTEGER: active(1)
|
||||
E7-Calix-MIB::e7CardAdminStatus.1.1 = INTEGER: enabled(1)
|
||||
E7-Calix-MIB::e7CardProvType.1.1 = INTEGER: gpon4(1017)
|
||||
E7-Calix-MIB::e7CardActualType.1.1 = INTEGER: gpon4(1017)
|
||||
E7-Calix-MIB::e7CardSoftwareVersion.1.1 = STRING: "2.2.80.2"
|
||||
E7-Calix-MIB::e7CardSerialNumber.1.1 = STRING: 211306600765
|
||||
E7-Calix-MIB::e7CardCurrentPowerLevel.1.1 = INTEGER: notSet(0)
|
||||
E7-Calix-MIB::e7CardCleiCode.1.1 = STRING: "BVL3AW8FTA"
|
||||
E7-Calix-MIB::e7CardPartNumber.1.1 = STRING: "100-01773"
|
||||
E7-Calix-MIB::e7CardStartMacRange.1.1 = STRING: "00:02:5d:c3:8b:8b"
|
||||
E7-Calix-MIB::e7CardEndMacRange.1.1 = STRING: "00:02:5d:c3:8b:9c"
|
||||
E7-Calix-MIB::e7CardHardwareRevision.1.1 = STRING: "notyet"
|
||||
E7-Calix-MIB::e7CardTableEnd.0 = INTEGER: 0
|
||||
E7-Calix-MIB::e7SystemId.0 = STRING: "PHIPAALLOXT#1265"
|
||||
E7-Calix-MIB::e7SystemLocation.0 = STRING: "Philadelphia, PA"
|
||||
E7-Calix-MIB::e7SystemAutoUpgrade.0 = INTEGER: yes(1)
|
||||
E7-Calix-MIB::e7SystemTelnetServer.0 = INTEGER: yes(1)
|
||||
E7-Calix-MIB::e7SystemUnsecuredWeb.0 = INTEGER: no(0)
|
||||
E7-Calix-MIB::e7SystemPasswordExpiry.0 = INTEGER: 30
|
||||
E7-Calix-MIB::e7SystemDnsPrimary.0 = IpAddress: 192.168.1.2
|
||||
E7-Calix-MIB::e7SystemDnsSecondary.0 = IpAddress: 192.168.2.2
|
||||
E7-Calix-MIB::e7SystemTimezone.0 = STRING: "US/Pacific"
|
||||
E7-Calix-MIB::e7SystemChassisMacAddress.0 = STRING: 0:2:35:9e:46:af
|
||||
E7-Calix-MIB::e7SystemTime.0 = STRING: 04:00:23
|
||||
E7-Calix-MIB::e7SystemDate.0 = STRING: 2013-12-07
|
||||
*/
|
||||
$version = snmp_get($device, '.1.3.6.1.4.1.6321.1.2.2.2.1.6.1.1.7.1.1', '-Oqv'); // e7CardSoftwareVersion.1.1
|
||||
$hardware = get_model_param($device, 'hardware', $poll_device['sysObjectID']);
|
||||
if (str_contains($hardware, 'E7')) {
|
||||
/**
|
||||
* E7-Calix-MIB::e7CardRowStatus.1.1 = INTEGER: active(1)
|
||||
* E7-Calix-MIB::e7CardAdminStatus.1.1 = INTEGER: enabled(1)
|
||||
* E7-Calix-MIB::e7CardProvType.1.1 = INTEGER: gpon4(1017)
|
||||
* E7-Calix-MIB::e7CardActualType.1.1 = INTEGER: gpon4(1017)
|
||||
* E7-Calix-MIB::e7CardSoftwareVersion.1.1 = STRING: "2.2.80.2"
|
||||
* E7-Calix-MIB::e7CardSerialNumber.1.1 = STRING: 211306600765
|
||||
* E7-Calix-MIB::e7CardCurrentPowerLevel.1.1 = INTEGER: notSet(0)
|
||||
* E7-Calix-MIB::e7CardCleiCode.1.1 = STRING: "BVL3AW8FTA"
|
||||
* E7-Calix-MIB::e7CardPartNumber.1.1 = STRING: "100-01773"
|
||||
* E7-Calix-MIB::e7CardStartMacRange.1.1 = STRING: "00:02:5d:c3:8b:8b"
|
||||
* E7-Calix-MIB::e7CardEndMacRange.1.1 = STRING: "00:02:5d:c3:8b:9c"
|
||||
* E7-Calix-MIB::e7CardHardwareRevision.1.1 = STRING: "notyet"
|
||||
* E7-Calix-MIB::e7CardTableEnd.0 = INTEGER: 0
|
||||
* E7-Calix-MIB::e7SystemId.0 = STRING: "PHIPAALLOXT#1265"
|
||||
* E7-Calix-MIB::e7SystemLocation.0 = STRING: "Philadelphia, PA"
|
||||
* E7-Calix-MIB::e7SystemAutoUpgrade.0 = INTEGER: yes(1)
|
||||
* E7-Calix-MIB::e7SystemTelnetServer.0 = INTEGER: yes(1)
|
||||
* E7-Calix-MIB::e7SystemUnsecuredWeb.0 = INTEGER: no(0)
|
||||
* E7-Calix-MIB::e7SystemPasswordExpiry.0 = INTEGER: 30
|
||||
* E7-Calix-MIB::e7SystemDnsPrimary.0 = IpAddress: 192.168.1.2
|
||||
* E7-Calix-MIB::e7SystemDnsSecondary.0 = IpAddress: 192.168.2.2
|
||||
* E7-Calix-MIB::e7SystemTimezone.0 = STRING: "US/Pacific"
|
||||
* E7-Calix-MIB::e7SystemChassisMacAddress.0 = STRING: 0:2:35:9e:46:af
|
||||
* E7-Calix-MIB::e7SystemTime.0 = STRING: 04:00:23
|
||||
* E7-Calix-MIB::e7SystemDate.0 = STRING: 2013-12-07
|
||||
*/
|
||||
$version = snmp_get_oid($device, '.1.3.6.1.4.1.6321.1.2.2.2.1.6.1.1.7.1.1'); // e7CardSoftwareVersion.1.1
|
||||
|
||||
// Here definition override for ifDescr, because Calix switch ifDescr <> ifName since fw 2.2
|
||||
unset($config['os'][$device['os']]['ifname'], $version_parts);
|
||||
$version_parts = explode('.', $version);
|
||||
if ($version_parts[0] > 2 || ($version_parts[0] == 2 && $version_parts[1] > 1))
|
||||
{
|
||||
$config['os'][$device['os']]['ifname'] = 1;
|
||||
}
|
||||
///FIXME: $features
|
||||
// Here definition override for ifDescr, because Calix switch ifDescr <> ifName since fw 2.2
|
||||
unset($config['os'][$device['os']]['ifname'], $version_parts);
|
||||
$version_parts = explode('.', $version);
|
||||
if ($version_parts[0] > 2 || ($version_parts[0] == 2 && $version_parts[1] > 1)) {
|
||||
$config['os'][$device['os']]['ifname'] = 1;
|
||||
}
|
||||
///FIXME: $features
|
||||
}
|
||||
else if (strstr($hardware, 'E5'))
|
||||
{
|
||||
///FIXME: $version, $features, $serial
|
||||
}
|
||||
else if (strstr($hardware, 'C7'))
|
||||
{
|
||||
///FIXME: $version, $features, $serial
|
||||
/*
|
||||
elseif (str_contains($hardware, 'E5')) {
|
||||
///FIXME: $version, $features, $serial
|
||||
} elseif (str_contains($hardware, 'C7')) {
|
||||
///FIXME: $version, $features, $serial
|
||||
}
|
||||
*/
|
||||
|
||||
// EOF
|
||||
|
@ -1,5 +1,4 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Observium
|
||||
*
|
||||
@ -7,21 +6,12 @@
|
||||
*
|
||||
* @package observium
|
||||
* @subpackage poller
|
||||
* @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2019 Observium Limited
|
||||
* @copyright (C) Adam Armstrong
|
||||
*
|
||||
*/
|
||||
|
||||
if (is_device_mib($device, 'CAMBIUM-PTP800-MIB'))
|
||||
{
|
||||
$version = snmp_get($device, 'softwareVersion.0', '-OQv', 'CAMBIUM-PTP800-MIB');
|
||||
$hardware = snmp_get($device, 'productName.0', '-OQv', 'CAMBIUM-PTP800-MIB');
|
||||
}
|
||||
else if (is_device_mib($device, 'MOTOROLA-PTP-MIB'))
|
||||
{
|
||||
$version = snmp_get($device, 'softwareVersion.0', '-OQv', 'MOTOROLA-PTP-MIB');
|
||||
$hardware = snmp_get($device, 'productName.0', '-OQv', 'MOTOROLA-PTP-MIB');
|
||||
} else {
|
||||
$hardware = rewrite_definition_hardware($device, $poll_device['sysObjectID']);
|
||||
if (!$hardware) {
|
||||
$hardware = get_model_param($device, 'hardware', $poll_device['sysObjectID']);
|
||||
}
|
||||
|
||||
// EOF
|
||||
|
@ -5,9 +5,9 @@
|
||||
*
|
||||
* This file is part of Observium.
|
||||
*
|
||||
* @package observium
|
||||
* @subpackage poller
|
||||
* @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2019 Observium Limited
|
||||
* @package observium
|
||||
* @subpackage poller
|
||||
* @copyright (C) Adam Armstrong
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -5,9 +5,9 @@
|
||||
*
|
||||
* This file is part of Observium.
|
||||
*
|
||||
* @package observium
|
||||
* @subpackage poller
|
||||
* @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2019 Observium Limited
|
||||
* @package observium
|
||||
* @subpackage poller
|
||||
* @copyright (C) Adam Armstrong
|
||||
*
|
||||
*/
|
||||
|
||||
@ -18,22 +18,20 @@
|
||||
// BLUECOAT-CAS-MIB::casAvEngineVersion.0 = STRING: 8.2.5.17
|
||||
// BLUECOAT-CAS-MIB::casAvPatternVersion.0 = STRING: 160119 210400.6788010
|
||||
|
||||
$av = snmp_get($device, 'casAvVendorName.0', '-Osqv', 'BLUECOAT-CAS-MIB');
|
||||
if (!empty($av))
|
||||
{
|
||||
$eng = snmp_get($device, 'casAvEngineVersion.0', '-Osqv', 'BLUECOAT-CAS-MIB');
|
||||
$pat = snmp_get($device, 'casAvPatternVersion.0', '-Osqv', 'BLUECOAT-CAS-MIB');
|
||||
$features = "$av-$eng ($pat)";
|
||||
$av = snmp_get($device, 'casAvVendorName.0', '-Osqv', 'BLUECOAT-CAS-MIB');
|
||||
if (!empty($av)) {
|
||||
$eng = snmp_get($device, 'casAvEngineVersion.0', '-Osqv', 'BLUECOAT-CAS-MIB');
|
||||
$pat = snmp_get($device, 'casAvPatternVersion.0', '-Osqv', 'BLUECOAT-CAS-MIB');
|
||||
$features = "$av-$eng ($pat)";
|
||||
}
|
||||
|
||||
if (preg_match('/Blue Coat (?<hw>\S+), Version: (?<version>[\d\.\-]+)/', $poll_device['sysDescr'], $matches))
|
||||
{
|
||||
$hardware = $matches['hw'];
|
||||
$version = $matches['version'];
|
||||
if (preg_match('/Blue Coat (?<hw>\S+), Version: (?<version>[\d\.\-]+)/', $poll_device['sysDescr'], $matches)) {
|
||||
$hardware = $matches['hw'];
|
||||
$version = $matches['version'];
|
||||
} else {
|
||||
list($hardware) = explode(',', $poll_device['sysDescr']);
|
||||
$hardware = trim($hardware);
|
||||
$version = snmp_get($device, 'casInstalledFirmwareVersion.0', '-Osqv', 'BLUECOAT-CAS-MIB');
|
||||
[$hardware] = explode(',', $poll_device['sysDescr']);
|
||||
$hardware = trim($hardware);
|
||||
$version = snmp_get($device, 'casInstalledFirmwareVersion.0', '-Osqv', 'BLUECOAT-CAS-MIB');
|
||||
}
|
||||
|
||||
// EOF
|
||||
|
@ -5,14 +5,14 @@
|
||||
*
|
||||
* This file is part of Observium.
|
||||
*
|
||||
* @package observium
|
||||
* @subpackage poller
|
||||
* @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2019 Observium Limited
|
||||
* @package observium
|
||||
* @subpackage poller
|
||||
* @copyright (C) Adam Armstrong
|
||||
*
|
||||
*/
|
||||
|
||||
$version = str_replace('"', '', snmp_get($device, '.1.3.6.1.4.1.6141.2.60.10.1.1.3.1.2.1', '-Ovq'));
|
||||
$serial = str_replace('"', '', snmp_get($device, '.1.3.6.1.4.1.6141.2.60.11.1.1.1.52.0', '-Ovq'));
|
||||
$version = str_replace('"', '', snmp_get($device, '.1.3.6.1.4.1.6141.2.60.10.1.1.3.1.2.1', '-Ovq'));
|
||||
$serial = str_replace('"', '', snmp_get($device, '.1.3.6.1.4.1.6141.2.60.11.1.1.1.52.0', '-Ovq'));
|
||||
$hardware = str_replace('"', '', snmp_get($device, '.1.3.6.1.2.1.1.1.0', '-Ovq'));
|
||||
|
||||
// EOF
|
||||
|
@ -5,13 +5,13 @@
|
||||
*
|
||||
* This file is part of Observium.
|
||||
*
|
||||
* @package observium
|
||||
* @subpackage poller
|
||||
* @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2019 Observium Limited
|
||||
* @package observium
|
||||
* @subpackage poller
|
||||
* @copyright (C) Adam Armstrong
|
||||
*
|
||||
*/
|
||||
|
||||
$cimc_separate = array();
|
||||
$cimc_separate = [];
|
||||
$cimc_separate[] = ".1.3.6.1.4.1.9.1.1634"; // ciscoE160DP
|
||||
$cimc_separate[] = ".1.3.6.1.4.1.9.1.1635"; // ciscoE160D
|
||||
$cimc_separate[] = ".1.3.6.1.4.1.9.1.1636"; // ciscoE140DP
|
||||
@ -20,9 +20,8 @@ $cimc_separate[] = ".1.3.6.1.4.1.9.1.1638"; // ciscoE140S
|
||||
$cimc_separate[] = ".1.3.6.1.4.1.9.1.2183"; // ciscoUCSE160DM2K9
|
||||
$cimc_separate[] = ".1.3.6.1.4.1.9.1.2184"; // ciscoUCSE180DM2K9
|
||||
|
||||
if (in_array($poll_device['sysObjectID'], $cimc_separate))
|
||||
{
|
||||
$type = 'management';
|
||||
if (in_array($poll_device['sysObjectID'], $cimc_separate)) {
|
||||
$type = 'management';
|
||||
}
|
||||
|
||||
unset($cimc_separate, $matches);
|
||||
|
@ -4,13 +4,13 @@
|
||||
*
|
||||
* This file is part of Observium.
|
||||
*
|
||||
* @package observium
|
||||
* @subpackage poller
|
||||
* @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2019 Observium Limited
|
||||
* @package observium
|
||||
* @subpackage poller
|
||||
* @copyright (C) Adam Armstrong
|
||||
*
|
||||
*/
|
||||
|
||||
$version = snmp_get_oid($device, 'ceAssetSoftwareRevision.1', 'CISCO-ENTITY-ASSET-MIB');
|
||||
$version = snmp_get_oid($device, 'ceAssetSoftwareRevision.1', 'CISCO-ENTITY-ASSET-MIB');
|
||||
$hardware = snmp_get_oid($device, 'entPhysicalDescr.1', 'ENTITY-MIB');
|
||||
|
||||
// EOF
|
||||
|
@ -5,18 +5,17 @@
|
||||
*
|
||||
* This file is part of Observium.
|
||||
*
|
||||
* @package observium
|
||||
* @subpackage poller
|
||||
* @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2019 Observium Limited
|
||||
* @package observium
|
||||
* @subpackage poller
|
||||
* @copyright (C) Adam Armstrong
|
||||
*
|
||||
*/
|
||||
|
||||
$data = snmp_get_oid($device, 'alHardwareChassis.0', 'ALTIGA-HARDWARE-STATS-MIB');
|
||||
if ($data)
|
||||
{
|
||||
$hardware = strtoupper($data);
|
||||
if ($data) {
|
||||
$hardware = strtoupper($data);
|
||||
} else {
|
||||
$serial = snmp_get_oid($device, 'entPhysicalSerialNum.1', 'ENTITY-MIB');
|
||||
$serial = snmp_get_oid($device, 'entPhysicalSerialNum.1', 'ENTITY-MIB');
|
||||
}
|
||||
|
||||
// EOF
|
||||
|
@ -4,14 +4,14 @@
|
||||
*
|
||||
* This file is part of Observium.
|
||||
*
|
||||
* @package observium
|
||||
* @subpackage poller
|
||||
* @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2019 Observium Limited
|
||||
* @package observium
|
||||
* @subpackage poller
|
||||
* @copyright (C) Adam Armstrong
|
||||
*
|
||||
*/
|
||||
|
||||
$version = snmp_get_oid($device, 'entPhysicalSoftwareRev.1', 'ENTITY-MIB');
|
||||
$hardware = snmp_get_oid($device, 'entPhysicalDescr.1', 'ENTITY-MIB');
|
||||
$serial = snmp_get_oid($device, 'entPhysicalSerialNum.1', 'ENTITY-MIB');
|
||||
$hardware = snmp_get_oid($device, 'entPhysicalDescr.1', 'ENTITY-MIB');
|
||||
$serial = snmp_get_oid($device, 'entPhysicalSerialNum.1', 'ENTITY-MIB');
|
||||
|
||||
// EOF
|
@ -4,9 +4,9 @@
|
||||
*
|
||||
* This file is part of Observium.
|
||||
*
|
||||
* @package observium
|
||||
* @subpackage poller
|
||||
* @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2021 Observium Limited
|
||||
* @package observium
|
||||
* @subpackage poller
|
||||
* @copyright (C) Adam Armstrong
|
||||
*
|
||||
*/
|
||||
|
||||
@ -15,17 +15,17 @@
|
||||
// SYSAPPL-MIB::sysApplInstallPkgVersion.9 = STRING: 8.6.12
|
||||
// SYSAPPL-MIB::sysApplInstallPkgSerialNumber.9 = STRING:
|
||||
if (is_device_mib($device, 'SYSAPPL-MIB')) {
|
||||
foreach (snmpwalk_cache_oid($device, 'sysApplInstallPkgProductName', [], 'SYSAPPL-MIB') as $index => $entry) {
|
||||
if ($entry['sysApplInstallPkgProductName'] === 'Core') {
|
||||
$data = snmp_get_multi_oid($device, "sysApplInstallPkgVersion.$index sysApplInstallPkgSerialNumber.$index", [], 'SYSAPPL-MIB');
|
||||
if (is_valid_param($entry[$index]['sysApplInstallPkgVersion'], 'version')) {
|
||||
$version = $entry[$index]['sysApplInstallPkgVersion'];
|
||||
}
|
||||
if (is_valid_param($entry[$index]['sysApplInstallPkgSerialNumber'], 'serial')) {
|
||||
$serial = $entry[$index]['sysApplInstallPkgSerialNumber'];
|
||||
}
|
||||
break;
|
||||
foreach (snmpwalk_cache_oid($device, 'sysApplInstallPkgProductName', [], 'SYSAPPL-MIB') as $index => $entry) {
|
||||
if ($entry['sysApplInstallPkgProductName'] === 'Core') {
|
||||
$data = snmp_get_multi_oid($device, "sysApplInstallPkgVersion.$index sysApplInstallPkgSerialNumber.$index", [], 'SYSAPPL-MIB');
|
||||
if (is_valid_param($entry[$index]['sysApplInstallPkgVersion'], 'version')) {
|
||||
$version = $entry[$index]['sysApplInstallPkgVersion'];
|
||||
}
|
||||
if (is_valid_param($entry[$index]['sysApplInstallPkgSerialNumber'], 'serial')) {
|
||||
$serial = $entry[$index]['sysApplInstallPkgSerialNumber'];
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// EOF
|
||||
|
@ -6,157 +6,129 @@
|
||||
*
|
||||
* @package observium
|
||||
* @subpackage poller
|
||||
* @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2022 Observium Limited
|
||||
* @copyright (C) Adam Armstrong
|
||||
*
|
||||
*/
|
||||
|
||||
if (is_device_mib($device, 'CISCO-CONFIG-MAN-MIB')) {
|
||||
// Check Cisco configuration age
|
||||
|
||||
$oids = 'sysUpTime.0 ccmHistoryRunningLastChanged.0 ccmHistoryRunningLastSaved.0 ccmHistoryStartupLastChanged.0';
|
||||
$data = snmp_get_multi_oid($device, $oids, [], 'SNMPv2-MIB:CISCO-CONFIG-MAN-MIB', NULL, OBS_SNMP_ALL_TIMETICKS);
|
||||
$config_age = $data[0];
|
||||
|
||||
foreach ($config_age as $key => $val)
|
||||
{
|
||||
$config_age[$key] = $val/100;
|
||||
}
|
||||
|
||||
$RunningLastChanged = $config_age['sysUpTime'] - $config_age['ccmHistoryRunningLastChanged'];
|
||||
$RunningLastChangedTS = time() - $RunningLastChanged;
|
||||
$RunningLastSaved = $config_age['sysUpTime'] - $config_age['ccmHistoryRunningLastSaved'];
|
||||
$RunningLastSavedTS = time() - $RunningLastSaved;
|
||||
$StartupLastChanged = $config_age['sysUpTime'] - $config_age['ccmHistoryStartupLastChanged'];
|
||||
$StartupLastChangedTS = time() - $StartupLastChanged;
|
||||
|
||||
$sysUptimeTS = time() - $config_age['sysUpTime'];
|
||||
|
||||
$os_additional_info['Cisco configuration ages'] = array(
|
||||
'sysUptime' => format_unixtime($sysUptimeTS) .' | '.format_uptime($config_age['sysUpTime']),
|
||||
'Running' => format_unixtime($RunningLastChangedTS).' | '.format_uptime($RunningLastChanged),
|
||||
'Saved' => format_unixtime($RunningLastSavedTS) .' | '.format_uptime($RunningLastSaved),
|
||||
'Startup' => format_unixtime($StartupLastChangedTS).' | '.format_uptime($StartupLastChanged),
|
||||
);
|
||||
}
|
||||
|
||||
$sysDescr = preg_replace('/\s+/', ' ', $poll_device['sysDescr']); // Replace all spaces and newline to single space
|
||||
// Generic IOS/IOS-XE/IES/IOS-XR sysDescr
|
||||
if (preg_match('/^Cisco IOS Software(?: \[\S+?\])?, .+? Software \((?:[^\-]+\-(?<features>\w+)\-\w|\w+_IOSXE(?:\-\w+)?)\),.+?Version (?<version>[^,\s]+)/', $sysDescr, $matches)) {
|
||||
// Cisco IOS Software, Catalyst 4500 L3 Switch Software (cat4500e-ENTSERVICESK9-M), Version 15.2(1)E3, RELEASE SOFTWARE (fc1) Technical Support: http://www.cisco.com/techsupport Copyright (c) 1986-2014 by Cisco Systems, Inc. Compiled Mon 05-May-14 07:56 b
|
||||
// Cisco IOS Software, IOS-XE Software (PPC_LINUX_IOSD-IPBASEK9-M), Version 15.2(2)S, RELEASE SOFTWARE (fc1) Technical Support: http://www.cisco.com/techsupport Copyright (c) 1986-2012 by Cisco Systems, Inc. Compiled Mon 26-Mar-12 15:23 by mcpre
|
||||
// Cisco IOS Software, IES Software (IES-LANBASEK9-M), Version 12.2(52)SE1, RELEASE SOFTWARE (fc1) Technical Support: http://www.cisco.com/techsupport Copyright (c) 1986-2010 by Cisco Systems, Inc. Compiled Tue 09-Feb-10 03:17 by prod_rel_team
|
||||
// Cisco IOS Software [Gibraltar], Catalyst L3 Switch Software (CAT9K_IOSXE), Version 16.11.1, RELEASE SOFTWARE (fc3) Technical Support: http://www.cisco.com/techsupport Copyright (c) 1986-2019 by Cisco Systems, Inc. Compiled Thu 28-Mar-19 09:42 by mcpre
|
||||
// Cisco IOS Software [Fuji], Catalyst L3 Switch Software (CAT9K_IOSXE), Version 16.8.1a, RELEASE SOFTWARE (fc1) Technical Support: http://www.cisco.com/techsupport Copyright (c) 1986-2018 by Cisco Systems, Inc. Compiled Tue 03-Apr-18 18:49 by mcpre
|
||||
// Cisco IOS Software [Amsterdam], C9800 Software (C9800_IOSXE-K9), Version 17.3.5a, RELEASE SOFTWARE (fc2) Technical Support: http://www.cisco.com/techsupport Copyright (c) 1986-2022 by Cisco Systems, Inc. Compiled Mon 28-Feb-22 19:09 by mcpre
|
||||
// Cisco IOS Software, Catalyst 4500 L3 Switch Software (cat4500e-ENTSERVICESK9-M), Version 15.2(1)E3, RELEASE SOFTWARE (fc1) Technical Support: http://www.cisco.com/techsupport Copyright (c) 1986-2014 by Cisco Systems, Inc. Compiled Mon 05-May-14 07:56 b
|
||||
// Cisco IOS Software, IOS-XE Software (PPC_LINUX_IOSD-IPBASEK9-M), Version 15.2(2)S, RELEASE SOFTWARE (fc1) Technical Support: http://www.cisco.com/techsupport Copyright (c) 1986-2012 by Cisco Systems, Inc. Compiled Mon 26-Mar-12 15:23 by mcpre
|
||||
// Cisco IOS Software, IES Software (IES-LANBASEK9-M), Version 12.2(52)SE1, RELEASE SOFTWARE (fc1) Technical Support: http://www.cisco.com/techsupport Copyright (c) 1986-2010 by Cisco Systems, Inc. Compiled Tue 09-Feb-10 03:17 by prod_rel_team
|
||||
// Cisco IOS Software [Gibraltar], Catalyst L3 Switch Software (CAT9K_IOSXE), Version 16.11.1, RELEASE SOFTWARE (fc3) Technical Support: http://www.cisco.com/techsupport Copyright (c) 1986-2019 by Cisco Systems, Inc. Compiled Thu 28-Mar-19 09:42 by mcpre
|
||||
// Cisco IOS Software [Fuji], Catalyst L3 Switch Software (CAT9K_IOSXE), Version 16.8.1a, RELEASE SOFTWARE (fc1) Technical Support: http://www.cisco.com/techsupport Copyright (c) 1986-2018 by Cisco Systems, Inc. Compiled Tue 03-Apr-18 18:49 by mcpre
|
||||
// Cisco IOS Software [Amsterdam], C9800 Software (C9800_IOSXE-K9), Version 17.3.5a, RELEASE SOFTWARE (fc2) Technical Support: http://www.cisco.com/techsupport Copyright (c) 1986-2022 by Cisco Systems, Inc. Compiled Mon 28-Feb-22 19:09 by mcpre
|
||||
|
||||
$features = $matches['features'];
|
||||
$version = $matches['version'];
|
||||
$features = $matches['features'];
|
||||
$version = $matches['version'];
|
||||
} elseif (preg_match('/^Cisco Internetwork Operating System Software IOS \(tm\) [^ ]+ Software \([^\-]+\-(?<features>\w+)\-\w\),.+?Version (?<version>[^, ]+)/', $sysDescr, $matches)) {
|
||||
// Cisco Internetwork Operating System Software IOS (tm) 7200 Software (UBR7200-IK8SU2-M), Version 12.3(17b)BC8, RELEASE SOFTWARE (fc1) Technical Support: http://www.cisco.com/techsupport Copyright (c) 1986-2007 by cisco Systems, Inc. Compiled Fri 29-Ju
|
||||
// Cisco Internetwork Operating System Software IOS (tm) C1700 Software (C1700-Y-M), Version 12.2(4)YA2, EARLY DEPLOYMENT RELEASE SOFTWARE (fc1) Synched to technology version 12.2(5.4)T TAC Support: http://www.cisco.com/tac Copyright (c) 1986-2002 by ci
|
||||
// Cisco Internetwork Operating System Software IOS (tm) 7200 Software (UBR7200-IK8SU2-M), Version 12.3(17b)BC8, RELEASE SOFTWARE (fc1) Technical Support: http://www.cisco.com/techsupport Copyright (c) 1986-2007 by cisco Systems, Inc. Compiled Fri 29-Ju
|
||||
// Cisco Internetwork Operating System Software IOS (tm) C1700 Software (C1700-Y-M), Version 12.2(4)YA2, EARLY DEPLOYMENT RELEASE SOFTWARE (fc1) Synched to technology version 12.2(5.4)T TAC Support: http://www.cisco.com/tac Copyright (c) 1986-2002 by ci
|
||||
|
||||
$features = $matches['features'];
|
||||
$version = $matches['version'];
|
||||
$features = $matches['features'];
|
||||
$version = $matches['version'];
|
||||
} elseif (preg_match('/^Cisco IOS XR Software \(Cisco (?<hardware>[^\)]+)\), Version (?<version>[^\[]+)\[(?<features>[^\]]+)\]/', $sysDescr, $matches)) {
|
||||
// Cisco IOS XR Software (Cisco 12816/PRP), Version 4.3.2[Default] Copyright (c) 2014 by Cisco Systems, Inc.
|
||||
// Cisco IOS XR Software (Cisco 12404/PRP), Version 3.6.0[00] Copyright (c) 2007 by Cisco Systems, Inc.
|
||||
// Cisco IOS XR Software (Cisco ASR9K Series), Version 5.1.2[Default] Copyright (c) 2014 by Cisco Systems, Inc.
|
||||
// Cisco IOS XR Software (Cisco 12816/PRP), Version 4.3.2[Default] Copyright (c) 2014 by Cisco Systems, Inc.
|
||||
// Cisco IOS XR Software (Cisco 12404/PRP), Version 3.6.0[00] Copyright (c) 2007 by Cisco Systems, Inc.
|
||||
// Cisco IOS XR Software (Cisco ASR9K Series), Version 5.1.2[Default] Copyright (c) 2014 by Cisco Systems, Inc.
|
||||
|
||||
//$hardware = $matches['hardware'];
|
||||
$features = $matches['features'];
|
||||
$version = $matches['version'];
|
||||
//$hardware = $matches['hardware'];
|
||||
$features = $matches['features'];
|
||||
$version = $matches['version'];
|
||||
} elseif (preg_match('/^Cisco NX-OS(?:\(tm\))? (?<hw1>\S+?)( (?<hardware>[\w\-]+) chassis)?, Software \((?<hw2>.+?)\),.+?Version (?<version>[^, ]+)/', $sysDescr, $matches)) {
|
||||
// Cisco NX-OS(tm) n7000, Software (n7000-s2-dk9), Version 6.2(8b), RELEASE SOFTWARE Copyright (c) 2002-2013 by Cisco Systems, Inc.
|
||||
// Cisco NX-OS(tm) n1000v, Software (n1000v-dk9), Version 5.2(1)SV3(1.2), RELEASE SOFTWARE Copyright (c) 2002-2011 by Cisco Systems, Inc. Device Manager Version nms.sro not found, Compiled 11/11/2014 15:00:00
|
||||
// Cisco NX-OS(tm) n5000, Software (n5000-uk9), Version 6.0(2)N2(7), RELEASE SOFTWARE Copyright (c) 2002-2012 by Cisco Systems, Inc. Device Manager Version 6.2(1), Compiled 4/28/2015 5:00:00
|
||||
// Cisco NX-OS(tm) n7000, Software (n7000-s2-dk9), Version 6.2(8a), RELEASE SOFTWARE Copyright (c) 2002-2013 by Cisco Systems, Inc. Compiled 5/15/2014 20:00:00
|
||||
// Cisco NX-OS(tm) n3000, Software (n3000-uk9), Version 6.0(2)U2(2), RELEASE SOFTWARE Copyright (c) 2002-2012 by Cisco Systems, Inc. Device Manager Version nms.sro not found, Compiled 2/12/2014 8:00:00
|
||||
// Cisco NX-OS(tm) ucs, Software (ucs-6100-k9-system), Version 5.0(3)N2(3.13a), RELEASE SOFTWARE Copyright (c) 2002-2013 by Cisco Systems, Inc. Compiled 4/25/2017 7:00:00
|
||||
// Cisco NX-OS(tm) aci, Software (aci-n9000-system), Version 12.0(1q), RELEASE SOFTWARE Copyright (c) 2002-2015 by Cisco Systems, Inc. Compiled 2016/08/18 14:20:16
|
||||
// Cisco NX-OS(tm) nxos.9.2.3.bin, Software (nxos), Version 9.2(3), RELEASE SOFTWARE Copyright (c) 2002-2019 by Cisco Systems, Inc. Compiled 2/17/2019 4:00:00
|
||||
// Cisco NX-OS n6000, Software (n6000-uk9), Version 7.3(2)N1(1), RELEASE SOFTWARE Copyright (c) 2002-2012, 2016-2017 by Cisco Systems, Inc. Device Manager Version 6.0(2)N1(1),Compiled 5/12/2017 23:00:00
|
||||
// Cisco NX-OS(tm) Nexus9000 C93180YC-EX chassis, Software (NXOS 32-bit), Version 9.3(9), RELEASE SOFTWARE Copyright (c) 2002-2022 by Cisco Systems, Inc. Compiled 2/4/2022 7:00:00
|
||||
// Cisco NX-OS(tm) n7000, Software (n7000-s2-dk9), Version 6.2(8b), RELEASE SOFTWARE Copyright (c) 2002-2013 by Cisco Systems, Inc.
|
||||
// Cisco NX-OS(tm) n1000v, Software (n1000v-dk9), Version 5.2(1)SV3(1.2), RELEASE SOFTWARE Copyright (c) 2002-2011 by Cisco Systems, Inc. Device Manager Version nms.sro not found, Compiled 11/11/2014 15:00:00
|
||||
// Cisco NX-OS(tm) n5000, Software (n5000-uk9), Version 6.0(2)N2(7), RELEASE SOFTWARE Copyright (c) 2002-2012 by Cisco Systems, Inc. Device Manager Version 6.2(1), Compiled 4/28/2015 5:00:00
|
||||
// Cisco NX-OS(tm) n7000, Software (n7000-s2-dk9), Version 6.2(8a), RELEASE SOFTWARE Copyright (c) 2002-2013 by Cisco Systems, Inc. Compiled 5/15/2014 20:00:00
|
||||
// Cisco NX-OS(tm) n3000, Software (n3000-uk9), Version 6.0(2)U2(2), RELEASE SOFTWARE Copyright (c) 2002-2012 by Cisco Systems, Inc. Device Manager Version nms.sro not found, Compiled 2/12/2014 8:00:00
|
||||
// Cisco NX-OS(tm) ucs, Software (ucs-6100-k9-system), Version 5.0(3)N2(3.13a), RELEASE SOFTWARE Copyright (c) 2002-2013 by Cisco Systems, Inc. Compiled 4/25/2017 7:00:00
|
||||
// Cisco NX-OS(tm) aci, Software (aci-n9000-system), Version 12.0(1q), RELEASE SOFTWARE Copyright (c) 2002-2015 by Cisco Systems, Inc. Compiled 2016/08/18 14:20:16
|
||||
// Cisco NX-OS(tm) nxos.9.2.3.bin, Software (nxos), Version 9.2(3), RELEASE SOFTWARE Copyright (c) 2002-2019 by Cisco Systems, Inc. Compiled 2/17/2019 4:00:00
|
||||
// Cisco NX-OS n6000, Software (n6000-uk9), Version 7.3(2)N1(1), RELEASE SOFTWARE Copyright (c) 2002-2012, 2016-2017 by Cisco Systems, Inc. Device Manager Version 6.0(2)N1(1),Compiled 5/12/2017 23:00:00
|
||||
// Cisco NX-OS(tm) Nexus9000 C93180YC-EX chassis, Software (NXOS 32-bit), Version 9.3(9), RELEASE SOFTWARE Copyright (c) 2002-2022 by Cisco Systems, Inc. Compiled 2/4/2022 7:00:00
|
||||
|
||||
if (str_contains($matches['hw2'], ' ')) {
|
||||
// NXOS 32-bit -> 32-bit
|
||||
list(, $features) = explode(' ', $matches['hw2'], 2);
|
||||
} elseif (str_contains($matches['hw2'], '-')) {
|
||||
// n7000-s2-dk9 -> s2-dk9
|
||||
list(, $features) = explode('-', $matches['hw2'], 2);
|
||||
}
|
||||
$version = $matches['version'];
|
||||
if (str_contains($matches['hw2'], ' ')) {
|
||||
// NXOS 32-bit -> 32-bit
|
||||
$features = explode(' ', $matches['hw2'], 2)[1];
|
||||
} elseif (str_contains($matches['hw2'], '-')) {
|
||||
// n7000-s2-dk9 -> s2-dk9
|
||||
$features = explode('-', $matches['hw2'], 2)[1];
|
||||
}
|
||||
$version = $matches['version'];
|
||||
} elseif (preg_match('/Software \(\w+-(?<features>\w+)-\w\),.+?Version (?<version>[^, ]+),(?:[\w ]+)? RELEASE SOFTWARE/', $sysDescr, $matches)) {
|
||||
// C800 Software (C800-UNIVERSALK9-M), Version 15.2(2)T2, RELEASE SOFTWARE (fc1) Technical Support: http://www.cisco.com/techsupport Compiled Thu 02-Aug-12 02:09 by prod_rel_team
|
||||
// Cisco IOS Software, Catalyst 4500 L3 Switch Software (cat4500e-ENTSERVICESK9-M), Version 15.2(1)E3, RELEASE SOFTWARE (fc1) Technical Support: http://www.cisco.com/techsupport Copyright (c) 1986-2014 by Cisco Systems, Inc. Compiled Mon 05-May-14 07:56 b
|
||||
// Cisco IOS Software, ASR900 Software (PPC_LINUX_IOSD-UNIVERSALK9_NPE-M), Version 15.5(1)S, RELEASE SOFTWARE (fc5) Technical Support: http://www.cisco.com/techsupport Copyright (c) 1986-2014 by Cisco Systems, Inc. Compiled Thu 20-Nov-14 18:16 by mcpre
|
||||
// Cisco IOS Software, IOS-XE Software (PPC_LINUX_IOSD-IPBASEK9-M), Version 15.2(2)S, RELEASE SOFTWARE (fc1) Technical Support: http://www.cisco.com/techsupport Copyright (c) 1986-2012 by Cisco Systems, Inc. Compiled Mon 26-Mar-12 15:23 by mcpre
|
||||
// Cisco IOS Software, IES Software (IES-LANBASEK9-M), Version 12.2(52)SE1, RELEASE SOFTWARE (fc1) Technical Support: http://www.cisco.com/techsupport Copyright (c) 1986-2010 by Cisco Systems, Inc. Compiled Tue 09-Feb-10 03:17 by prod_rel_team
|
||||
// C800 Software (C800-UNIVERSALK9-M), Version 15.2(2)T2, RELEASE SOFTWARE (fc1) Technical Support: http://www.cisco.com/techsupport Compiled Thu 02-Aug-12 02:09 by prod_rel_team
|
||||
// Cisco IOS Software, Catalyst 4500 L3 Switch Software (cat4500e-ENTSERVICESK9-M), Version 15.2(1)E3, RELEASE SOFTWARE (fc1) Technical Support: http://www.cisco.com/techsupport Copyright (c) 1986-2014 by Cisco Systems, Inc. Compiled Mon 05-May-14 07:56 b
|
||||
// Cisco IOS Software, ASR900 Software (PPC_LINUX_IOSD-UNIVERSALK9_NPE-M), Version 15.5(1)S, RELEASE SOFTWARE (fc5) Technical Support: http://www.cisco.com/techsupport Copyright (c) 1986-2014 by Cisco Systems, Inc. Compiled Thu 20-Nov-14 18:16 by mcpre
|
||||
// Cisco IOS Software, IOS-XE Software (PPC_LINUX_IOSD-IPBASEK9-M), Version 15.2(2)S, RELEASE SOFTWARE (fc1) Technical Support: http://www.cisco.com/techsupport Copyright (c) 1986-2012 by Cisco Systems, Inc. Compiled Mon 26-Mar-12 15:23 by mcpre
|
||||
// Cisco IOS Software, IES Software (IES-LANBASEK9-M), Version 12.2(52)SE1, RELEASE SOFTWARE (fc1) Technical Support: http://www.cisco.com/techsupport Copyright (c) 1986-2010 by Cisco Systems, Inc. Compiled Tue 09-Feb-10 03:17 by prod_rel_team
|
||||
|
||||
// Cisco Internetwork Operating System Software IOS (tm) 7200 Software (UBR7200-IK8SU2-M), Version 12.3(17b)BC8, RELEASE SOFTWARE (fc1) Technical Support: http://www.cisco.com/techsupport Copyright (c) 1986-2007 by cisco Systems, Inc. Compiled Fri 29-Ju
|
||||
// Cisco Internetwork Operating System Software IOS (tm) C1700 Software (C1700-Y-M), Version 12.2(4)YA2, EARLY DEPLOYMENT RELEASE SOFTWARE (fc1) Synched to technology version 12.2(5.4)T TAC Support: http://www.cisco.com/tac Copyright (c) 1986-2002 by ci
|
||||
// Cisco Internetwork Operating System Software IOS (tm) 7200 Software (UBR7200-IK8SU2-M), Version 12.3(17b)BC8, RELEASE SOFTWARE (fc1) Technical Support: http://www.cisco.com/techsupport Copyright (c) 1986-2007 by cisco Systems, Inc. Compiled Fri 29-Ju
|
||||
// Cisco Internetwork Operating System Software IOS (tm) C1700 Software (C1700-Y-M), Version 12.2(4)YA2, EARLY DEPLOYMENT RELEASE SOFTWARE (fc1) Synched to technology version 12.2(5.4)T TAC Support: http://www.cisco.com/tac Copyright (c) 1986-2002 by ci
|
||||
|
||||
$features = $matches['features'];
|
||||
$version = $matches['version'];
|
||||
$features = $matches['features'];
|
||||
$version = $matches['version'];
|
||||
} elseif (preg_match('/Software( \([\w\- ]+\))?, Version (?<version>\d[\w\.\(\)]+)/', $sysDescr, $matches)) {
|
||||
// Cisco Systems WS-C6509-E Cisco Catalyst Operating System Software, Version 8.4(3) Copyright (c) 1995-2005 by Cisco Systems
|
||||
// Cisco Systems, Inc. WS-C2948 Cisco Catalyst Operating System Software, Version 4.5(9) Copyright (c) 1995-2000 by Cisco Systems, Inc.
|
||||
// Cisco Systems, Inc. WS-C2948G-GE-TX Cisco Catalyst Operating System Software, Version 8.4(5)GLX Copyright (c) 1995-2005 by Cisco Systems, Inc.
|
||||
// Cisco Systems, Inc. WS-C4912 Cisco Catalyst Operating System Software, Version 7.2(2) Copyright (c) 1995-2002 by Cisco Systems, Inc.
|
||||
// Cisco Systems WS-C6509-E Cisco Catalyst Operating System Software, Version 8.4(3) Copyright (c) 1995-2005 by Cisco Systems
|
||||
// Cisco Systems, Inc. WS-C2948 Cisco Catalyst Operating System Software, Version 4.5(9) Copyright (c) 1995-2000 by Cisco Systems, Inc.
|
||||
// Cisco Systems, Inc. WS-C2948G-GE-TX Cisco Catalyst Operating System Software, Version 8.4(5)GLX Copyright (c) 1995-2005 by Cisco Systems, Inc.
|
||||
// Cisco Systems, Inc. WS-C4912 Cisco Catalyst Operating System Software, Version 7.2(2) Copyright (c) 1995-2002 by Cisco Systems, Inc.
|
||||
|
||||
//$features = $matches['features'];
|
||||
$version = $matches['version'];
|
||||
//$features = $matches['features'];
|
||||
$version = $matches['version'];
|
||||
}
|
||||
|
||||
// All other Cisco devices
|
||||
if (is_array($entPhysical)) {
|
||||
if (is_module_enabled($device, 'inventory', 'discovery')) {
|
||||
if ($entPhysical['entPhysicalClass'] === 'stack') {
|
||||
// If it's stacked device try get chassis instead
|
||||
$chassis = dbFetchRow('SELECT * FROM `entPhysical` WHERE `device_id` = ? AND `entPhysicalClass` = ? AND `entPhysicalContainedIn` = ? AND `deleted` IS NULL', array($device['device_id'], 'chassis', '1'));
|
||||
if ($chassis['entPhysicalModelName']) {
|
||||
$entPhysical = $chassis;
|
||||
}
|
||||
} elseif ($entPhysical['entPhysicalModelName'] === 'MIDPLANE' || safe_empty($entPhysical['entPhysicalModelName'])) {
|
||||
// F.u. Cisco.. for some platforms (4948/4900M) they store correct model and version not in chassis
|
||||
$hw_module = dbFetchRow('SELECT * FROM `entPhysical` WHERE `device_id` = ? AND `entPhysicalClass` = ? AND `entPhysicalContainedIn` = ? AND `deleted` IS NULL', array($device['device_id'], 'module', '2'));
|
||||
if ($hw_module['entPhysicalModelName']) {
|
||||
$entPhysical = $hw_module;
|
||||
}
|
||||
} elseif (safe_empty($entPhysical['entPhysicalSoftwareRev'])) {
|
||||
// 720X, try again get correct serial/version
|
||||
$hw_module = dbFetchRow('SELECT * FROM `entPhysical` WHERE `device_id` = ? AND `entPhysicalClass` = ? AND `entPhysicalContainedIn` = ? AND `entPhysicalSerialNum` != ? AND `deleted` IS NULL', array($device['device_id'], 'module', '1', ''));
|
||||
if ($hw_module['entPhysicalSoftwareRev']) {
|
||||
if ($device['os'] === 'iosxe') {
|
||||
// For IOS-XE fix only version
|
||||
$entPhysical['entPhysicalSoftwareRev'] = $hw_module['entPhysicalSoftwareRev'];
|
||||
} else {
|
||||
$entPhysical = $hw_module;
|
||||
print_debug_vars($entPhysical);
|
||||
if (is_module_enabled($device, 'inventory', 'discovery')) {
|
||||
if ($entPhysical['entPhysicalClass'] === 'stack') {
|
||||
// If it's stacked device try get chassis instead
|
||||
$chassis = dbFetchRow('SELECT * FROM `entPhysical` WHERE `device_id` = ? AND `entPhysicalClass` = ? AND `entPhysicalContainedIn` = ? AND `deleted` IS NULL', [$device['device_id'], 'chassis', '1']);
|
||||
if ($chassis['entPhysicalModelName']) {
|
||||
$entPhysical = $chassis;
|
||||
}
|
||||
} elseif ($entPhysical['entPhysicalModelName'] === 'MIDPLANE' || safe_empty($entPhysical['entPhysicalModelName'])) {
|
||||
// F.u. Cisco.. for some platforms (4948/4900M) they store correct model and version not in chassis
|
||||
$hw_module = dbFetchRow('SELECT * FROM `entPhysical` WHERE `device_id` = ? AND `entPhysicalClass` = ? AND `entPhysicalContainedIn` = ? AND `deleted` IS NULL', [$device['device_id'], 'module', '2']);
|
||||
if ($hw_module['entPhysicalModelName']) {
|
||||
$entPhysical = $hw_module;
|
||||
}
|
||||
} elseif (safe_empty($entPhysical['entPhysicalSoftwareRev'])) {
|
||||
// 720X, try again get correct serial/version
|
||||
$hw_module = dbFetchRow('SELECT * FROM `entPhysical` WHERE `device_id` = ? AND `entPhysicalClass` = ? AND `entPhysicalContainedIn` = ? AND `entPhysicalSerialNum` != ? AND `deleted` IS NULL', [$device['device_id'], 'module', '1', '']);
|
||||
if ($hw_module['entPhysicalSoftwareRev']) {
|
||||
if ($device['os'] === 'iosxe' || $device['os'] === 'wlcxe') {
|
||||
// For IOS-XE fix only version
|
||||
$entPhysical['entPhysicalSoftwareRev'] = $hw_module['entPhysicalSoftwareRev'];
|
||||
} else {
|
||||
$entPhysical = $hw_module;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ($entPhysical['entPhysicalClass'] === 'chassis' || in_array($entPhysical['entPhysicalContainedIn'], [ '0', '1', '2' ])) {
|
||||
if ((safe_empty($version) || $device['os'] === 'iosxe') && !empty($entPhysical['entPhysicalSoftwareRev'])) {
|
||||
$version = $entPhysical['entPhysicalSoftwareRev'];
|
||||
if ($entPhysical['entPhysicalClass'] === 'chassis' || in_array($entPhysical['entPhysicalContainedIn'], ['0', '1', '2'])) {
|
||||
if ((safe_empty($version) || $device['os'] === 'iosxe') && !empty($entPhysical['entPhysicalSoftwareRev'])) {
|
||||
$version = $entPhysical['entPhysicalSoftwareRev'];
|
||||
}
|
||||
if (!empty($entPhysical['entPhysicalModelName'])) {
|
||||
if (preg_match('/ (rev|dev)/', $entPhysical['entPhysicalModelName']) || // entPhysicalModelName = "73-7036-1 rev 80 dev 0"
|
||||
preg_match('/^\.+$/', $entPhysical['entPhysicalModelName'])) // entPhysicalModelName = "..."
|
||||
{
|
||||
// F.u. Cisco again.. again..
|
||||
// i.e.: entPhysicalModelName = "73-7036-1 rev 80 dev 0",
|
||||
// entPhysicalDescr = "12404/PRP chassis, Hw Serial#: TBA07510208, Hw Revision: 0x00"
|
||||
} else {
|
||||
$hardware = $entPhysical['entPhysicalModelName'];
|
||||
}
|
||||
} else {
|
||||
$hardware = str_replace(' chassis', '', $entPhysical['entPhysicalName']);
|
||||
}
|
||||
if (!empty($entPhysical['entPhysicalSerialNum'])) {
|
||||
$serial = $entPhysical['entPhysicalSerialNum'];
|
||||
}
|
||||
}
|
||||
if (!empty($entPhysical['entPhysicalModelName'])) {
|
||||
if (preg_match('/ (rev|dev)/', $entPhysical['entPhysicalModelName']) || // entPhysicalModelName = "73-7036-1 rev 80 dev 0"
|
||||
preg_match('/^\.+$/', $entPhysical['entPhysicalModelName'])) // entPhysicalModelName = "..."
|
||||
{
|
||||
// F.u. Cisco again.. again..
|
||||
// i.e.: entPhysicalModelName = "73-7036-1 rev 80 dev 0",
|
||||
// entPhysicalDescr = "12404/PRP chassis, Hw Serial#: TBA07510208, Hw Revision: 0x00"
|
||||
} else {
|
||||
$hardware = $entPhysical['entPhysicalModelName'];
|
||||
}
|
||||
} else {
|
||||
$hardware = str_replace(' chassis', '', $entPhysical['entPhysicalName']);
|
||||
}
|
||||
if (!empty($entPhysical['entPhysicalSerialNum'])) {
|
||||
$serial = $entPhysical['entPhysicalSerialNum'];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// NOTE. In CISCO-PRODUCTS-MIB uses weird hardware names (entPhysicalName uses human readable names)
|
||||
@ -168,36 +140,38 @@ if (is_array($entPhysical)) {
|
||||
// sysObjectID [.1.3.6.1.4.1.9.1.1208]: cat29xxStack
|
||||
// entPhysicalModelName: WS-C2960S-F48TS-L
|
||||
if (empty($hardware) && $poll_device['sysObjectID']) {
|
||||
// Try translate instead duplicate get sysObjectID
|
||||
$hardware = snmp_translate($poll_device['sysObjectID'], 'SNMPv2-MIB:CISCO-PRODUCTS-MIB:CISCO-ENTITY-VENDORTYPE-OID-MIB');
|
||||
// Try translate instead duplicate get sysObjectID
|
||||
$hardware = snmp_translate($poll_device['sysObjectID'], 'SNMPv2-MIB:CISCO-PRODUCTS-MIB:CISCO-ENTITY-VENDORTYPE-OID-MIB');
|
||||
}
|
||||
if (empty($hardware)) {
|
||||
// If translate false, try get sysObjectID again
|
||||
$hardware = snmp_get_oid($device, 'sysObjectID.0', 'SNMPv2-MIB:CISCO-PRODUCTS-MIB:CISCO-ENTITY-VENDORTYPE-OID-MIB');
|
||||
// If translate false, try get sysObjectID again
|
||||
$hardware = snmp_get_oid($device, 'sysObjectID.0', 'SNMPv2-MIB:CISCO-PRODUCTS-MIB:CISCO-ENTITY-VENDORTYPE-OID-MIB');
|
||||
}
|
||||
|
||||
// Some cisco specific hardware rewrites
|
||||
if ($hardware) {
|
||||
$cisco_replace = [
|
||||
'/^[Cc]isco\s*(\d)/' => '\1', // Cisco 7604 -> 7604
|
||||
'/^cisco([a-z])/i' => '\1', // ciscoASR9010 -> ASR9010
|
||||
'/^cat(?:alyst)?(\d{4}[CGX]?)(\w+)(.)$/i' => 'WS-C\1-\2-\3', // cat296048TCS -> WS-C2960-48TC-S
|
||||
];
|
||||
$hardware = array_preg_replace($cisco_replace, $hardware);
|
||||
$cisco_replace = [
|
||||
'/^[Cc]isco\s*(\d)/' => '\1', // Cisco 7604 -> 7604
|
||||
'/^cisco([a-z])/i' => '\1', // ciscoASR9010 -> ASR9010
|
||||
'/^cat(?:alyst)?(\d{4}[CGX]?)(\w+)(.)$/i' => 'WS-C\1-\2-\3', // cat296048TCS -> WS-C2960-48TC-S
|
||||
'/^ACE\-?(\w+)\-?K9/' => 'ACE \1', // ACE4710K9 -> ACE 4710
|
||||
'/^ACE\-?(\w+)/' => 'ACE \1' // ACE4710 -> ACE 4710
|
||||
];
|
||||
$hardware = array_preg_replace($cisco_replace, $hardware);
|
||||
}
|
||||
|
||||
// Additional checks for IOS devices
|
||||
$ios_type = '';
|
||||
if ($device['os'] === 'ios' &&
|
||||
(str_icontains_array($hardware, 'AIRAP') || str_starts($hardware, 'AIR-'))) {
|
||||
$ios_type = 'wireless';
|
||||
$ios_type = 'wireless';
|
||||
} else {
|
||||
// Set type to a predefined type for the OS if it's not already set
|
||||
$ios_type = rewrite_definition_type($device, $poll_device['sysObjectID']);
|
||||
// Set type to a predefined type for the OS if it's not already set
|
||||
$ios_type = get_model_param($device, 'type', $poll_device['sysObjectID']);
|
||||
}
|
||||
|
||||
if (!empty($ios_type)) {
|
||||
$type = $ios_type;
|
||||
$type = $ios_type;
|
||||
}
|
||||
|
||||
unset($chassis, $model, $ios_type);
|
||||
|
@ -4,9 +4,9 @@
|
||||
*
|
||||
* This file is part of Observium.
|
||||
*
|
||||
* @package observium
|
||||
* @subpackage poller
|
||||
* @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2021 Observium Limited
|
||||
* @package observium
|
||||
* @subpackage poller
|
||||
* @copyright (C) Adam Armstrong
|
||||
*
|
||||
*/
|
||||
|
||||
@ -17,295 +17,446 @@
|
||||
// Darwin hostname.local 19.4.0 Darwin Kernel Version 19.4.0: Wed Mar 4 22:28:40 PST 2020; root:xnu-6153.101.6~15/RELEASE_X86_64 x86_64
|
||||
// Darwin hostname.local 19.5.0 Darwin Kernel Version 19.5.0: Tue May 26 20:41:44 PDT 2020; root:xnu-6153.121.2~2/RELEASE_X86_64 x86_64
|
||||
// Darwin hostname.local 20.3.0 Darwin Kernel Version 20.3.0: Thu Jan 21 00:07:06 PST 2021; root:xnu-7195.81.3~1/RELEASE_X86_64 x86_64
|
||||
// Darwin hostname.local 24.2.0 Darwin Kernel Version 24.2.0: Fri Dec 6 19:02:12 PST 2024; root:xnu-11215.61.5~2/RELEASE_ARM64_T6031 arm64
|
||||
if (preg_match('/Darwin Kernel Version (?<kernel>\d\S+): .* root\S+ (?<arch>\S+)/', $poll_device['sysDescr'], $matches)) {
|
||||
$kernel = $matches['kernel'];
|
||||
$arch = $matches['arch'];
|
||||
$kernel = $matches['kernel'];
|
||||
$arch = $matches['arch'];
|
||||
|
||||
$macos_kernels = [
|
||||
// Cats
|
||||
9 => [ 'version' => '10.5', 'name' => 'Leopard', 'icon' => '' ],
|
||||
10 => [ 'version' => '10.6', 'name' => 'Snow Leopard', 'icon' => '' ],
|
||||
11 => [ 'version' => '10.7', 'name' => 'Lion', 'icon' => 'macos-lion' ],
|
||||
12 => [ 'version' => '10.8', 'name' => 'Mountain Lion', 'icon' => 'macos-mountain-lion' ],
|
||||
// Mountains
|
||||
13 => [ 'version' => '10.9', 'name' => 'Mavericks', 'icon' => 'macos-mavericks' ],
|
||||
14 => [ 'version' => '10.10', 'name' => 'Yosemite', 'icon' => 'macos-yosemite' ],
|
||||
15 => [ 'version' => '10.11', 'name' => 'El Capitan', 'icon' => 'macos-el-capitan' ],
|
||||
16 => [ 'version' => '10.12', 'name' => 'Sierra', 'icon' => 'macos-sierra' ],
|
||||
17 => [ 'version' => '10.13', 'name' => 'High Sierra', 'icon' => 'macos-high-sierra' ],
|
||||
18 => [ 'version' => '10.14', 'name' => 'Mojave', 'icon' => 'macos-mojave' ],
|
||||
19 => [ 'version' => '10.15', 'name' => 'Catalina', 'icon' => 'macos-catalina' ],
|
||||
20 => [ 'version' => '11.0', 'name' => 'Big Sur', 'icon' => 'macos-big-sur' ],
|
||||
];
|
||||
$macos_kernels = [
|
||||
// Cats
|
||||
9 => [ 'version' => '10.5', 'name' => 'Leopard', 'icon' => '' ],
|
||||
10 => [ 'version' => '10.6', 'name' => 'Snow Leopard', 'icon' => '' ],
|
||||
11 => [ 'version' => '10.7', 'name' => 'Lion', 'icon' => 'macos-lion' ],
|
||||
12 => [ 'version' => '10.8', 'name' => 'Mountain Lion', 'icon' => 'macos-mountain-lion' ],
|
||||
// Mountains
|
||||
13 => [ 'version' => '10.9', 'name' => 'Mavericks', 'icon' => 'macos-mavericks' ],
|
||||
14 => [ 'version' => '10.10', 'name' => 'Yosemite', 'icon' => 'macos-yosemite' ],
|
||||
15 => [ 'version' => '10.11', 'name' => 'El Capitan', 'icon' => 'macos-el-capitan' ],
|
||||
16 => [ 'version' => '10.12', 'name' => 'Sierra', 'icon' => 'macos-sierra' ],
|
||||
17 => [ 'version' => '10.13', 'name' => 'High Sierra', 'icon' => 'macos-high-sierra' ],
|
||||
18 => [ 'version' => '10.14', 'name' => 'Mojave', 'icon' => 'macos-mojave' ],
|
||||
19 => [ 'version' => '10.15', 'name' => 'Catalina', 'icon' => 'macos-catalina' ],
|
||||
// Places
|
||||
20 => [ 'version' => '11', 'name' => 'Big Sur', 'icon' => 'macos-big-sur' ],
|
||||
21 => [ 'version' => '12', 'name' => 'Monterey', 'icon' => 'macos-monterey' ],
|
||||
22 => [ 'version' => '13', 'name' => 'Ventura', 'icon' => 'macos-ventura' ],
|
||||
23 => [ 'version' => '14', 'name' => 'Sonoma', 'icon' => 'macos-sonoma' ],
|
||||
24 => [ 'version' => '15', 'name' => 'Sequoia', 'icon' => 'macos-sequoia' ],
|
||||
];
|
||||
|
||||
// 19.5.0 -> 10.15.5, 14.0.0 -> 10.10
|
||||
list($k1, $k2, $k3) = explode('.', $kernel);
|
||||
if (isset($macos_kernels[$k1])) {
|
||||
$version = $macos_kernels[$k1]['version'] . '.' . $k2;
|
||||
if ($k3 > 0) {
|
||||
$version .= '.' . $k3;
|
||||
// 19.5.0 -> 10.15.5, 14.0.0 -> 10.10
|
||||
// 24.2.0 -> 15.2, 20.3.0 -> 11.3
|
||||
[ $k1, $k2, $k3 ] = explode('.', $kernel);
|
||||
if (isset($macos_kernels[$k1])) {
|
||||
$version = $macos_kernels[$k1]['version'] . '.' . $k2;
|
||||
if ($k3 > 0) {
|
||||
$version .= '.' . $k3;
|
||||
}
|
||||
$features = $macos_kernels[$k1]['name'];
|
||||
if (strlen($macos_kernels[$k1]['icon'])) {
|
||||
$icon = $macos_kernels[$k1]['icon'];
|
||||
}
|
||||
} else {
|
||||
$version = $kernel;
|
||||
}
|
||||
$features = $macos_kernels[$k1]['name'];
|
||||
if (strlen($macos_kernels[$k1]['icon'])) {
|
||||
$icon = $macos_kernels[$k1]['icon'];
|
||||
}
|
||||
} else {
|
||||
$version = $kernel;
|
||||
}
|
||||
} else {
|
||||
list(,,$version) = explode (' ', $poll_device['sysDescr']);
|
||||
[, , $version] = explode(' ', $poll_device['sysDescr']);
|
||||
}
|
||||
$hardware = rewrite_unix_hardware($poll_device['sysDescr']);
|
||||
|
||||
// Hardware/serial/type "extend" support
|
||||
if (is_device_mib($device, 'UCD-SNMP-MIB')) {
|
||||
// Append this line to /etc/snmp/snmpd.conf:
|
||||
// extend .1.3.6.1.4.1.2021.7890.2 hardware /usr/sbin/system_profiler SPHardwareDataType SPSoftwareDataType
|
||||
// restart service:
|
||||
// sudo launchctl unload -w /System/Library/LaunchDaemons/org.net-snmp.snmpd.plist
|
||||
// sudo launchctl load -w /System/Library/LaunchDaemons/org.net-snmp.snmpd.plist
|
||||
// Check output:
|
||||
// snmpget -v2c -c <community> <hostname> .1.3.6.1.4.1.2021.7890.2.3.1.2.8.104.97.114.100.119.97.114.101
|
||||
/*
|
||||
Hardware:
|
||||
// Append this line to /etc/snmp/snmpd.conf:
|
||||
// extend .1.3.6.1.4.1.2021.7890.2 hardware /usr/sbin/system_profiler SPHardwareDataType SPSoftwareDataType
|
||||
// restart service:
|
||||
// sudo launchctl unload -w /System/Library/LaunchDaemons/org.net-snmp.snmpd.plist
|
||||
// sudo launchctl load -w /System/Library/LaunchDaemons/org.net-snmp.snmpd.plist
|
||||
// Check output:
|
||||
// snmpget -v2c -c <community> <hostname> .1.3.6.1.4.1.2021.7890.2.3.1.2.8.104.97.114.100.119.97.114.101
|
||||
/*
|
||||
Hardware:
|
||||
|
||||
Hardware Overview:
|
||||
Hardware Overview:
|
||||
|
||||
Model Name: MacBook Pro
|
||||
Model Identifier: MacBookPro16,1
|
||||
Processor Name: 8-Core Intel Core i9
|
||||
Processor Speed: 2.3 GHz
|
||||
Number of Processors: 1
|
||||
Total Number of Cores: 8
|
||||
L2 Cache (per Core): 256 KB
|
||||
L3 Cache: 16 MB
|
||||
Hyper-Threading Technology: Enabled
|
||||
Memory: 16 GB
|
||||
System Firmware Version: 1554.80.3.0.0 (iBridge: 18.16.14347.0.0,0)
|
||||
Serial Number (system): C02ZJ6XXXXX
|
||||
Hardware UUID: XXXX-9AE6-5112-A312-XXXXXX
|
||||
Provisioning UDID: XXXX-9AE6-5112-A312-XXXXXX
|
||||
Activation Lock Status: Enabled
|
||||
Model Name: MacBook Pro
|
||||
Model Identifier: MacBookPro16,1
|
||||
Processor Name: 8-Core Intel Core i9
|
||||
Processor Speed: 2.3 GHz
|
||||
Number of Processors: 1
|
||||
Total Number of Cores: 8
|
||||
L2 Cache (per Core): 256 KB
|
||||
L3 Cache: 16 MB
|
||||
Hyper-Threading Technology: Enabled
|
||||
Memory: 16 GB
|
||||
System Firmware Version: 1554.80.3.0.0 (iBridge: 18.16.14347.0.0,0)
|
||||
Serial Number (system): C02ZJ6XXXXX
|
||||
Hardware UUID: XXXX-9AE6-5112-A312-XXXXXX
|
||||
Provisioning UDID: XXXX-9AE6-5112-A312-XXXXXX
|
||||
Activation Lock Status: Enabled
|
||||
|
||||
Software:
|
||||
Software:
|
||||
|
||||
System Software Overview:
|
||||
System Software Overview:
|
||||
|
||||
System Version: macOS 11.2.3 (20D91)
|
||||
Kernel Version: Darwin 20.3.0
|
||||
Boot Volume: Macintosh HD
|
||||
Boot Mode: Normal
|
||||
Computer Name: hostname
|
||||
User Name: System Administrator (root)
|
||||
Secure Virtual Memory: Enabled
|
||||
System Integrity Protection: Enabled
|
||||
Time since boot: 5 days 20:57
|
||||
*/
|
||||
System Version: macOS 11.2.3 (20D91)
|
||||
Kernel Version: Darwin 20.3.0
|
||||
Boot Volume: Macintosh HD
|
||||
Boot Mode: Normal
|
||||
Computer Name: hostname
|
||||
User Name: System Administrator (root)
|
||||
Secure Virtual Memory: Enabled
|
||||
System Integrity Protection: Enabled
|
||||
Time since boot: 5 days 20:57
|
||||
*/
|
||||
|
||||
$hw = snmp_get_oid($device, '.1.3.6.1.4.1.2021.7890.2.3.1.2.8.104.97.114.100.119.97.114.101', 'UCD-SNMP-MIB');
|
||||
if (strlen($hw)) {
|
||||
$hw = snmp_get_oid($device, '.1.3.6.1.4.1.2021.7890.2.3.1.2.8.104.97.114.100.119.97.114.101', 'UCD-SNMP-MIB');
|
||||
if (strlen($hw)) {
|
||||
|
||||
$hw_array = [];
|
||||
foreach (explode("\n", $hw) as $line) {
|
||||
list($param, $value) = explode(': ', trim($line), 2);
|
||||
$hw_array = [];
|
||||
foreach (explode("\n", $hw) as $line) {
|
||||
[$param, $value] = explode(': ', trim($line), 2);
|
||||
|
||||
switch ($param) {
|
||||
case 'Model Name':
|
||||
case 'Model Identifier':
|
||||
case 'Processor Name':
|
||||
case 'Processor Speed':
|
||||
case 'Number of Processors':
|
||||
case 'Total Number of Cores':
|
||||
case 'Memory':
|
||||
// useful info for detect hardware
|
||||
$param = strtolower(str_replace(' ', '_', $param));
|
||||
$hw_array[$param] = $value;
|
||||
break;
|
||||
switch ($param) {
|
||||
case 'Model Name':
|
||||
case 'Model Identifier':
|
||||
case 'Processor Name':
|
||||
case 'Processor Speed':
|
||||
case 'Number of Processors':
|
||||
case 'Total Number of Cores':
|
||||
case 'Memory':
|
||||
// useful info for detect hardware
|
||||
$param = strtolower(str_replace(' ', '_', $param));
|
||||
$hw_array[$param] = $value;
|
||||
break;
|
||||
|
||||
case 'Serial Number (system)':
|
||||
$serial = $value;
|
||||
break;
|
||||
case 'Serial Number (system)':
|
||||
$serial = $value;
|
||||
break;
|
||||
|
||||
case 'System Version':
|
||||
// accurate version
|
||||
list(, $version) = explode(' ', $value);
|
||||
break;
|
||||
case 'System Version':
|
||||
// accurate version
|
||||
[, $version] = explode(' ', $value);
|
||||
break;
|
||||
|
||||
case 'Time since boot':
|
||||
// accurate uptime?..
|
||||
break;
|
||||
}
|
||||
case 'Time since boot':
|
||||
// accurate uptime?..
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if ($hw_array) {
|
||||
print_debug_vars($hw_array);
|
||||
$hardware = $hw_array['model_name'];
|
||||
|
||||
// idents
|
||||
preg_match('/^(?<base>[a-z]+)(?<num>[\d,]+)/i', $hw_array['model_identifier'], $ident);
|
||||
|
||||
if (str_starts($hw_array['model_identifier'], ['iMacPro', 'MacPro'])) {
|
||||
// iMacPro1,1 - iMac Pro "10-Core" 3.0 27-Inch (5K, Late 2017)
|
||||
// MacPro7,1 - Mac Pro "28-Core" 2.5 (2019)
|
||||
// MacPro7,1 - Mac Pro "28-Core" 2.5 (2019 - Rack)
|
||||
$type = 'workstation';
|
||||
|
||||
// append processor cores
|
||||
$hardware .= ' "' . $hw_array['total_number_of_cores'] . '-Core"';
|
||||
// append processor speed
|
||||
$hardware .= ' ' . preg_replace('/[^\d\.]+$/', '', $hw_array['processor_speed']);
|
||||
// extra
|
||||
if ($ident['base'] === 'iMacPro') {
|
||||
switch ($ident['num']) {
|
||||
case '1,1':
|
||||
$hardware .= ' 27-Inch (Late 2017, 5K)';
|
||||
break;
|
||||
//case '1,2': $hardware .= ' (Early 2013)'; break;
|
||||
}
|
||||
} elseif ($ident['base'] === 'MacPro') {
|
||||
switch ($ident['num']) {
|
||||
case '4,1':
|
||||
$hardware .= ' (2009)';
|
||||
break;
|
||||
case '5,1':
|
||||
$hardware .= ' (2012)';
|
||||
break;
|
||||
case '6,1':
|
||||
$hardware .= ' (Late 2013)';
|
||||
break;
|
||||
case '7,1':
|
||||
$hardware .= ' (2019)';
|
||||
break;
|
||||
}
|
||||
}
|
||||
} elseif (str_starts($hw_array['model_identifier'], ['iMac', 'Macmini', 'MacBook'])) {
|
||||
// iMac19,2 - iMac 21.5-Inch "Core i7" 3.2 (4K, 2019)
|
||||
// Macmini8,1 - Mac mini "Core i7" 3.2 (Late 2018)
|
||||
// MacBook10,1 - MacBook "Core m3" 1.2 12" (Mid-2017)
|
||||
// MacBookAir9,1 - MacBook Air "Core i7" 1.2 13" (Scissor, 2020)
|
||||
// MacBookPro16,1 - MacBook Pro 16-Inch "Core i9" 2.4 2019 (Scissor)
|
||||
$type = 'workstation';
|
||||
|
||||
// append processor
|
||||
$hardware .= ' "' . preg_replace('/^.*Intel /', '', $hw_array['processor_name']) . '"';
|
||||
// append processor speed
|
||||
$hardware .= ' ' . preg_replace('/[^\d\.]+$/', '', $hw_array['processor_speed']);
|
||||
// extra
|
||||
if ($ident['base'] === 'MacBookPro') {
|
||||
switch ($ident['num']) {
|
||||
case '10,1':
|
||||
$hardware .= ' 15" (Early 2013)';
|
||||
break;
|
||||
case '10,2':
|
||||
$hardware .= ' 13" (Early 2013)';
|
||||
break;
|
||||
|
||||
case '11,1':
|
||||
$hardware .= ' 13" (Late 2013)';
|
||||
break;
|
||||
case '11,2':
|
||||
$hardware .= ' 15" (Late 2013, IG)';
|
||||
break;
|
||||
case '11,3':
|
||||
$hardware .= ' 15" (Late 2013, DG)';
|
||||
break;
|
||||
case '11,4':
|
||||
$hardware .= ' 15" (Mid-2015, IG)';
|
||||
break;
|
||||
case '11,5':
|
||||
$hardware .= ' 15" (Mid-2015, DG)';
|
||||
break;
|
||||
|
||||
case '12,1':
|
||||
$hardware .= ' 13" (Early 2015)';
|
||||
break;
|
||||
case '12,2':
|
||||
$hardware .= ' 13" (Early 2015)';
|
||||
break;
|
||||
case '12,3':
|
||||
$hardware .= ' 15" (Early 2015)';
|
||||
break;
|
||||
|
||||
case '13,1':
|
||||
$hardware .= ' 13" (Late 2016)';
|
||||
break;
|
||||
case '13,2':
|
||||
$hardware .= ' 13" (Touch/Late 2016)';
|
||||
break;
|
||||
case '13,3':
|
||||
$hardware .= ' 15" (Touch/Late 2016)';
|
||||
break;
|
||||
|
||||
case '14,1':
|
||||
$hardware .= ' 13" (Mid 2017)';
|
||||
break;
|
||||
case '14,2':
|
||||
$hardware .= ' 13" (Touch/Mid 2017)';
|
||||
break;
|
||||
case '14,3':
|
||||
$hardware .= ' 15" (Touch/Mid 2017)';
|
||||
break;
|
||||
|
||||
case '15,1':
|
||||
$hardware .= ' 15" (2018)';
|
||||
break;
|
||||
case '15,2':
|
||||
$hardware .= ' 13" (2018)';
|
||||
break;
|
||||
case '15,3':
|
||||
$hardware .= ' 13" (2018, Vega)';
|
||||
break;
|
||||
case '15,4':
|
||||
$hardware .= ' 13" (2019, 2)';
|
||||
break;
|
||||
|
||||
case '16,1':
|
||||
$hardware .= ' 16" (2019)';
|
||||
break;
|
||||
case '16,2':
|
||||
$hardware .= ' 13" (2020, 4)';
|
||||
break;
|
||||
case '16,3':
|
||||
$hardware .= ' 13" (2020, 2)';
|
||||
break;
|
||||
case '16,4':
|
||||
$hardware .= ' 16" (2019, 5600M)';
|
||||
break;
|
||||
|
||||
case '17,1':
|
||||
$hardware .= ' 13" (M1, 2020)';
|
||||
break;
|
||||
}
|
||||
} elseif ($ident['base'] === 'MacBookAir') {
|
||||
switch ($ident['num']) {
|
||||
case '5,1':
|
||||
$hardware .= ' 11" (Mid 2012)';
|
||||
break;
|
||||
case '5,2':
|
||||
$hardware .= ' 13" (Mid 2012)';
|
||||
break;
|
||||
|
||||
case '6,1':
|
||||
$hardware .= ' 11" (Early 2014)';
|
||||
break;
|
||||
case '6,2':
|
||||
$hardware .= ' 13" (Early 2014)';
|
||||
break;
|
||||
|
||||
case '7,1':
|
||||
$hardware .= ' 11" (Early 2015)';
|
||||
break;
|
||||
case '7,2':
|
||||
$hardware .= ' 13" (Early 2015)';
|
||||
break;
|
||||
|
||||
case '8,1':
|
||||
$hardware .= ' 13" (Late 2018)';
|
||||
break;
|
||||
case '8,2':
|
||||
$hardware .= ' 13" (2019)';
|
||||
break;
|
||||
|
||||
case '9,1':
|
||||
$hardware .= ' 13" (2020)';
|
||||
break;
|
||||
//case '9,2': $hardware .= ' 13" (Early 2013)'; break;
|
||||
|
||||
case '10,1':
|
||||
$hardware .= ' 13" (M1, 2020)';
|
||||
break;
|
||||
}
|
||||
} elseif ($ident['base'] === 'Macmini') {
|
||||
switch ($ident['num']) {
|
||||
case '5,1':
|
||||
$hardware .= ' (Mid 2011)';
|
||||
break;
|
||||
case '5,2':
|
||||
$hardware .= ' (Mid 2011)';
|
||||
break;
|
||||
case '5,3':
|
||||
$hardware .= ' (Mid 2011)';
|
||||
$type = 'server';
|
||||
break; // Server
|
||||
|
||||
case '6,1':
|
||||
$hardware .= ' (Late 2012)';
|
||||
break;
|
||||
case '6,2':
|
||||
$hardware .= ' (Late 2012)';
|
||||
$type = 'server';
|
||||
break; // Server
|
||||
|
||||
case '7,1':
|
||||
$hardware .= ' (Late 2014)';
|
||||
break;
|
||||
|
||||
case '8,1':
|
||||
$hardware .= ' (Late 2018)';
|
||||
break;
|
||||
|
||||
case '9,1':
|
||||
$hardware .= ' (M1, 2020)';
|
||||
break;
|
||||
}
|
||||
} elseif ($ident['base'] === 'iMac') {
|
||||
switch ($ident['num']) {
|
||||
case '13,1':
|
||||
$hardware .= ' (Late 2012)';
|
||||
break;
|
||||
case '13,2':
|
||||
$hardware .= ' (Late 2012)';
|
||||
break;
|
||||
|
||||
case '14,1':
|
||||
$hardware .= ' (Late 2013)';
|
||||
break;
|
||||
case '14,2':
|
||||
$hardware .= ' (Late 2013)';
|
||||
break;
|
||||
case '14,3':
|
||||
$hardware .= ' (Late 2013)';
|
||||
break;
|
||||
case '14,4':
|
||||
$hardware .= ' (Mid 2014)';
|
||||
break;
|
||||
|
||||
case '15,1':
|
||||
$hardware .= ' (Late 2014, 5K)';
|
||||
break;
|
||||
|
||||
case '16,1':
|
||||
$hardware .= ' (Late 2015)';
|
||||
break;
|
||||
case '16,2':
|
||||
$hardware .= ' (Late 2015, 4K)';
|
||||
break;
|
||||
|
||||
case '17,1':
|
||||
$hardware .= ' (Late 2015, 5K)';
|
||||
break;
|
||||
//case '17,2': $hardware .= ' (Mid-2017, 4K)'; break;
|
||||
//case '17,3': $hardware .= ' (Mid-2017, 5K)'; break;
|
||||
|
||||
case '18,1':
|
||||
$hardware .= ' (Mid 2017)';
|
||||
break;
|
||||
case '18,2':
|
||||
$hardware .= ' (Mid 2017, 4K)';
|
||||
break;
|
||||
case '18,3':
|
||||
$hardware .= ' (Mid 2017, 5K)';
|
||||
break;
|
||||
|
||||
case '19,1':
|
||||
$hardware .= ' 27-Inch (2019)';
|
||||
break;
|
||||
case '19,2':
|
||||
$hardware .= ' 21.5-Inch (2019, 4K)';
|
||||
break;
|
||||
case '19,3':
|
||||
$hardware .= ' (2019, 5K)';
|
||||
break;
|
||||
|
||||
case '20,1':
|
||||
$hardware .= ' 27-Inch (Mid 2020, 5K)';
|
||||
break;
|
||||
case '20,2':
|
||||
$hardware .= ' 27-Inch (Mid 2020, 5K, 5700/XT)';
|
||||
break;
|
||||
|
||||
case '21,1':
|
||||
$hardware .= ' 24-Inch (M1, 2021)';
|
||||
break; // 8-Core
|
||||
case '21,2':
|
||||
$hardware .= ' 24-Inch (M1, 2021, 7c)';
|
||||
break; // 7-Core
|
||||
}
|
||||
}
|
||||
} elseif (str_starts($hw_array['model_identifier'], ['PowerBook', 'PowerMac'])) {
|
||||
// PowerBook5,9 - PowerBook G4 1.67 17" (DLSD/HR - Al)
|
||||
// PowerMac11,2 - Power Macintosh G5 "Quad Core" (2.5)
|
||||
$type = 'workstation';
|
||||
} elseif (str_starts($hw_array['model_identifier'], ['RackMac', 'Xserve'])) {
|
||||
$type = 'server';
|
||||
|
||||
// append processor speed
|
||||
$hardware .= ' ' . preg_replace('/[^\d\.]+$/', '', $hw_array['processor_speed']);
|
||||
// append processor cores
|
||||
$hardware .= ' "' . $hw_array['total_number_of_cores'] . '-Core"';
|
||||
// extra
|
||||
if ($ident['base'] === 'Xserve') {
|
||||
switch ($ident['num']) {
|
||||
case '1,1':
|
||||
$hardware .= ' (Late 2006)';
|
||||
break;
|
||||
case '2,1':
|
||||
$hardware .= ' (Early 2008)';
|
||||
break;
|
||||
case '3,1':
|
||||
$hardware .= ' (Early 2009)';
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ($hw_array) {
|
||||
print_debug_vars($hw_array);
|
||||
$hardware = $hw_array['model_name'];
|
||||
|
||||
// idents
|
||||
preg_match('/^(?<base>[a-z]+)(?<num>[\d,]+)/i', $hw_array['model_identifier'], $ident);
|
||||
|
||||
if (str_starts($hw_array['model_identifier'], [ 'iMacPro', 'MacPro' ])) {
|
||||
// iMacPro1,1 - iMac Pro "10-Core" 3.0 27-Inch (5K, Late 2017)
|
||||
// MacPro7,1 - Mac Pro "28-Core" 2.5 (2019)
|
||||
// MacPro7,1 - Mac Pro "28-Core" 2.5 (2019 - Rack)
|
||||
$type = 'workstation';
|
||||
|
||||
// append processor cores
|
||||
$hardware .= ' "' . $hw_array['total_number_of_cores'] . '-Core"';
|
||||
// append processor speed
|
||||
$hardware .= ' ' . preg_replace('/[^\d\.]+$/', '', $hw_array['processor_speed']);
|
||||
// extra
|
||||
if ($ident['base'] === 'iMacPro') {
|
||||
switch ($ident['num']) {
|
||||
case '1,1': $hardware .= ' 27-Inch (Late 2017, 5K)'; break;
|
||||
//case '1,2': $hardware .= ' (Early 2013)'; break;
|
||||
}
|
||||
} elseif ($ident['base'] === 'MacPro') {
|
||||
switch ($ident['num']) {
|
||||
case '4,1': $hardware .= ' (2009)'; break;
|
||||
case '5,1': $hardware .= ' (2012)'; break;
|
||||
case '6,1': $hardware .= ' (Late 2013)'; break;
|
||||
case '7,1': $hardware .= ' (2019)'; break;
|
||||
}
|
||||
}
|
||||
} elseif (str_starts($hw_array['model_identifier'], [ 'iMac', 'Macmini', 'MacBook' ])) {
|
||||
// iMac19,2 - iMac 21.5-Inch "Core i7" 3.2 (4K, 2019)
|
||||
// Macmini8,1 - Mac mini "Core i7" 3.2 (Late 2018)
|
||||
// MacBook10,1 - MacBook "Core m3" 1.2 12" (Mid-2017)
|
||||
// MacBookAir9,1 - MacBook Air "Core i7" 1.2 13" (Scissor, 2020)
|
||||
// MacBookPro16,1 - MacBook Pro 16-Inch "Core i9" 2.4 2019 (Scissor)
|
||||
$type = 'workstation';
|
||||
|
||||
// append processor
|
||||
$hardware .= ' "' . preg_replace('/^.*Intel /', '', $hw_array['processor_name']) . '"';
|
||||
// append processor speed
|
||||
$hardware .= ' ' . preg_replace('/[^\d\.]+$/', '', $hw_array['processor_speed']);
|
||||
// extra
|
||||
if ($ident['base'] === 'MacBookPro') {
|
||||
switch ($ident['num']) {
|
||||
case '10,1': $hardware .= ' 15" (Early 2013)'; break;
|
||||
case '10,2': $hardware .= ' 13" (Early 2013)'; break;
|
||||
|
||||
case '11,1': $hardware .= ' 13" (Late 2013)'; break;
|
||||
case '11,2': $hardware .= ' 15" (Late 2013, IG)'; break;
|
||||
case '11,3': $hardware .= ' 15" (Late 2013, DG)'; break;
|
||||
case '11,4': $hardware .= ' 15" (Mid-2015, IG)'; break;
|
||||
case '11,5': $hardware .= ' 15" (Mid-2015, DG)'; break;
|
||||
|
||||
case '12,1': $hardware .= ' 13" (Early 2015)'; break;
|
||||
case '12,2': $hardware .= ' 13" (Early 2015)'; break;
|
||||
case '12,3': $hardware .= ' 15" (Early 2015)'; break;
|
||||
|
||||
case '13,1': $hardware .= ' 13" (Late 2016)'; break;
|
||||
case '13,2': $hardware .= ' 13" (Touch/Late 2016)'; break;
|
||||
case '13,3': $hardware .= ' 15" (Touch/Late 2016)'; break;
|
||||
|
||||
case '14,1': $hardware .= ' 13" (Mid 2017)'; break;
|
||||
case '14,2': $hardware .= ' 13" (Touch/Mid 2017)'; break;
|
||||
case '14,3': $hardware .= ' 15" (Touch/Mid 2017)'; break;
|
||||
|
||||
case '15,1': $hardware .= ' 15" (2018)'; break;
|
||||
case '15,2': $hardware .= ' 13" (2018)'; break;
|
||||
case '15,3': $hardware .= ' 13" (2018, Vega)'; break;
|
||||
case '15,4': $hardware .= ' 13" (2019, 2)'; break;
|
||||
|
||||
case '16,1': $hardware .= ' 16" (2019)'; break;
|
||||
case '16,2': $hardware .= ' 13" (2020, 4)'; break;
|
||||
case '16,3': $hardware .= ' 13" (2020, 2)'; break;
|
||||
case '16,4': $hardware .= ' 16" (2019, 5600M)'; break;
|
||||
|
||||
case '17,1': $hardware .= ' 13" (M1, 2020)'; break;
|
||||
}
|
||||
} elseif ($ident['base'] === 'MacBookAir') {
|
||||
switch ($ident['num']) {
|
||||
case '5,1': $hardware .= ' 11" (Mid 2012)'; break;
|
||||
case '5,2': $hardware .= ' 13" (Mid 2012)'; break;
|
||||
|
||||
case '6,1': $hardware .= ' 11" (Early 2014)'; break;
|
||||
case '6,2': $hardware .= ' 13" (Early 2014)'; break;
|
||||
|
||||
case '7,1': $hardware .= ' 11" (Early 2015)'; break;
|
||||
case '7,2': $hardware .= ' 13" (Early 2015)'; break;
|
||||
|
||||
case '8,1': $hardware .= ' 13" (Late 2018)'; break;
|
||||
case '8,2': $hardware .= ' 13" (2019)'; break;
|
||||
|
||||
case '9,1': $hardware .= ' 13" (2020)'; break;
|
||||
//case '9,2': $hardware .= ' 13" (Early 2013)'; break;
|
||||
|
||||
case '10,1': $hardware .= ' 13" (M1, 2020)'; break;
|
||||
}
|
||||
} elseif ($ident['base'] === 'Macmini') {
|
||||
switch ($ident['num']) {
|
||||
case '5,1': $hardware .= ' (Mid 2011)'; break;
|
||||
case '5,2': $hardware .= ' (Mid 2011)'; break;
|
||||
case '5,3': $hardware .= ' (Mid 2011)'; $type = 'server'; break; // Server
|
||||
|
||||
case '6,1': $hardware .= ' (Late 2012)'; break;
|
||||
case '6,2': $hardware .= ' (Late 2012)'; $type = 'server'; break; // Server
|
||||
|
||||
case '7,1': $hardware .= ' (Late 2014)'; break;
|
||||
|
||||
case '8,1': $hardware .= ' (Late 2018)'; break;
|
||||
|
||||
case '9,1': $hardware .= ' (M1, 2020)'; break;
|
||||
}
|
||||
} elseif ($ident['base'] === 'iMac') {
|
||||
switch ($ident['num']) {
|
||||
case '13,1': $hardware .= ' (Late 2012)'; break;
|
||||
case '13,2': $hardware .= ' (Late 2012)'; break;
|
||||
|
||||
case '14,1': $hardware .= ' (Late 2013)'; break;
|
||||
case '14,2': $hardware .= ' (Late 2013)'; break;
|
||||
case '14,3': $hardware .= ' (Late 2013)'; break;
|
||||
case '14,4': $hardware .= ' (Mid 2014)'; break;
|
||||
|
||||
case '15,1': $hardware .= ' (Late 2014, 5K)'; break;
|
||||
|
||||
case '16,1': $hardware .= ' (Late 2015)'; break;
|
||||
case '16,2': $hardware .= ' (Late 2015, 4K)'; break;
|
||||
|
||||
case '17,1': $hardware .= ' (Late 2015, 5K)'; break;
|
||||
//case '17,2': $hardware .= ' (Mid-2017, 4K)'; break;
|
||||
//case '17,3': $hardware .= ' (Mid-2017, 5K)'; break;
|
||||
|
||||
case '18,1': $hardware .= ' (Mid 2017)'; break;
|
||||
case '18,2': $hardware .= ' (Mid 2017, 4K)'; break;
|
||||
case '18,3': $hardware .= ' (Mid 2017, 5K)'; break;
|
||||
|
||||
case '19,1': $hardware .= ' 27-Inch (2019)'; break;
|
||||
case '19,2': $hardware .= ' 21.5-Inch (2019, 4K)'; break;
|
||||
case '19,3': $hardware .= ' (2019, 5K)'; break;
|
||||
|
||||
case '20,1': $hardware .= ' 27-Inch (Mid 2020, 5K)'; break;
|
||||
case '20,2': $hardware .= ' 27-Inch (Mid 2020, 5K, 5700/XT)'; break;
|
||||
|
||||
case '21,1': $hardware .= ' 24-Inch (M1, 2021)'; break; // 8-Core
|
||||
case '21,2': $hardware .= ' 24-Inch (M1, 2021, 7c)'; break; // 7-Core
|
||||
}
|
||||
}
|
||||
} elseif (str_starts($hw_array['model_identifier'], [ 'PowerBook', 'PowerMac' ])) {
|
||||
// PowerBook5,9 - PowerBook G4 1.67 17" (DLSD/HR - Al)
|
||||
// PowerMac11,2 - Power Macintosh G5 "Quad Core" (2.5)
|
||||
$type = 'workstation';
|
||||
} elseif (str_starts($hw_array['model_identifier'], [ 'RackMac', 'Xserve' ])) {
|
||||
$type = 'server';
|
||||
|
||||
// append processor speed
|
||||
$hardware .= ' ' . preg_replace('/[^\d\.]+$/', '', $hw_array['processor_speed']);
|
||||
// append processor cores
|
||||
$hardware .= ' "' . $hw_array['total_number_of_cores'] . '-Core"';
|
||||
// extra
|
||||
if ($ident['base'] === 'Xserve') {
|
||||
switch ($ident['num']) {
|
||||
case '1,1': $hardware .= ' (Late 2006)'; break;
|
||||
case '2,1': $hardware .= ' (Early 2008)'; break;
|
||||
case '3,1': $hardware .= ' (Early 2009)'; break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* https://everymac.com/systems/by_capability/mac-specs-by-machine-model-machine-id.html
|
||||
|
@ -5,44 +5,39 @@
|
||||
*
|
||||
* This file is part of Observium.
|
||||
*
|
||||
* @package observium
|
||||
* @subpackage poller
|
||||
* @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2019 Observium Limited
|
||||
* @package observium
|
||||
* @subpackage poller
|
||||
* @copyright (C) Adam Armstrong
|
||||
*
|
||||
*/
|
||||
|
||||
# SNMPv2-SMI::enterprises.253.8.51.10.2.1.7.2.28110202 = STRING: "MFG:Dell;CMD:PJL,RASTER,DOWNLOAD,PCLXL,PCL,POSTSCRIPT;MDL:Laser Printer
|
||||
# 3100cn;DES:Dell Laser Printer 3100cn;CLS:PRINTER;STS:AAAMAwAAAAAAAgJ/HgMKBigDCgY8AwAzcJqwggAAwAAACAAAAAAA/w==;"
|
||||
|
||||
$modelinfo = explode(';',snmp_get($device, '1.3.6.1.4.1.253.8.51.10.2.1.7.2.28110202', '-OQv'));
|
||||
$modelinfo = explode(';', snmp_get($device, '1.3.6.1.4.1.253.8.51.10.2.1.7.2.28110202', '-OQv'));
|
||||
|
||||
# SNMPv2-SMI::enterprises.674.10898.100.2.1.2.1.3.1 = STRING: "COMMAND SET:;MODEL:Dell Laser Printer 5310n"
|
||||
$modelinfo = array_merge($modelinfo,explode(';',snmp_get($device, '1.3.6.1.4.1.674.10898.100.2.1.2.1.3.1', '-OQv')));
|
||||
$modelinfo = array_merge($modelinfo, explode(';', snmp_get($device, '1.3.6.1.4.1.674.10898.100.2.1.2.1.3.1', '-OQv')));
|
||||
|
||||
# SNMPv2-SMI::enterprises.641.2.1.2.1.3.1 = STRING: "COMMAND SET:;MODEL:Dell Laser Printer 1700n"
|
||||
$modelinfo = array_merge($modelinfo,explode(';',snmp_get($device, '1.3.6.1.4.1.641.2.1.2.1.3.1', '-OQv')));
|
||||
$modelinfo = array_merge($modelinfo, explode(';', snmp_get($device, '1.3.6.1.4.1.641.2.1.2.1.3.1', '-OQv')));
|
||||
|
||||
foreach ($modelinfo as $line)
|
||||
{
|
||||
list($key,$value) = explode(':',$line);
|
||||
$dell_laser[$key] = $value;
|
||||
foreach ($modelinfo as $line) {
|
||||
[$key, $value] = explode(':', $line);
|
||||
$dell_laser[$key] = $value;
|
||||
}
|
||||
|
||||
$hardware = ($dell_laser['MDL'] != '' ? $dell_laser['MDL'] : $dell_laser['MODEL']);
|
||||
|
||||
list(,$version) = explode('Engine ',$poll_device['sysDescr']);
|
||||
[, $version] = explode('Engine ', $poll_device['sysDescr']);
|
||||
|
||||
if ($version)
|
||||
{
|
||||
$version = 'Engine ' . trim($version,')');
|
||||
}
|
||||
else
|
||||
{
|
||||
$version = snmp_get($device, '1.3.6.1.4.1.674.10898.100.1.1.1.0', '-OQv');
|
||||
if (!$version)
|
||||
{
|
||||
$version = snmp_get($device, '1.3.6.1.4.1.641.1.1.1.0', '-OQv');
|
||||
}
|
||||
if ($version) {
|
||||
$version = 'Engine ' . trim($version, ')');
|
||||
} else {
|
||||
$version = snmp_get($device, '1.3.6.1.4.1.674.10898.100.1.1.1.0', '-OQv');
|
||||
if (!$version) {
|
||||
$version = snmp_get($device, '1.3.6.1.4.1.641.1.1.1.0', '-OQv');
|
||||
}
|
||||
}
|
||||
|
||||
// EOF
|
||||
|
@ -5,9 +5,9 @@
|
||||
*
|
||||
* This file is part of Observium.
|
||||
*
|
||||
* @package observium
|
||||
* @subpackage poller
|
||||
* @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2019 Observium Limited
|
||||
* @package observium
|
||||
* @subpackage poller
|
||||
* @copyright (C) Adam Armstrong
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -1,5 +1,4 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Observium
|
||||
*
|
||||
@ -7,53 +6,53 @@
|
||||
*
|
||||
* @package observium
|
||||
* @subpackage poller
|
||||
* @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2019 Observium Limited
|
||||
* @copyright (C) Adam Armstrong
|
||||
*
|
||||
*/
|
||||
|
||||
if (preg_match('/^(?:dlink |d-link )?(?<hardware>[a-z]+\-\d+[\w\/-]+) +(?<features>.+)/i', $poll_device['sysDescr'], $matches) ||
|
||||
preg_match('/^(?:dlink |d-link )?(?<hardware>[a-z]+\-\d+[\w\/-]+)/i', $poll_device['sysDescr'], $matches))
|
||||
{
|
||||
//D-Link DES-1228/ME Metro Ethernet Switch
|
||||
//D-Link DES-3026 Fast Ethernet Switch
|
||||
//D-Link DES-3028P Fast Ethernet Switch
|
||||
//D-Link DES-3200-28 Fast Ethernet Switch
|
||||
//DES-3200-10/C1 Fast Ethernet Switch
|
||||
//DES-3200-28P Fast Ethernet Switch
|
||||
//DES-3226S Fast-Ethernet Switch
|
||||
//DES-3526 Fast-Ethernet Switch
|
||||
//DGS-1224T 4.21.02
|
||||
//DES-1210-28/ME 6.07.B004
|
||||
//DGS-3120-24SC Gigabit Ethernet Switch
|
||||
//DGS-3450 Gigabit Ethernet Switch
|
||||
//DGS-3627G Gigabit Ethernet Switch
|
||||
//DES-2110 V1.01.02
|
||||
//DES-1210-28/ME/B2
|
||||
$hardware = $matches['hardware'];
|
||||
if (preg_match('/^V?(\d+\.)+[\w\-]+$/', $matches['features']))
|
||||
{
|
||||
//4.21.02
|
||||
//6.07.B004
|
||||
//V1.01.02
|
||||
$version = str_replace("V", "", $matches['features']);
|
||||
} else {
|
||||
//Fast-Ethernet Switch
|
||||
//Fast Ethernet Switch
|
||||
//Gigabit Ethernet Switch
|
||||
$features = str_replace('-', ' ', $matches['features']);
|
||||
}
|
||||
} else {
|
||||
// SINGLE-IP-MIB::swSingleIPPlatform.0 = STRING: "DES-3028P L2 Switch"
|
||||
list($hardware) = explode(' ', snmp_get($device, 'swSingleIPPlatform.0', '-Ovq', 'SINGLE-IP-MIB'));
|
||||
preg_match('/^(?:dlink |d-link )?(?<hardware>[a-z]+\-\d+[\w\/-]+)/i', $poll_device['sysDescr'], $matches)) {
|
||||
//D-Link DES-1228/ME Metro Ethernet Switch
|
||||
//D-Link DES-3026 Fast Ethernet Switch
|
||||
//D-Link DES-3028P Fast Ethernet Switch
|
||||
//D-Link DES-3200-28 Fast Ethernet Switch
|
||||
//DES-3200-10/C1 Fast Ethernet Switch
|
||||
//DES-3200-28P Fast Ethernet Switch
|
||||
//DES-3226S Fast-Ethernet Switch
|
||||
//DES-3526 Fast-Ethernet Switch
|
||||
//DGS-1224T 4.21.02
|
||||
//DES-1210-28/ME 6.07.B004
|
||||
//DGS-3120-24SC Gigabit Ethernet Switch
|
||||
//DGS-3450 Gigabit Ethernet Switch
|
||||
//DGS-3627G Gigabit Ethernet Switch
|
||||
//DES-2110 V1.01.02
|
||||
//DES-1210-28/ME/B2
|
||||
$hardware = $matches['hardware'];
|
||||
if (preg_match('/^V?(\d+\.)+[\w\-]+$/', $matches['features'])) {
|
||||
//4.21.02
|
||||
//6.07.B004
|
||||
//V1.01.02
|
||||
$version = str_replace("V", "", $matches['features']);
|
||||
} else {
|
||||
//Fast-Ethernet Switch
|
||||
//Fast Ethernet Switch
|
||||
//Gigabit Ethernet Switch
|
||||
$features = str_replace('-', ' ', $matches['features']);
|
||||
}
|
||||
} elseif ($hw = snmp_get_oid($device, 'swSingleIPPlatform.0', 'SINGLE-IP-MIB')) {
|
||||
// SINGLE-IP-MIB::swSingleIPPlatform.0 = STRING: "DES-3028P L2 Switch"
|
||||
$hardware = explode(' ', $hw)[0];
|
||||
}
|
||||
|
||||
if (!$version)
|
||||
{
|
||||
// DLINK-EQUIPMENT-MIB::swUnitMgmtVersion.1 = STRING: "6.00.B21"
|
||||
//$version = snmp_get($device, "swUnitMgmtVersion.1", "-Ovq", "DLINK-EQUIPMENT-MIB");
|
||||
// RMON2-MIB::probeSoftwareRev.0 = STRING: "Build 6.00.B21"
|
||||
$version = snmp_get($device, 'probeSoftwareRev.0', '-Ovq', 'RMON2-MIB');
|
||||
$version = str_replace('Build ', '', $version);
|
||||
if (!$version) {
|
||||
// DLINK-EQUIPMENT-MIB::swUnitMgmtVersion.1 = STRING: "6.00.B21"
|
||||
//$version = snmp_get($device, "swUnitMgmtVersion.1", "-Ovq", "DLINK-EQUIPMENT-MIB");
|
||||
// RMON2-MIB::probeSoftwareRev.0 = STRING: "Build 6.00.B21"
|
||||
$version = snmp_get_oid($device, 'probeSoftwareRev.0', 'RMON2-MIB');
|
||||
$version = str_replace('Build ', '', $version);
|
||||
// Clean Chinese hieroglyph:
|
||||
// 2.00.B2700.B27^D^MP1CV2C30<80>A<F1><B0>1
|
||||
$version = preg_replace('/^([[:print:]\p{L}]+).*/mu', '$1', $version);
|
||||
}
|
||||
|
||||
// HW revision is not required, but anyone can come in handy in the future.
|
||||
|
@ -1,39 +1,39 @@
|
||||
yy<?php
|
||||
|
||||
/**
|
||||
/**
|
||||
* Observium
|
||||
*
|
||||
* This file is part of Observium.
|
||||
*
|
||||
* @package observium
|
||||
* @subpackage poller
|
||||
* @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2016 Observium Limited
|
||||
* @package observium
|
||||
* @subpackage poller
|
||||
* @copyright (C) Adam Armstrong
|
||||
*
|
||||
*/
|
||||
|
||||
if (preg_match('/^(?:dlink |d-link )?(?<hardware>[a-z]+\-\d+[\w\/-]+)/i', $poll_device['sysDescr'], $matches)) {
|
||||
|
||||
//D-Link DAP-3520
|
||||
//D-Link Access Point
|
||||
//D-Link DAP-3520
|
||||
//D-Link Access Point
|
||||
|
||||
$hardware = $matches['hardware'];
|
||||
$hardware = $matches['hardware'];
|
||||
|
||||
//.1.3.6.1.4.1.171.10.37.37.5.1.1.0 = STRING: "1.15 09:34:09 01/21/2013"
|
||||
//DAP-3520-v115::deviceInformationFirmwareVersion.0 = STRING: "1.15 09:34:09 01/21/2013"
|
||||
//.1.3.6.1.4.1.171.10.37.37.5.1.1.0 = STRING: "1.15 09:34:09 01/21/2013"
|
||||
//DAP-3520-v115::deviceInformationFirmwareVersion.0 = STRING: "1.15 09:34:09 01/21/2013"
|
||||
|
||||
$version = snmp_get($device, '.1.3.6.1.4.1.171.10.37.37.5.1.1.0', '-Ovq', 'RMON2-MIB');
|
||||
$version = snmp_get($device, '.1.3.6.1.4.1.171.10.37.37.5.1.1.0', '-Ovq', 'RMON2-MIB');
|
||||
|
||||
} else {
|
||||
|
||||
//.1.3.6.1.4.1.171.10.37.20.1.9.0 = STRING: "v2.58RU"
|
||||
//DWL-3200::systemFirmwareVersion.0 = STRING: "v2.58RU"
|
||||
//$version = snmp_get($device, 'systemFirmwareVersion.0', '-Ovq', 'APMII-DWL-3200AP-MIB');
|
||||
//.1.3.6.1.4.1.171.10.37.20.1.9.0 = STRING: "v2.58RU"
|
||||
//DWL-3200::systemFirmwareVersion.0 = STRING: "v2.58RU"
|
||||
//$version = snmp_get($device, 'systemFirmwareVersion.0', '-Ovq', 'APMII-DWL-3200AP-MIB');
|
||||
|
||||
$version = snmp_get($device, '.1.3.6.1.4.1.171.10.37.20.5.1.1.0', '-Ovq', 'RMON2-MIB');
|
||||
$version = snmp_get($device, '.1.3.6.1.4.1.171.10.37.20.5.1.1.0', '-Ovq', 'RMON2-MIB');
|
||||
|
||||
//$hardware = snmp_get($device, 'systemModelName.0', '-Ovq', 'APMII-DWL-3200AP-MIB');
|
||||
//$hardware = snmp_get($device, 'systemModelName.0', '-Ovq', 'APMII-DWL-3200AP-MIB');
|
||||
|
||||
$hardware = snmp_get($device, '.1.3.6.1.4.1.171.10.37.20.1.8.0', '-Ovq', 'RMON2-MIB');
|
||||
$hardware = snmp_get($device, '.1.3.6.1.4.1.171.10.37.20.1.8.0', '-Ovq', 'RMON2-MIB');
|
||||
|
||||
}
|
||||
// EOF
|
||||
|
@ -1,16 +1,15 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Observium
|
||||
*
|
||||
* This file is part of Observium.
|
||||
*
|
||||
* @package observium
|
||||
* @subpackage poller
|
||||
* @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2019 Observium Limited
|
||||
* @package observium
|
||||
* @subpackage poller
|
||||
* @copyright (C) Adam Armstrong
|
||||
*
|
||||
*/
|
||||
|
||||
$hardware = rewrite_definition_hardware($device, $poll_device['sysObjectID']);
|
||||
$hardware = get_model_param($device, 'hardware', $poll_device['sysObjectID']);
|
||||
|
||||
// EOF
|
||||
|
@ -5,20 +5,18 @@
|
||||
*
|
||||
* This file is part of Observium.
|
||||
*
|
||||
* @package observium
|
||||
* @subpackage poller
|
||||
* @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2019 Observium Limited
|
||||
* @package observium
|
||||
* @subpackage poller
|
||||
* @copyright (C) Adam Armstrong
|
||||
*
|
||||
*/
|
||||
|
||||
if (!$hardware)
|
||||
{
|
||||
// HOST-RESOURCES-MIB::hrSystemInitialLoadParameters.0 = STRING: "console=ttyS0,115200 ip=off initrd=0x00800040,4M root=/dev/md0 rw syno_hw_version=DS207+v10 ihd_num=2
|
||||
$hw = snmp_get($device, 'hrSystemInitialLoadParameters.0', '-Osqnv', 'HOST-RESOURCES-MIB');
|
||||
if (preg_match('/syno_hw_version=(?<hardware>[^\s\+]+)/', $hw, $matches))
|
||||
{
|
||||
$hardware = $matches['hardware'];
|
||||
}
|
||||
if (!$hardware) {
|
||||
// HOST-RESOURCES-MIB::hrSystemInitialLoadParameters.0 = STRING: "console=ttyS0,115200 ip=off initrd=0x00800040,4M root=/dev/md0 rw syno_hw_version=DS207+v10 ihd_num=2
|
||||
$hw = snmp_get($device, 'hrSystemInitialLoadParameters.0', '-Osqnv', 'HOST-RESOURCES-MIB');
|
||||
if (preg_match('/syno_hw_version=(?<hardware>[^\s\+]+)/', $hw, $matches)) {
|
||||
$hardware = $matches['hardware'];
|
||||
}
|
||||
}
|
||||
|
||||
// EOF
|
||||
|
@ -1,18 +1,17 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Observium
|
||||
*
|
||||
* This file is part of Observium.
|
||||
*
|
||||
* @package observium
|
||||
* @subpackage poller
|
||||
* @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2019 Observium Limited
|
||||
* @package observium
|
||||
* @subpackage poller
|
||||
* @copyright (C) Adam Armstrong
|
||||
*
|
||||
*/
|
||||
|
||||
if ($hardware) { return; }
|
||||
|
||||
$hardware = rewrite_definition_hardware($device, $poll_device['sysObjectID']);
|
||||
if (!$hardware) {
|
||||
$hardware = get_model_param($device, 'hardware', $poll_device['sysObjectID']);
|
||||
}
|
||||
|
||||
// EOF
|
||||
|
@ -5,18 +5,17 @@
|
||||
*
|
||||
* This file is part of Observium.
|
||||
*
|
||||
* @package observium
|
||||
* @subpackage poller
|
||||
* @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2019 Observium Limited
|
||||
* @package observium
|
||||
* @subpackage poller
|
||||
* @copyright (C) Adam Armstrong
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
// EdgeSwitch XP
|
||||
if (empty($hardware) && $poll_device['sysObjectID'] == '.1.3.6.1.4.1.10002.1' &&
|
||||
str_starts($poll_device['sysName'], 'Edge'))
|
||||
{
|
||||
$hardware = $poll_device['sysName'];
|
||||
str_starts($poll_device['sysName'], 'Edge')) {
|
||||
$hardware = $poll_device['sysName'];
|
||||
}
|
||||
|
||||
// EOF
|
||||
|
@ -5,9 +5,9 @@
|
||||
*
|
||||
* This file is part of Observium.
|
||||
*
|
||||
* @package observium
|
||||
* @subpackage poller
|
||||
* @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2019 Observium Limited
|
||||
* @package observium
|
||||
* @subpackage poller
|
||||
* @copyright (C) Adam Armstrong
|
||||
*
|
||||
*/
|
||||
|
||||
@ -16,52 +16,51 @@
|
||||
// Yes, that's the Kenel version.
|
||||
$kenelversion = snmp_get($device, 'entKenelVersion.0', '-OQv', 'SENAO-ENTERPRISE-INDOOR-AP-CB-MIB');
|
||||
|
||||
if ($kenelversion)
|
||||
{
|
||||
// Only fetch app version when we found a Kenel Version.
|
||||
$appversion = snmp_get($device, 'entAppVersion.0', '-OQv', 'SENAO-ENTERPRISE-INDOOR-AP-CB-MIB');
|
||||
$version = "Kernel $kenelversion / Apps $appversion";
|
||||
if ($kenelversion) {
|
||||
// Only fetch app version when we found a Kenel Version.
|
||||
$appversion = snmp_get($device, 'entAppVersion.0', '-OQv', 'SENAO-ENTERPRISE-INDOOR-AP-CB-MIB');
|
||||
$version = "Kernel $kenelversion / Apps $appversion";
|
||||
}
|
||||
|
||||
$hwversion = trim(snmp_get($device, 'entHwVersion.0', '-OQv', 'SENAO-ENTERPRISE-INDOOR-AP-CB-MIB'),'" .');
|
||||
$hwversion = trim(snmp_get($device, 'entHwVersion.0', '-OQv', 'SENAO-ENTERPRISE-INDOOR-AP-CB-MIB'), '" .');
|
||||
|
||||
// There doesn't seem to be a real hardware identification.. sysName will have to do?
|
||||
// On Engenius APs this is changeable in the system properties!
|
||||
$hardware = str_replace('EnGenius ', '', $poll_device['sysName']) . ($hwversion == '' ? '' : ' v' . $hwversion);
|
||||
if ($hardware[0] != 'E') { $hardware = ''; } // If the user has changed sysName, don't use it as hardware. Silly check, will work in 99% of cases?
|
||||
if ($hardware[0] != 'E') {
|
||||
$hardware = '';
|
||||
} // If the user has changed sysName, don't use it as hardware. Silly check, will work in 99% of cases?
|
||||
|
||||
// Operational mode
|
||||
$mode = snmp_get($device, 'entSysMode.0', '-OQv', 'SENAO-ENTERPRISE-INDOOR-AP-CB-MIB');
|
||||
switch ($mode)
|
||||
{
|
||||
case 'ap-router':
|
||||
$features = 'Router mode';
|
||||
break;
|
||||
case 'repeater':
|
||||
$features = 'Universal repeater mode';
|
||||
break;
|
||||
case 'ap-bridge':
|
||||
$features = 'Access Point mode';
|
||||
break;
|
||||
case 'client-bridge':
|
||||
$features = 'Client Bridge mode';
|
||||
break;
|
||||
case 'client-router':
|
||||
$features = 'Client router mode';
|
||||
break;
|
||||
case 'wds-bridge':
|
||||
$features = 'WDS Bridge mode';
|
||||
break;
|
||||
default:
|
||||
$features = '';
|
||||
break;
|
||||
switch ($mode) {
|
||||
case 'ap-router':
|
||||
$features = 'Router mode';
|
||||
break;
|
||||
case 'repeater':
|
||||
$features = 'Universal repeater mode';
|
||||
break;
|
||||
case 'ap-bridge':
|
||||
$features = 'Access Point mode';
|
||||
break;
|
||||
case 'client-bridge':
|
||||
$features = 'Client Bridge mode';
|
||||
break;
|
||||
case 'client-router':
|
||||
$features = 'Client router mode';
|
||||
break;
|
||||
case 'wds-bridge':
|
||||
$features = 'WDS Bridge mode';
|
||||
break;
|
||||
default:
|
||||
$features = '';
|
||||
break;
|
||||
}
|
||||
|
||||
///////////// Engenius Access Points (tested with ECB-350)
|
||||
|
||||
if ($version == '')
|
||||
{
|
||||
$version = snmp_get($device, 'modelName.0', '-OQv', 'ENGENIUS-PRIVATE-MIB');
|
||||
if ($version == '') {
|
||||
$version = snmp_get($device, 'modelName.0', '-OQv', 'ENGENIUS-PRIVATE-MIB');
|
||||
}
|
||||
|
||||
// EOF
|
||||
|
@ -4,49 +4,53 @@
|
||||
*
|
||||
* This file is part of Observium.
|
||||
*
|
||||
* @package observium
|
||||
* @subpackage poller
|
||||
* @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2022 Observium Limited
|
||||
* @package observium
|
||||
* @subpackage poller
|
||||
* @copyright (C) Adam Armstrong
|
||||
*
|
||||
*/
|
||||
|
||||
# PowerWalker/BlueWalker UPS (Tested with BlueWalked VFI 2000 LCD (EPPC-MIB) sysDescr.0 = STRING: Network Management Card for UPS
|
||||
$vendor = 'PowerWalker';
|
||||
if (str_contains($poll_device['sysDescr'], 'Network Management Card for UPS')) {
|
||||
// EPPC-MIB::upsEIdentityManufacturer.0 = STRING: EPPC
|
||||
// EPPC-MIB::upsEIdentityModel.0 = STRING: ON-LINE
|
||||
// EPPC-MIB::upsEIdentityUPSFirmwareVerison.0 = STRING: 06.00
|
||||
// EPPC-MIB::upsEIndentityUPSSerialNumber.0 = STRING:
|
||||
// EPPC-MIB::upsEIdentityDescription.0 = STRING:
|
||||
// EPPC-MIB::upsEIdentityAgentSoftwareVerison.0 = STRING: 3.0.0.2
|
||||
// EPPC-MIB::upsEIdentityAttachedDevices.0 = STRING:
|
||||
if ($data = snmp_get_multi_oid($device, 'upsEIdentityManufacturer.0 upsESystemConfigOutputVA.0 upsEIdentityModel.0', [], 'EPPC-MIB')) {
|
||||
if ($data[0]['upsEIdentityManufacturer'] === 'EPPC') {
|
||||
// FIXME. Not sure, see: https://jira.observium.org/browse/OBS-4314
|
||||
$vendor = 'Eaton';
|
||||
//} elseif ($data[0]['upsEIdentityManufacturer']) {
|
||||
// $vendor = $data[0]['upsEIdentityManufacturer'];
|
||||
} else {
|
||||
$vendor = 'PowerWalker';
|
||||
// Eaton:
|
||||
// EPPC-MIB::upsEIdentityManufacturer.0 = STRING: EPPC
|
||||
// EPPC-MIB::upsEIdentityModel.0 = STRING: ON-LINE
|
||||
// EPPC-MIB::upsEIdentityUPSFirmwareVerison.0 = STRING: 06.00
|
||||
// EPPC-MIB::upsEIndentityUPSSerialNumber.0 = STRING:
|
||||
// EPPC-MIB::upsEIdentityDescription.0 = STRING:
|
||||
// EPPC-MIB::upsEIdentityAgentSoftwareVerison.0 = STRING: 3.0.0.2
|
||||
// EPPC-MIB::upsEIdentityAttachedDevices.0 = STRING:
|
||||
|
||||
// PowerWalker:
|
||||
// EPPC-MIB::upsEIdentityManufacturer.0 = STRING: EPPC
|
||||
// EPPC-MIB::upsEIdentityModel.0 = STRING: ON-LINE
|
||||
// EPPC-MIB::upsEIdentityUPSFirmwareVerison.0 = STRING: 00.00
|
||||
// EPPC-MIB::upsEIndentityUPSSerialNumber.0 = STRING:
|
||||
// EPPC-MIB::upsEIdentityDescription.0 = STRING: ups1
|
||||
// EPPC-MIB::upsEIdentityAgentSoftwareVerison.0 = STRING: 3.1.0.0
|
||||
if ($data = snmp_get_multi_oid($device, 'upsESystemConfigOutputVA.0 upsEIdentityModel.0', [], 'EPPC-MIB')) {
|
||||
$hardware = $data[0]['upsEIdentityModel'];
|
||||
if ($data[0]['upsESystemConfigOutputVA'] > 0) {
|
||||
$hardware .= '(' . $data[0]['upsESystemConfigOutputVA'] . 'VA)';
|
||||
}
|
||||
}
|
||||
|
||||
$hardware = $data[0]['upsEIdentityModel'];
|
||||
if ($data[0]['upsESystemConfigOutputVA'] > 0) {
|
||||
$hardware .= '('.$data[0]['upsESystemConfigOutputVA'].'VA)';
|
||||
if ($data = snmp_get_multi_oid($device, 'upsEIdentityDescription.0 upsEIdentityUPSFirmwareVerison.0 upsEIdentityAgentSoftwareVerison.0', [], 'EPPC-MIB')) {
|
||||
$version = $data[0]['upsEIdentityDescription'] . ' UPS: ' .
|
||||
$data[0]['upsEIdentityUPSFirmwareVerison'] . ' Firmware: ' . $data[0]['upsEIdentityAgentSoftwareVerison'];
|
||||
|
||||
if (version_compare($data[0]['upsEIdentityAgentSoftwareVerison'], '3.1.0.0', '<')) {
|
||||
// See: https://jira.observium.org/browse/OBS-4369
|
||||
$vendor = 'Eaton';
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if ($data = snmp_get_multi_oid($device, 'upsEIdentityDescription.0 upsEIdentityUPSFirmwareVerison.0 upsIdentAgentSoftwareVersion.0', [], 'EPPC-MIB')) {
|
||||
$version = $data[0]['upsEIdentityDescription'] . ' UPS: ' .
|
||||
$data[0]['upsEIdentityUPSFirmwareVerison'] . ' Firmware: ' . $data[0]['upsIdentAgentSoftwareVersion'];
|
||||
|
||||
}
|
||||
|
||||
//if ($data = snmp_get_multi_oid($device, 'upsESystemStatus.0 upsEBatteryTestResult.0', [], 'EPPC-MIB')) {
|
||||
// $features = 'Status: ' . strtoupper($data[0]['upsESystemStatus'] . ' ' . $data[0]['upsEBatteryTestResult']);
|
||||
//}
|
||||
//if ($data = snmp_get_multi_oid($device, 'upsESystemStatus.0 upsEBatteryTestResult.0', [], 'EPPC-MIB')) {
|
||||
// $features = 'Status: ' . strtoupper($data[0]['upsESystemStatus'] . ' ' . $data[0]['upsEBatteryTestResult']);
|
||||
//}
|
||||
} else {
|
||||
$hardware = 'EPPC - Unknown NMC Card';
|
||||
$hardware = 'EPPC - Unknown NMC Card';
|
||||
}
|
||||
|
||||
// EOF
|
||||
|
@ -4,44 +4,39 @@
|
||||
*
|
||||
* This file is part of Observium.
|
||||
*
|
||||
* @package observium
|
||||
* @subpackage poller
|
||||
* @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2020 Observium Limited
|
||||
* @package observium
|
||||
* @subpackage poller
|
||||
* @copyright (C) Adam Armstrong
|
||||
*
|
||||
*/
|
||||
|
||||
// Do not poll member id on every poll, use discovery since this id required in discovery stage!
|
||||
if (!is_numeric($attribs['eqlgrpmemid']))
|
||||
{
|
||||
// eqlMemberName.1.443914937 = hostname-1
|
||||
// eqlMemberName.1.1664046123 = hostname-2
|
||||
$eqlgrpmembers = snmpwalk_cache_oid($device, 'eqlMemberName', [], 'EQLMEMBER-MIB');
|
||||
if (!is_numeric($attribs['eqlgrpmemid'])) {
|
||||
// eqlMemberName.1.443914937 = hostname-1
|
||||
// eqlMemberName.1.1664046123 = hostname-2
|
||||
$eqlgrpmembers = snmpwalk_cache_oid($device, 'eqlMemberName', [], 'EQLMEMBER-MIB');
|
||||
|
||||
foreach ($eqlgrpmembers as $index => $entry)
|
||||
{
|
||||
// Find member id and name in results
|
||||
if (!empty($entry['eqlMemberName']) && strtolower($entry['eqlMemberName']) == strtolower($poll_device['sysName']))
|
||||
{
|
||||
list(, $eqlgrpmemid) = explode('.', $index);
|
||||
break;
|
||||
foreach ($eqlgrpmembers as $index => $entry) {
|
||||
// Find member id and name in results
|
||||
if (!empty($entry['eqlMemberName']) && strtolower($entry['eqlMemberName']) == strtolower($poll_device['sysName'])) {
|
||||
[, $eqlgrpmemid] = explode('.', $index);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!isset($eqlgrpmemid))
|
||||
{
|
||||
// Fall-back to old method.
|
||||
$eqlgrpmemid = snmp_get_oid($device, 'eqliscsiLocalMemberId.0', 'EQLVOLUME-MIB');
|
||||
}
|
||||
if (!isset($eqlgrpmemid)) {
|
||||
// Fall-back to old method.
|
||||
$eqlgrpmemid = snmp_get_oid($device, 'eqliscsiLocalMemberId.0', 'EQLVOLUME-MIB');
|
||||
}
|
||||
|
||||
if (is_numeric($eqlgrpmemid) && $eqlgrpmemid != $attribs['eqlgrpmemid'])
|
||||
{
|
||||
// Store member id when detected
|
||||
set_dev_attrib($device, 'eqlgrpmemid', $eqlgrpmemid);
|
||||
$attribs['eqlgrpmemid'] = $eqlgrpmemid;
|
||||
print_debug("\neqlgrpmemid: $eqlgrpmemid");
|
||||
}
|
||||
if (is_numeric($eqlgrpmemid) && $eqlgrpmemid != $attribs['eqlgrpmemid']) {
|
||||
// Store member id when detected
|
||||
set_dev_attrib($device, 'eqlgrpmemid', $eqlgrpmemid);
|
||||
$attribs['eqlgrpmemid'] = $eqlgrpmemid;
|
||||
print_debug("\neqlgrpmemid: $eqlgrpmemid");
|
||||
}
|
||||
} else {
|
||||
$eqlgrpmemid = $attribs['eqlgrpmemid'];
|
||||
$eqlgrpmemid = $attribs['eqlgrpmemid'];
|
||||
}
|
||||
|
||||
// EQLMEMBER-MIB::eqlMemberProductFamily.1.$eqlgrpmemid = STRING: PS6500
|
||||
@ -51,14 +46,14 @@ if (!is_numeric($attribs['eqlgrpmemid']))
|
||||
// EQLMEMBER-MIB::eqlMemberSerialNumber.1.$eqlgrpmemid = STRING: XXXNNNNNNNXNNNN
|
||||
// EQLMEMBER-MIB::eqlMemberServiceTag.1.$eqlgrpmemid = STRING: XXXXXXX
|
||||
|
||||
$hardware = 'EqualLogic '.snmp_get_oid($device, 'eqlMemberProductFamily.1.'.$eqlgrpmemid, 'EQLMEMBER-MIB');
|
||||
$hardware = 'EqualLogic ' . snmp_get_oid($device, 'eqlMemberProductFamily.1.' . $eqlgrpmemid, 'EQLMEMBER-MIB');
|
||||
|
||||
$serial = snmp_get_oid($device, 'eqlMemberSerialNumber.1.'.$eqlgrpmemid, 'EQLMEMBER-MIB');
|
||||
$serial .= ' ['.snmp_get_oid($device, 'eqlMemberServiceTag.1.'.$eqlgrpmemid, 'EQLMEMBER-MIB').']';
|
||||
$serial = snmp_get_oid($device, 'eqlMemberSerialNumber.1.' . $eqlgrpmemid, 'EQLMEMBER-MIB');
|
||||
$serial .= ' [' . snmp_get_oid($device, 'eqlMemberServiceTag.1.' . $eqlgrpmemid, 'EQLMEMBER-MIB') . ']';
|
||||
|
||||
$eqlmajor = snmp_get_oid($device, 'eqlMemberControllerMajorVersion.1.'.$eqlgrpmemid, 'EQLMEMBER-MIB');
|
||||
$eqlminor = snmp_get_oid($device, 'eqlMemberControllerMinorVersion.1.'.$eqlgrpmemid, 'EQLMEMBER-MIB');
|
||||
$eqlmaint = snmp_get_oid($device, 'eqlMemberControllerMaintenanceVersion.1.'.$eqlgrpmemid, 'EQLMEMBER-MIB');
|
||||
$eqlmajor = snmp_get_oid($device, 'eqlMemberControllerMajorVersion.1.' . $eqlgrpmemid, 'EQLMEMBER-MIB');
|
||||
$eqlminor = snmp_get_oid($device, 'eqlMemberControllerMinorVersion.1.' . $eqlgrpmemid, 'EQLMEMBER-MIB');
|
||||
$eqlmaint = snmp_get_oid($device, 'eqlMemberControllerMaintenanceVersion.1.' . $eqlgrpmemid, 'EQLMEMBER-MIB');
|
||||
$version = sprintf('%d.%d.%d', $eqlmajor, $eqlminor, $eqlmaint);
|
||||
|
||||
unset($eqlgrpmemid, $eqlgrpmembers, $eqlgrpmem, $eqlmajor, $eqlminor, $eqlmaint, $index);
|
||||
|
@ -5,9 +5,9 @@
|
||||
*
|
||||
* This file is part of Observium.
|
||||
*
|
||||
* @package observium
|
||||
* @subpackage poller
|
||||
* @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2019 Observium Limited
|
||||
* @package observium
|
||||
* @subpackage poller
|
||||
* @copyright (C) Adam Armstrong
|
||||
*
|
||||
*/
|
||||
|
||||
@ -17,10 +17,10 @@
|
||||
// EX-5i
|
||||
//$hardware = $poll_device['sysDescr'];
|
||||
|
||||
$data = snmpwalk_cache_oid($device, 'radioInfo', array(), 'ExaltComProducts');
|
||||
$data = snmpwalk_cache_oid($device, 'radioInfo', [], 'ExaltComProducts');
|
||||
|
||||
$hardware = $data[0]['modelName'];
|
||||
list($version) = explode(' ', $data[0]['firmwareVersion']);
|
||||
$features = $data[0]['interfaceType'];
|
||||
$hardware = $data[0]['modelName'];
|
||||
[$version] = explode(' ', $data[0]['firmwareVersion']);
|
||||
$features = $data[0]['interfaceType'];
|
||||
|
||||
// EOF
|
||||
|
@ -4,53 +4,46 @@
|
||||
*
|
||||
* This file is part of Observium.
|
||||
*
|
||||
* @package observium
|
||||
* @subpackage poller
|
||||
* @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2020 Observium Limited
|
||||
* @package observium
|
||||
* @subpackage poller
|
||||
* @copyright (C) Adam Armstrong
|
||||
*
|
||||
*/
|
||||
|
||||
if (preg_match('/^(?<hw>[A-Z][\w\-+ ]+) +HW:\w+ +FW:[\w\.]+ +SW:v?(?<version>[\w\.]+)/', $poll_device['sysDescr'], $matches))
|
||||
{
|
||||
//Ethernet Switch 325-24G HW:01 FW:3.6.0.1 SW:v3.6.1.04 BN:04 (c) Nortel Networks
|
||||
//Ethernet Routing Switch 2526T HW:03 FW:1.0.0.14 SW:v4.1.1.002 BN:02 (c) Nortel Networks
|
||||
//Ethernet Routing Switch 3524GT-PWR+ HW:01 FW:1.0.0.15 SW:v5.2.2.003 BN:03 (c) Avaya Networks
|
||||
//Ethernet Switch 3510-24T HW:33 FW:4.0.0.7 SW:v4.0.4.00
|
||||
//Business Policy Switch 2000 HW:03 FW:V0.36 SW:v1.0.0.81
|
||||
//Business Policy Switch 2000 HW:06 FW:3.0.0.5 SW:v3.0.6.08 ISVN:2
|
||||
//Wireless LAN Controller WC8180 HW:07 FW:1.0.2.1 SW:v2.1.1.029 BN:29 (c) Avaya
|
||||
//Business Secure Router - Ethernet - BSR222 HW:a7 FW:VBSR222_2.6.0.0.011 SW:VM1.09 BN:22-jan-2010 (c) Nortel Networks
|
||||
$hardware = str_replace('- Ethernet - ', '', $matches['hw']);
|
||||
$version = $matches['version'];
|
||||
}
|
||||
else if (preg_match('/^(?<hw>[A-Z][\w\-+ ]+) \((?<version>[\w\.]+)\)/', $poll_device['sysDescr'], $matches))
|
||||
{
|
||||
//ERS-8306 (4.2.0.1)
|
||||
//MERS-8610co (6.0.1.1OE)
|
||||
//Passport-1612G (1.2.2.0)
|
||||
$hardware = str_replace(array('MERS', 'ERS', '-'), array('Metro Ethernet Routing Switch', 'Ethernet Routing Switch', ' '), $matches['hw']);
|
||||
$version = $matches['version'];
|
||||
if (preg_match('/^(?<hw>[A-Z][\w\-+ ]+) +HW:\w+ +FW:[\w\.]+ +SW:v?(?<version>[\w\.]+)/', $poll_device['sysDescr'], $matches)) {
|
||||
//Ethernet Switch 325-24G HW:01 FW:3.6.0.1 SW:v3.6.1.04 BN:04 (c) Nortel Networks
|
||||
//Ethernet Routing Switch 2526T HW:03 FW:1.0.0.14 SW:v4.1.1.002 BN:02 (c) Nortel Networks
|
||||
//Ethernet Routing Switch 3524GT-PWR+ HW:01 FW:1.0.0.15 SW:v5.2.2.003 BN:03 (c) Avaya Networks
|
||||
//Ethernet Switch 3510-24T HW:33 FW:4.0.0.7 SW:v4.0.4.00
|
||||
//Business Policy Switch 2000 HW:03 FW:V0.36 SW:v1.0.0.81
|
||||
//Business Policy Switch 2000 HW:06 FW:3.0.0.5 SW:v3.0.6.08 ISVN:2
|
||||
//Wireless LAN Controller WC8180 HW:07 FW:1.0.2.1 SW:v2.1.1.029 BN:29 (c) Avaya
|
||||
//Business Secure Router - Ethernet - BSR222 HW:a7 FW:VBSR222_2.6.0.0.011 SW:VM1.09 BN:22-jan-2010 (c) Nortel Networks
|
||||
$hardware = str_replace('- Ethernet - ', '', $matches['hw']);
|
||||
$version = $matches['version'];
|
||||
} elseif (preg_match('/^(?<hw>[A-Z][\w\-+ ]+) \((?<version>[\w\.]+)\)/', $poll_device['sysDescr'], $matches)) {
|
||||
//ERS-8306 (4.2.0.1)
|
||||
//MERS-8610co (6.0.1.1OE)
|
||||
//Passport-1612G (1.2.2.0)
|
||||
$hardware = str_replace(['MERS', 'ERS', '-'], ['Metro Ethernet Routing Switch', 'Ethernet Routing Switch', ' '], $matches['hw']);
|
||||
$version = $matches['version'];
|
||||
}
|
||||
|
||||
if (str_starts($poll_device['sysObjectID'], '.1.3.6.1.4.1.2272.'))
|
||||
{
|
||||
if (!$version)
|
||||
{
|
||||
// Build 4.1.0.0 on Fri Jun 16 21:42:04 PDT 2006
|
||||
$version = snmp_get($device, 'rcSysVersion.0', '-Oqvn', 'RAPID-CITY');
|
||||
list(,$version) = explode(' ', $version);
|
||||
}
|
||||
if (str_starts($poll_device['sysObjectID'], '.1.3.6.1.4.1.2272.')) {
|
||||
if (!$version) {
|
||||
// Build 4.1.0.0 on Fri Jun 16 21:42:04 PDT 2006
|
||||
$version = snmp_get($device, 'rcSysVersion.0', '-Oqvn', 'RAPID-CITY');
|
||||
[, $version] = explode(' ', $version);
|
||||
}
|
||||
} else {
|
||||
if (!$version)
|
||||
{
|
||||
$version = snmp_get($device, '.1.3.6.1.4.1.45.1.6.4.2.1.10.0', '-Oqvn');
|
||||
$version = str_replace('v', '', $version);
|
||||
}
|
||||
$serial = snmp_get($device, '.1.3.6.1.2.1.47.1.1.1.1.11.1', '-Oqvn'); // entPhysicalSerialNum.1
|
||||
if ($serial == '')
|
||||
{
|
||||
$serial = snmp_get($device, '.1.3.6.1.2.1.47.1.1.1.1.11.2', '-Oqvn'); // entPhysicalSerialNum.2
|
||||
}
|
||||
if (!$version) {
|
||||
$version = snmp_get($device, '.1.3.6.1.4.1.45.1.6.4.2.1.10.0', '-Oqvn');
|
||||
$version = str_replace('v', '', $version);
|
||||
}
|
||||
$serial = snmp_get($device, '.1.3.6.1.2.1.47.1.1.1.1.11.1', '-Oqvn'); // entPhysicalSerialNum.1
|
||||
if ($serial == '') {
|
||||
$serial = snmp_get($device, '.1.3.6.1.2.1.47.1.1.1.1.11.2', '-Oqvn'); // entPhysicalSerialNum.2
|
||||
}
|
||||
}
|
||||
|
||||
// EOF
|
||||
|
@ -5,9 +5,9 @@
|
||||
*
|
||||
* This file is part of Observium.
|
||||
*
|
||||
* @package observium
|
||||
* @subpackage poller
|
||||
* @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2019 Observium Limited
|
||||
* @package observium
|
||||
* @subpackage poller
|
||||
* @copyright (C) Adam Armstrong
|
||||
*
|
||||
*/
|
||||
|
||||
@ -20,21 +20,23 @@
|
||||
// Summit48(Yonetan) - Version 4.1.19 (Build 2) by Release_Master Wed 08/09/2000 6:09p
|
||||
// Alpine3808 - Version 7.2.0 (Build 33) by Release_Master 07/09/04 14:05:12
|
||||
|
||||
list(, $datas) = explode(' - ', $poll_device['sysDescr']);
|
||||
$datas = str_replace('(','', $datas);
|
||||
$datas = str_replace(')','', $datas);
|
||||
list($a,$b,$c,$d,$e,$f,$g,$h) = explode(' ', $datas);
|
||||
[, $datas] = explode(' - ', $poll_device['sysDescr']);
|
||||
$datas = str_replace('(', '', $datas);
|
||||
$datas = str_replace(')', '', $datas);
|
||||
[$a, $b, $c, $d, $e, $f, $g, $h] = explode(' ', $datas);
|
||||
|
||||
if ($a == 'Version') {
|
||||
$version = $b;
|
||||
$features = $c . ' ' . $d . ' ' . $g;
|
||||
$version = $b;
|
||||
$features = $c . ' ' . $d . ' ' . $g;
|
||||
}
|
||||
|
||||
$hardware = rewrite_extreme_hardware($poll_device['sysObjectID']);
|
||||
if ($hardware == $poll_device['sysObjectID']) { unset($hardware); }
|
||||
if ($hardware == $poll_device['sysObjectID']) {
|
||||
unset($hardware);
|
||||
}
|
||||
|
||||
$version = str_replace('"','', $version);
|
||||
$features = str_replace('"','', $features);
|
||||
$hardware = str_replace('"','', $hardware);
|
||||
$version = str_replace('"', '', $version);
|
||||
$features = str_replace('"', '', $features);
|
||||
$hardware = str_replace('"', '', $hardware);
|
||||
|
||||
// EOF
|
||||
|
@ -5,9 +5,9 @@
|
||||
*
|
||||
* This file is part of Observium.
|
||||
*
|
||||
* @package observium
|
||||
* @subpackage poller
|
||||
* @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2019 Observium Limited
|
||||
* @package observium
|
||||
* @subpackage poller
|
||||
* @copyright (C) Adam Armstrong
|
||||
*
|
||||
*/
|
||||
|
||||
@ -31,27 +31,22 @@ $version = snmp_get($device, 'sysProductVersion.0', '-OQv', 'F5-BIGIP-SYSTEM-MIB
|
||||
$version .= ' Build ' . snmp_get($device, 'sysProductBuild.0', '-OQv', 'F5-BIGIP-SYSTEM-MIB');
|
||||
$version .= ' ' . snmp_get($device, 'sysProductEdition.0', '-OQv', 'F5-BIGIP-SYSTEM-MIB');
|
||||
|
||||
$slot_serials = snmpwalk_cache_oid($device, 'sysChassisSlotSerialNumber', array(), 'F5-BIGIP-SYSTEM-MIB');
|
||||
foreach($slot_serials as $tmp => $slot)
|
||||
{
|
||||
if ($slot['sysChassisSlotSerialNumber'])
|
||||
{
|
||||
$serial .= ',' . $slot['sysChassisSlotSerialNumber'];
|
||||
}
|
||||
$slot_serials = snmpwalk_cache_oid($device, 'sysChassisSlotSerialNumber', [], 'F5-BIGIP-SYSTEM-MIB');
|
||||
foreach ($slot_serials as $tmp => $slot) {
|
||||
if ($slot['sysChassisSlotSerialNumber']) {
|
||||
$serial .= ',' . $slot['sysChassisSlotSerialNumber'];
|
||||
}
|
||||
}
|
||||
|
||||
$data = snmpwalk_cache_oid($device, 'sysModuleAllocationProvisionLevel', array(), 'F5-BIGIP-SYSTEM-MIB');
|
||||
$all_features = array('am', 'lc', 'afm', 'apm', 'asm', 'avr', 'gtm', 'ltm', 'psm', 'vcmp');
|
||||
foreach ($all_features as $feature)
|
||||
{
|
||||
if (isset($data[$feature]))
|
||||
{
|
||||
$enabled = $data[$feature]['sysModuleAllocationProvisionLevel'];
|
||||
if ($enabled != '' && $enabled != 'none')
|
||||
{
|
||||
$features .= ' ' . $feature;
|
||||
$data = snmpwalk_cache_oid($device, 'sysModuleAllocationProvisionLevel', [], 'F5-BIGIP-SYSTEM-MIB');
|
||||
$all_features = ['am', 'lc', 'afm', 'apm', 'asm', 'avr', 'gtm', 'ltm', 'psm', 'vcmp'];
|
||||
foreach ($all_features as $feature) {
|
||||
if (isset($data[$feature])) {
|
||||
$enabled = $data[$feature]['sysModuleAllocationProvisionLevel'];
|
||||
if ($enabled != '' && $enabled != 'none') {
|
||||
$features .= ' ' . $feature;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
$features = trim($features);
|
||||
|
||||
|
@ -5,17 +5,16 @@
|
||||
*
|
||||
* This file is part of Observium.
|
||||
*
|
||||
* @package observium
|
||||
* @subpackage poller
|
||||
* @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2020 Observium Limited
|
||||
* @package observium
|
||||
* @subpackage poller
|
||||
* @copyright (C) Adam Armstrong
|
||||
*
|
||||
*/
|
||||
|
||||
if (!$version)
|
||||
{
|
||||
//FCMGMT-MIB::connUnitRevsRevId.'................'.1 = STRING: "73.6"
|
||||
//FCMGMT-MIB::connUnitRevsRevId.'................'.2 = STRING: "v6.4.2b4"
|
||||
$version = snmp_get($device, '.1.3.6.1.3.94.1.7.1.3.16.0.0.5.51.61.220.34.0.0.0.0.0.0.0.0.2', '-Ovq');
|
||||
if (!$version) {
|
||||
//FCMGMT-MIB::connUnitRevsRevId.'................'.1 = STRING: "73.6"
|
||||
//FCMGMT-MIB::connUnitRevsRevId.'................'.2 = STRING: "v6.4.2b4"
|
||||
$version = snmp_get($device, '.1.3.6.1.3.94.1.7.1.3.16.0.0.5.51.61.220.34.0.0.0.0.0.0.0.0.2', '-Ovq');
|
||||
}
|
||||
$version = ltrim($version, 'v');
|
||||
|
||||
|
@ -1,22 +0,0 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Observium
|
||||
*
|
||||
* This file is part of Observium.
|
||||
*
|
||||
* @package observium
|
||||
* @subpackage poller
|
||||
* @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2019 Observium Limited
|
||||
*
|
||||
*/
|
||||
|
||||
//FE-FIREEYE-MIB::feInstalledSystemImage.0 = STRING: "CMS (CMS) 7.2.0.224371"
|
||||
//FE-FIREEYE-MIB::feSystemImageVersionCurrent.0 = STRING: "7.2.0"
|
||||
//FE-FIREEYE-MIB::feSecurityContentVersion.0 = STRING: "361.121"
|
||||
|
||||
$image = snmp_get($device, 'feInstalledSystemImage.0', '-Osqv', 'FE-FIREEYE-MIB');
|
||||
$content = snmp_get($device, 'feSecurityContentVersion.0', '-Osqv', 'FE-FIREEYE-MIB');
|
||||
$features = "$image ($content)";
|
||||
|
||||
// EOF
|
28
includes/polling/os/flswitch.inc.php
Normal file
28
includes/polling/os/flswitch.inc.php
Normal file
@ -0,0 +1,28 @@
|
||||
<?php
|
||||
/**
|
||||
* Observium
|
||||
*
|
||||
* This file is part of Observium.
|
||||
*
|
||||
* @package observium
|
||||
* @subpackage poller
|
||||
* @copyright (C) Adam Armstrong
|
||||
*
|
||||
*/
|
||||
|
||||
// SNMPv2-MIB::sysObjectID.0 = OID: FL-MGD-INFRASTRUCT-MIB::flComponentsIndex.331
|
||||
// .1.3.6.1.4.1.4346.11.1.2.1.1.1.331
|
||||
|
||||
// FL-MGD-INFRASTRUCT-MIB::flComponentsIndex.331 = INTEGER: 331
|
||||
// FL-MGD-INFRASTRUCT-MIB::flComponentsName.331 = STRING: FL SWITCH 2008
|
||||
// FL-MGD-INFRASTRUCT-MIB::flComponentsDescr.331 = STRING: Industrial Ethernet Switch with 8 Fast-Ethernet copper ports.
|
||||
// FL-MGD-INFRASTRUCT-MIB::flComponentsURL.331 = STRING: http://www.FactoryLine.de
|
||||
// FL-MGD-INFRASTRUCT-MIB::flComponentsOrderNumber.331 = STRING: 27 02 324
|
||||
|
||||
if (match_oid_num($device['sysObjectID'], '.1.3.6.1.4.1.4346.11.1.2.1.1.1')) {
|
||||
$hw_array = explode('.', $device['sysObjectID']);
|
||||
$hw_index = end($hw_array);
|
||||
$hardware = snmp_get_oid($device, 'flComponentsName.' . $hw_index, 'FL-MGD-INFRASTRUCT-MIB');
|
||||
}
|
||||
|
||||
// EOF
|
@ -4,21 +4,21 @@
|
||||
*
|
||||
* This file is part of Observium.
|
||||
*
|
||||
* @package observium
|
||||
* @subpackage poller
|
||||
* @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2022 Observium Limited
|
||||
* @package observium
|
||||
* @subpackage poller
|
||||
* @copyright (C) Adam Armstrong
|
||||
*
|
||||
*/
|
||||
|
||||
if ($fn_hw = rewrite_definition_hardware($device, $poll_device['sysObjectID'])) {
|
||||
// Prefer defined hardware
|
||||
$hardware = $fn_hw;
|
||||
$fn_type = rewrite_definition_type($device, $poll_device['sysObjectID']);
|
||||
if (!empty($fn_type)) {
|
||||
$type = $fn_type;
|
||||
}
|
||||
if ($fn_hw = get_model_param($device, 'hardware', $poll_device['sysObjectID'])) {
|
||||
// Prefer defined hardware
|
||||
$hardware = $fn_hw;
|
||||
|
||||
if ($fn_type = get_model_param($device, 'type', $poll_device['sysObjectID'])) {
|
||||
$type = $fn_type;
|
||||
}
|
||||
} elseif (str_contains($hardware, 'WiFi')) {
|
||||
$type = 'wireless';
|
||||
$type = 'wireless';
|
||||
}
|
||||
|
||||
// EOF
|
||||
|
@ -5,9 +5,9 @@
|
||||
*
|
||||
* This file is part of Observium.
|
||||
*
|
||||
* @package observium
|
||||
* @subpackage poller
|
||||
* @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2019 Observium Limited
|
||||
* @package observium
|
||||
* @subpackage poller
|
||||
* @copyright (C) Adam Armstrong
|
||||
*
|
||||
*/
|
||||
|
||||
@ -59,114 +59,91 @@
|
||||
// Detect base version, since 9.10 Dell changed base MIBs, but NOT changed devices sysObjectID
|
||||
// for 9.10 and above set $is_dell to TRUE
|
||||
$is_dell = FALSE;
|
||||
if (preg_match('/Application Software Version:\s+(?<version>(?<base>[\d\.]+)\S*)\s+Series: +(?<hardware>\S+)/', $poll_device['sysDescr'], $matches))
|
||||
{
|
||||
//Dell Networking OS Operating System Version: 2.0 Application Software Version: 9.10(0.1P3) Series: S4810 Copyright (c) 1999-2016 by Dell Inc. All Rights Reserved. Build Time: Tue Jun 14 15:00:23 2016
|
||||
//Dell Networking OS Operating System Version: 2.0 Application Software Version: 9.10(0.1) Series: S4048-ON Copyright (c) 1999-2016 by Dell Inc. All Rights Reserved. Build Time: Wed May 11 23:07:56 2016
|
||||
//Dell Networking OS Operating System Version: 2.0 Application Software Version: 9.7(0.0P9) Series: S6000 Copyright (c) 1999-2015 by Dell Inc. All Rights Reserved. Build Time: Wed Jun 17 13:21:33 2015
|
||||
//Dell Force10 OS Operating System Version: 1.0 Application Software Version: 8.4.2.7 Series: S25N Copyright (c) 1999-2012 by Dell Inc. All Rights Reserved. Build Time: Thu Sep 27 14:03:07 PDT 2012
|
||||
$is_dell = version_compare($matches['base'], '9.10') >= 0;
|
||||
if (preg_match('/Application Software Version:\s+(?<version>(?<base>[\d\.]+)\S*)\s+Series: +(?<hardware>\S+)/', $poll_device['sysDescr'], $matches)) {
|
||||
//Dell Networking OS Operating System Version: 2.0 Application Software Version: 9.10(0.1P3) Series: S4810 Copyright (c) 1999-2016 by Dell Inc. All Rights Reserved. Build Time: Tue Jun 14 15:00:23 2016
|
||||
//Dell Networking OS Operating System Version: 2.0 Application Software Version: 9.10(0.1) Series: S4048-ON Copyright (c) 1999-2016 by Dell Inc. All Rights Reserved. Build Time: Wed May 11 23:07:56 2016
|
||||
//Dell Networking OS Operating System Version: 2.0 Application Software Version: 9.7(0.0P9) Series: S6000 Copyright (c) 1999-2015 by Dell Inc. All Rights Reserved. Build Time: Wed Jun 17 13:21:33 2015
|
||||
//Dell Force10 OS Operating System Version: 1.0 Application Software Version: 8.4.2.7 Series: S25N Copyright (c) 1999-2012 by Dell Inc. All Rights Reserved. Build Time: Thu Sep 27 14:03:07 PDT 2012
|
||||
$is_dell = version_compare($matches['base'], '9.10') >= 0;
|
||||
|
||||
$hardware = $matches['hardware'];
|
||||
$version = $matches['version'];
|
||||
$hardware = $matches['hardware'];
|
||||
$version = $matches['version'];
|
||||
} else {
|
||||
$hardware = rewrite_definition_hardware($device, $poll_device['sysObjectID']);
|
||||
$hardware = get_model_param($device, 'hardware', $poll_device['sysObjectID']);
|
||||
}
|
||||
|
||||
if ($is_dell)
|
||||
{
|
||||
// DELL-NETWORKING-CHASSIS-MIB::dellNetNumStackUnits.0 = INTEGER: 1
|
||||
// DELL-NETWORKING-CHASSIS-MIB::dellNetStackUnitIndexNext.0 = INTEGER: 1
|
||||
if ($is_dell) {
|
||||
// DELL-NETWORKING-CHASSIS-MIB::dellNetNumStackUnits.0 = INTEGER: 1
|
||||
// DELL-NETWORKING-CHASSIS-MIB::dellNetStackUnitIndexNext.0 = INTEGER: 1
|
||||
|
||||
// YES, this not joke snmpwalk instead snmpget, since some Dell devices return wrong 'No Such Instance currently exists at this OID'
|
||||
//$data = snmp_get_multi_oid($device, 'dellNetStackUnitCodeVersion.1 dellNetStackUnitProductOrder.1 dellNetStackUnitModelId.1 dellNetStackUnitSerialNumber.1 dellNetStackUnitServiceTag.1', array(), 'DELL-NETWORKING-CHASSIS-MIB');
|
||||
$oids = array('dellNetStackUnitSerialNumber', 'dellNetStackUnitServiceTag');
|
||||
if (!$hardware)
|
||||
{
|
||||
$oids[] = 'dellNetStackUnitProductOrder';
|
||||
$oids[] = 'dellNetStackUnitModelId';
|
||||
}
|
||||
if (!$version)
|
||||
{
|
||||
$oids[] = 'dellNetStackUnitCodeVersion';
|
||||
}
|
||||
$data = array();
|
||||
foreach ($oids as $oid)
|
||||
{
|
||||
$data = snmpwalk_cache_oid($device, $oid, $data, 'DELL-NETWORKING-CHASSIS-MIB');
|
||||
}
|
||||
if ($data[1]['dellNetStackUnitProductOrder'] && $data[1]['dellNetStackUnitProductOrder'] != 'NA' &&
|
||||
strlen($data[1]['dellNetStackUnitProductOrder']) < 20)
|
||||
{
|
||||
$hardware = $data[1]['dellNetStackUnitProductOrder'];
|
||||
}
|
||||
else if (!$hardware)
|
||||
{
|
||||
$hardware = $data[1]['dellNetStackUnitModelId'];
|
||||
}
|
||||
if ($data[1]['dellNetStackUnitCodeVersion'])
|
||||
{
|
||||
$version = $data[1]['dellNetStackUnitCodeVersion'];
|
||||
}
|
||||
if ($version) { $icon = 'dell'; } // Switch icon to Dell
|
||||
// YES, this not joke snmpwalk instead snmpget, since some Dell devices return wrong 'No Such Instance currently exists at this OID'
|
||||
//$data = snmp_get_multi_oid($device, 'dellNetStackUnitCodeVersion.1 dellNetStackUnitProductOrder.1 dellNetStackUnitModelId.1 dellNetStackUnitSerialNumber.1 dellNetStackUnitServiceTag.1', array(), 'DELL-NETWORKING-CHASSIS-MIB');
|
||||
$oids = ['dellNetStackUnitSerialNumber', 'dellNetStackUnitServiceTag'];
|
||||
if (!$hardware) {
|
||||
$oids[] = 'dellNetStackUnitProductOrder';
|
||||
$oids[] = 'dellNetStackUnitModelId';
|
||||
}
|
||||
if (!$version) {
|
||||
$oids[] = 'dellNetStackUnitCodeVersion';
|
||||
}
|
||||
$data = [];
|
||||
foreach ($oids as $oid) {
|
||||
$data = snmpwalk_cache_oid($device, $oid, $data, 'DELL-NETWORKING-CHASSIS-MIB');
|
||||
}
|
||||
if ($data[1]['dellNetStackUnitProductOrder'] && $data[1]['dellNetStackUnitProductOrder'] != 'NA' &&
|
||||
strlen($data[1]['dellNetStackUnitProductOrder']) < 20) {
|
||||
$hardware = $data[1]['dellNetStackUnitProductOrder'];
|
||||
} elseif (!$hardware) {
|
||||
$hardware = $data[1]['dellNetStackUnitModelId'];
|
||||
}
|
||||
if ($data[1]['dellNetStackUnitCodeVersion']) {
|
||||
$version = $data[1]['dellNetStackUnitCodeVersion'];
|
||||
}
|
||||
if ($version) {
|
||||
$icon = 'dell';
|
||||
} // Switch icon to Dell
|
||||
|
||||
// Serial
|
||||
if ($data[1]['dellNetStackUnitSerialNumber'] && $data[1]['dellNetStackUnitSerialNumber'] != 'NA')
|
||||
{
|
||||
$serial = $data[1]['dellNetStackUnitSerialNumber'];
|
||||
} else {
|
||||
$serial = $data[1]['dellNetStackUnitServiceTag'];
|
||||
}
|
||||
}
|
||||
else if (strstr($poll_device['sysObjectID'], '.1.3.6.1.4.1.6027.1.3.'))
|
||||
{
|
||||
$data = snmp_get_multi_oid($device, 'chStackUnitCodeVersion.1 chStackUnitProductOrder.1 chStackUnitModelID.1 chStackUnitSerialNumber.1 chStackUnitServiceTag.1', array(), 'F10-S-SERIES-CHASSIS-MIB');
|
||||
if ($data[1]['chStackUnitProductOrder'] && !str_starts($data[1]['chStackUnitProductOrder'], array('NA', '.')) &&
|
||||
preg_match('/^[A-Z]/', $data[1]['chStackUnitProductOrder'])) // This Oid can return unprintable chars
|
||||
{
|
||||
$hardware = $data[1]['chStackUnitProductOrder'];
|
||||
}
|
||||
else if (!$hardware)
|
||||
{
|
||||
$hardware = $data[1]['chStackUnitModelID'];
|
||||
}
|
||||
$version = $data[1]['chStackUnitCodeVersion'];
|
||||
// Serial
|
||||
if ($data[1]['dellNetStackUnitSerialNumber'] && $data[1]['dellNetStackUnitSerialNumber'] != 'NA') {
|
||||
$serial = $data[1]['dellNetStackUnitSerialNumber'];
|
||||
} else {
|
||||
$serial = $data[1]['dellNetStackUnitServiceTag'];
|
||||
}
|
||||
} elseif (strstr($poll_device['sysObjectID'], '.1.3.6.1.4.1.6027.1.3.')) {
|
||||
$data = snmp_get_multi_oid($device, 'chStackUnitCodeVersion.1 chStackUnitProductOrder.1 chStackUnitModelID.1 chStackUnitSerialNumber.1 chStackUnitServiceTag.1', [], 'F10-S-SERIES-CHASSIS-MIB');
|
||||
if ($data[1]['chStackUnitProductOrder'] && !str_starts($data[1]['chStackUnitProductOrder'], ['NA', '.']) &&
|
||||
preg_match('/^[A-Z]/', $data[1]['chStackUnitProductOrder'])) // This Oid can return unprintable chars
|
||||
{
|
||||
$hardware = $data[1]['chStackUnitProductOrder'];
|
||||
} elseif (!$hardware) {
|
||||
$hardware = $data[1]['chStackUnitModelID'];
|
||||
}
|
||||
$version = $data[1]['chStackUnitCodeVersion'];
|
||||
|
||||
// Serial
|
||||
if ($data[1]['chStackUnitSerialNumber'] && $data[1]['chStackUnitSerialNumber'] != 'NA')
|
||||
{
|
||||
$serial = $data[1]['chStackUnitSerialNumber'];
|
||||
} else {
|
||||
$serial = $data[1]['chStackUnitServiceTag'];
|
||||
}
|
||||
}
|
||||
else if (strstr($poll_device['sysObjectID'], '.1.3.6.1.4.1.6027.1.2.'))
|
||||
{
|
||||
$version = snmp_get($device, 'chSwVersion.0', '-Oqvn', 'F10-C-SERIES-CHASSIS-MIB');
|
||||
$serial = snmp_get($device, 'chSerialNumber.0', '-Oqvn', 'F10-C-SERIES-CHASSIS-MIB');
|
||||
}
|
||||
else if (strstr($poll_device['sysObjectID'], '.1.3.6.1.4.1.6027.1.4.'))
|
||||
{
|
||||
$data = snmp_get_multi_oid($device, 'chStackUnitCodeVersion.1 chStackUnitProductOrder.1 chStackUnitModelID.1 chStackUnitSerialNumber.1 chStackUnitServiceTag.1', array(), 'F10-M-SERIES-CHASSIS-MIB');
|
||||
if ($data[1]['chStackUnitProductOrder'] && $data[1]['chStackUnitProductOrder'] != 'NA')
|
||||
{
|
||||
$hardware = $data[1]['chStackUnitProductOrder'];
|
||||
}
|
||||
else if (!$hardware)
|
||||
{
|
||||
$hardware = $data[1]['chStackUnitModelID'];
|
||||
}
|
||||
$version = $data[1]['chStackUnitCodeVersion'];
|
||||
if ($data[1]['chStackUnitSerialNumber'] && $data[1]['chStackUnitSerialNumber'] != 'NA')
|
||||
{
|
||||
$serial = $data[1]['chStackUnitSerialNumber'];
|
||||
} else {
|
||||
$serial = $data[1]['chStackUnitServiceTag'];
|
||||
}
|
||||
}
|
||||
else if (!$version)
|
||||
{
|
||||
$version = snmp_get($device, 'chSysSwRuntimeImgVersion.1.1', '-Oqvn', 'F10-CHASSIS-MIB');
|
||||
// Serial
|
||||
if ($data[1]['chStackUnitSerialNumber'] && $data[1]['chStackUnitSerialNumber'] != 'NA') {
|
||||
$serial = $data[1]['chStackUnitSerialNumber'];
|
||||
} else {
|
||||
$serial = $data[1]['chStackUnitServiceTag'];
|
||||
}
|
||||
} elseif (strstr($poll_device['sysObjectID'], '.1.3.6.1.4.1.6027.1.2.')) {
|
||||
$version = snmp_get($device, 'chSwVersion.0', '-Oqvn', 'F10-C-SERIES-CHASSIS-MIB');
|
||||
$serial = snmp_get($device, 'chSerialNumber.0', '-Oqvn', 'F10-C-SERIES-CHASSIS-MIB');
|
||||
} elseif (strstr($poll_device['sysObjectID'], '.1.3.6.1.4.1.6027.1.4.')) {
|
||||
$data = snmp_get_multi_oid($device, 'chStackUnitCodeVersion.1 chStackUnitProductOrder.1 chStackUnitModelID.1 chStackUnitSerialNumber.1 chStackUnitServiceTag.1', [], 'F10-M-SERIES-CHASSIS-MIB');
|
||||
if ($data[1]['chStackUnitProductOrder'] && $data[1]['chStackUnitProductOrder'] != 'NA') {
|
||||
$hardware = $data[1]['chStackUnitProductOrder'];
|
||||
} elseif (!$hardware) {
|
||||
$hardware = $data[1]['chStackUnitModelID'];
|
||||
}
|
||||
$version = $data[1]['chStackUnitCodeVersion'];
|
||||
if ($data[1]['chStackUnitSerialNumber'] && $data[1]['chStackUnitSerialNumber'] != 'NA') {
|
||||
$serial = $data[1]['chStackUnitSerialNumber'];
|
||||
} else {
|
||||
$serial = $data[1]['chStackUnitServiceTag'];
|
||||
}
|
||||
} elseif (!$version) {
|
||||
$version = snmp_get($device, 'chSysSwRuntimeImgVersion.1.1', '-Oqvn', 'F10-CHASSIS-MIB');
|
||||
}
|
||||
|
||||
unset($data, $is_dell);
|
||||
|
@ -5,15 +5,15 @@
|
||||
*
|
||||
* This file is part of Observium.
|
||||
*
|
||||
* @package observium
|
||||
* @subpackage poller
|
||||
* @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2019 Observium Limited
|
||||
* @package observium
|
||||
* @subpackage poller
|
||||
* @copyright (C) Adam Armstrong
|
||||
*
|
||||
*/
|
||||
|
||||
if (empty($hardware)) // Fallback since svnApplianceProductName is only supported since R77.10
|
||||
{
|
||||
$hardware = rewrite_unix_hardware($poll_device['sysDescr']);
|
||||
$hardware = rewrite_unix_hardware($poll_device['sysDescr']);
|
||||
}
|
||||
|
||||
// EOF
|
||||
|
@ -5,9 +5,9 @@
|
||||
*
|
||||
* This file is part of Observium.
|
||||
*
|
||||
* @package observium
|
||||
* @subpackage poller
|
||||
* @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2019 Observium Limited
|
||||
* @package observium
|
||||
* @subpackage poller
|
||||
* @copyright (C) Adam Armstrong
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -6,10 +6,10 @@
|
||||
*
|
||||
* @package observium
|
||||
* @subpackage poller
|
||||
* @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2020 Observium Limited
|
||||
* @copyright (C) Adam Armstrong
|
||||
*
|
||||
*/
|
||||
|
||||
$hardware = $poll_device['sysName'];
|
||||
include __DIR__ . '/ups-mib.inc.php';
|
||||
|
||||
// EOF
|
@ -5,17 +5,16 @@
|
||||
*
|
||||
* This file is part of Observium.
|
||||
*
|
||||
* @package observium
|
||||
* @subpackage poller
|
||||
* @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2019 Observium Limited
|
||||
* @package observium
|
||||
* @subpackage poller
|
||||
* @copyright (C) Adam Armstrong
|
||||
*
|
||||
*/
|
||||
|
||||
if (preg_match('/Integrated Lights\-Out (\d+) ([\d\.]+)/', $poll_device['sysDescr'], $matches))
|
||||
{
|
||||
// Integrated Lights-Out 4 2.03 Nov 07 2014
|
||||
$hardware = 'iLO '.$matches[1];
|
||||
$version = $matches[2];
|
||||
if (preg_match('/Integrated Lights\-Out (\d+) ([\d\.]+)/', $poll_device['sysDescr'], $matches)) {
|
||||
// Integrated Lights-Out 4 2.03 Nov 07 2014
|
||||
$hardware = 'iLO ' . $matches[1];
|
||||
$version = $matches[2];
|
||||
}
|
||||
|
||||
// EOF
|
||||
|
@ -5,9 +5,9 @@
|
||||
*
|
||||
* This file is part of Observium.
|
||||
*
|
||||
* @package observium
|
||||
* @subpackage poller
|
||||
* @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2019 Observium Limited
|
||||
* @package observium
|
||||
* @subpackage poller
|
||||
* @copyright (C) Adam Armstrong
|
||||
*
|
||||
*/
|
||||
|
||||
@ -63,40 +63,36 @@
|
||||
//BLADE-MIB::chassisNoOfSMIsInstalled.0 = ""
|
||||
//BLADE-MIB::chassisNoOfMTsInstalled.0 = STRING: "1"
|
||||
|
||||
$data = snmp_get_multi_oid($device, 'bladeCenterVpdMachineType.0 bladeCenterVpdMachineModel.0 bladeCenterSerialNumber.0 chassisFlags.0 chassisType.0 chassisSubtype.0', array(), 'BLADE-MIB');
|
||||
$data = snmp_get_multi_oid($device, 'bladeCenterVpdMachineType.0 bladeCenterVpdMachineModel.0 bladeCenterSerialNumber.0 chassisFlags.0 chassisType.0 chassisSubtype.0', [], 'BLADE-MIB');
|
||||
|
||||
if ($data[0]['chassisFlags'] == 'serverBlade')
|
||||
{
|
||||
$type = 'blade';
|
||||
if ($data[0]['chassisFlags'] == 'serverBlade') {
|
||||
$type = 'blade';
|
||||
}
|
||||
$serial = $data[0]['bladeCenterSerialNumber'];
|
||||
|
||||
switch ($data[0]['chassisSubtype'])
|
||||
{
|
||||
case 'bladeCenterS':
|
||||
case 'bladeCenterE':
|
||||
case 'bladeCenterH':
|
||||
case 'bladeCenterT':
|
||||
$hardware = ucfirst($data[0]['chassisSubtype']);
|
||||
break;
|
||||
case 'bladeCenterHOrBladeCenterHT':
|
||||
if ($data[0]['chassisType'] == 'bladeCenterOrBladeCenterH')
|
||||
{
|
||||
$hardware = 'BladeCenterH';
|
||||
} else {
|
||||
$hardware = 'BladeCenterHT';
|
||||
}
|
||||
break;
|
||||
case 'bladeCenterOrBladeCenterT':
|
||||
if ($data[0]['chassisType'] == 'bladeCenterTOrBladeCenterHT')
|
||||
{
|
||||
$hardware = 'BladeCenterT';
|
||||
} else {
|
||||
$hardware = 'BladeCenter';
|
||||
}
|
||||
break;
|
||||
default:
|
||||
$hardware = 'BladeCenter';
|
||||
switch ($data[0]['chassisSubtype']) {
|
||||
case 'bladeCenterS':
|
||||
case 'bladeCenterE':
|
||||
case 'bladeCenterH':
|
||||
case 'bladeCenterT':
|
||||
$hardware = ucfirst($data[0]['chassisSubtype']);
|
||||
break;
|
||||
case 'bladeCenterHOrBladeCenterHT':
|
||||
if ($data[0]['chassisType'] == 'bladeCenterOrBladeCenterH') {
|
||||
$hardware = 'BladeCenterH';
|
||||
} else {
|
||||
$hardware = 'BladeCenterHT';
|
||||
}
|
||||
break;
|
||||
case 'bladeCenterOrBladeCenterT':
|
||||
if ($data[0]['chassisType'] == 'bladeCenterTOrBladeCenterHT') {
|
||||
$hardware = 'BladeCenterT';
|
||||
} else {
|
||||
$hardware = 'BladeCenter';
|
||||
}
|
||||
break;
|
||||
default:
|
||||
$hardware = 'BladeCenter';
|
||||
}
|
||||
$hardware .= ' ' . $data[0]['bladeCenterVpdMachineType'] . '-' . $data[0]['bladeCenterVpdMachineModel'];
|
||||
|
||||
|
@ -5,13 +5,13 @@
|
||||
*
|
||||
* This file is part of Observium.
|
||||
*
|
||||
* @package observium
|
||||
* @subpackage poller
|
||||
* @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2019 Observium Limited
|
||||
* @package observium
|
||||
* @subpackage poller
|
||||
* @copyright (C) Adam Armstrong
|
||||
*
|
||||
*/
|
||||
|
||||
preg_match('/IES-(\d)*/',$poll_device['sysDescr'], $matches);
|
||||
preg_match('/IES-(\d)*/', $poll_device['sysDescr'], $matches);
|
||||
$hardware = $matches[0];
|
||||
|
||||
// EOF
|
||||
|
@ -5,14 +5,14 @@
|
||||
*
|
||||
* This file is part of Observium.
|
||||
*
|
||||
* @package observium
|
||||
* @subpackage poller
|
||||
* @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2019 Observium Limited
|
||||
* @package observium
|
||||
* @subpackage poller
|
||||
* @copyright (C) Adam Armstrong
|
||||
*
|
||||
*/
|
||||
|
||||
// ISPRO-MIB::isIdentManufacturer.0 = STRING: "Jacarta"
|
||||
// ISPRO-MIB::isIdentAgentSoftwareVersion.0 = STRING: "interSeptor Pro v1.07"
|
||||
list(,$version) = preg_split("/\ v/", snmp_get($device, 'isIdentAgentSoftwareVersion.0', '-OQv', 'ISPRO-MIB'));
|
||||
[, $version] = preg_split("/\ v/", snmp_get($device, 'isIdentAgentSoftwareVersion.0', '-OQv', 'ISPRO-MIB'));
|
||||
|
||||
// EOF
|
||||
|
@ -5,9 +5,9 @@
|
||||
*
|
||||
* This file is part of Observium.
|
||||
*
|
||||
* @package observium
|
||||
* @subpackage poller
|
||||
* @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2019 Observium Limited
|
||||
* @package observium
|
||||
* @subpackage poller
|
||||
* @copyright (C) Adam Armstrong
|
||||
*
|
||||
*/
|
||||
|
||||
@ -15,7 +15,11 @@
|
||||
$SoftwareVersion = snmp_get($device, 'ipmIdentAgentSoftwareVersion.0', '-OQv', 'IPOMANII-MIB');
|
||||
|
||||
preg_match("/v(.*) \(SN (.*)\)/", $SoftwareVersion, $matches);
|
||||
if ($matches[1]) { $version = $matches[1]; }
|
||||
if ($matches[2]) { $serial = $matches[2]; }
|
||||
if ($matches[1]) {
|
||||
$version = $matches[1];
|
||||
}
|
||||
if ($matches[2]) {
|
||||
$serial = $matches[2];
|
||||
}
|
||||
|
||||
// EOF
|
||||
|
@ -1,20 +1,18 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Observium
|
||||
*
|
||||
* This file is part of Observium.
|
||||
*
|
||||
* @package observium
|
||||
* @subpackage poller
|
||||
* @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2019 Observium Limited
|
||||
* @package observium
|
||||
* @subpackage poller
|
||||
* @copyright (C) Adam Armstrong
|
||||
*
|
||||
*/
|
||||
|
||||
$hardware = rewrite_definition_hardware($device, $poll_device['sysObjectID']);
|
||||
if (!$hardware)
|
||||
{
|
||||
$hardware = snmp_translate($poll_device['sysObjectID'], 'FOUNDRY-SN-AGENT-MIB:FOUNDRY-SN-ROOT-MIB');
|
||||
$hardware = get_model_param($device, 'hardware', $poll_device['sysObjectID']);
|
||||
if (!$hardware) {
|
||||
$hardware = snmp_translate($poll_device['sysObjectID'], 'FOUNDRY-SN-AGENT-MIB:FOUNDRY-SN-ROOT-MIB');
|
||||
}
|
||||
|
||||
// EOF
|
||||
|
@ -5,9 +5,9 @@
|
||||
*
|
||||
* This file is part of Observium.
|
||||
*
|
||||
* @package observium
|
||||
* @subpackage poller
|
||||
* @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2019 Observium Limited
|
||||
* @package observium
|
||||
* @subpackage poller
|
||||
* @copyright (C) Adam Armstrong
|
||||
*
|
||||
*/
|
||||
|
||||
|
70
includes/polling/os/juniper.inc.php
Normal file
70
includes/polling/os/juniper.inc.php
Normal file
@ -0,0 +1,70 @@
|
||||
<?php
|
||||
/**
|
||||
* Observium
|
||||
*
|
||||
* This file is part of Observium.
|
||||
*
|
||||
* @package observium
|
||||
* @subpackage poller
|
||||
* @copyright (C) Adam Armstrong
|
||||
*
|
||||
*/
|
||||
|
||||
if (str_contains($poll_device['sysDescr'], 'olive')) {
|
||||
$hardware = 'Olive';
|
||||
} elseif (preg_match('/^Juniper Networks, Inc\. ([a-z]+ )?(?<hw>[\w-][^,]+), kernel JUNOS (?<version>[^, ]+)/i', $poll_device['sysDescr'], $matches)) {
|
||||
//Juniper Networks, Inc. qfx5100-48s-6q Ethernet Switch, kernel JUNOS 13.2X51-D38, Build date: 2015-06-12 02:19:10 UTC Copyright (c) 1996-2015 Juniper Networks, Inc.
|
||||
//Juniper Networks, Inc. ex2200-48t-4g Ethernet Switch, kernel JUNOS 12.3R3.4, Build date: 2013-06-14 02:21:01 UTC Copyright (c) 1996-2013 Juniper Networks, Inc.
|
||||
//Juniper Networks, Inc. acx4000 internet router, kernel JUNOS 12.3X52-D10.4, Build date: 2013-08-19 23:31:40 UTC Copyright (c) 1996-2013 Juniper Networks, Inc.
|
||||
//Juniper Networks, Inc. ex4200-48t internet router, kernel JUNOS 11.3R2.4 #0: 2011-09-29 07:21:04 UTC builder@dagmath.juniper.net:/volume/build/junos/11.3/release/11.3R2.4/obj-powerpc/bsd/kernels/JUNIPER-EX/kernel Build date: 2011-09-29 06:44:19 UTC C
|
||||
//Juniper Networks, Inc. DELL J-EX4200-24T internet router, kernel JUNOS 12.1R2.9 #0: 2012-05-31 09:24:31 UTC builder@greteth:/volume/build/junos/12.1/release/12.1R2.9/obj-powerpc/junos/bsd/kernels/JUNIPER-EX/kernel Build date: 2012-05-31 11:29:38 UTC
|
||||
|
||||
[$hardware, $features] = explode(' ', $matches['hw'], 2);
|
||||
$hardware = strtoupper($hardware);
|
||||
$features = ucwords($features);
|
||||
$version = $matches['version'];
|
||||
}
|
||||
|
||||
if (empty($hardware)) {
|
||||
$hw = snmp_get_oid($device, 'jnxBoxDescr.0', 'JUNIPER-MIB');
|
||||
if (preg_match('/^([a-z]+ )?(?<hw>[\w\ -]+)/i', $hw, $matches)) {
|
||||
//Juniper SRX100H2 Internet Router
|
||||
[$hardware, $features] = explode(' ', $matches['hw'], 2);
|
||||
//$hardware = strtoupper($hardware);
|
||||
$features = ucwords($features);
|
||||
} else {
|
||||
$hardware = $hw;
|
||||
}
|
||||
}
|
||||
|
||||
if ((empty($hardware) || str_icontains_array($hardware, 'Virtual')) &&
|
||||
is_device_mib($device, 'JUNIPER-VIRTUALCHASSIS-MIB')) {
|
||||
// JUNIPER-VIRTUALCHASSIS-MIB::jnxVirtualChassisMemberSerialnumber.0 = STRING: PE3715410287
|
||||
// JUNIPER-VIRTUALCHASSIS-MIB::jnxVirtualChassisMemberSerialnumber.1 = STRING: PE3715410286
|
||||
// JUNIPER-VIRTUALCHASSIS-MIB::jnxVirtualChassisMemberRole.0 = INTEGER: master(1)
|
||||
// JUNIPER-VIRTUALCHASSIS-MIB::jnxVirtualChassisMemberRole.1 = INTEGER: backup(2)
|
||||
// JUNIPER-VIRTUALCHASSIS-MIB::jnxVirtualChassisMemberSWVersion.0 = STRING: 14.1X53-D35.3
|
||||
// JUNIPER-VIRTUALCHASSIS-MIB::jnxVirtualChassisMemberSWVersion.1 = STRING: 14.1X53-D35.3
|
||||
// JUNIPER-VIRTUALCHASSIS-MIB::jnxVirtualChassisMemberModel.0 = STRING: ex4300-48t
|
||||
// JUNIPER-VIRTUALCHASSIS-MIB::jnxVirtualChassisMemberModel.1 = STRING: ex4300-48t
|
||||
foreach (snmp_cache_table($device, 'jnxVirtualChassisMemberRole', [], 'JUNIPER-VIRTUALCHASSIS-MIB') as $member => $chassis) {
|
||||
if ($chassis['jnxVirtualChassisMemberRole'] === 'master') {
|
||||
$data = snmp_get_multi_oid($device, ['jnxVirtualChassisMemberModel.' . $member,
|
||||
'jnxVirtualChassisMemberSWVersion.' . $member], [], 'JUNIPER-VIRTUALCHASSIS-MIB');
|
||||
$hardware = $data[$member]['jnxVirtualChassisMemberModel'];
|
||||
$version = $data[$member]['jnxVirtualChassisMemberSWVersion'];
|
||||
//$serial = $data[$member]['jnxVirtualChassisMemberSerialnumber']; // Serial polled by JUNIPER-MIB
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (empty($version)) {
|
||||
$jun_ver = snmp_get_oid($device, 'hrSWInstalledName.2', 'HOST-RESOURCES-MIB');
|
||||
if (preg_match('/^[^\[]+\[(?<version>[^]]+)\]/', $jun_ver, $matches)) {
|
||||
//JUNOS Software Release [12.1X46-D30.2]
|
||||
$version = $matches['version'];
|
||||
}
|
||||
}
|
||||
|
||||
// EOF
|
@ -5,9 +5,9 @@
|
||||
*
|
||||
* This file is part of Observium.
|
||||
*
|
||||
* @package observium
|
||||
* @subpackage poller
|
||||
* @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2019 Observium Limited
|
||||
* @package observium
|
||||
* @subpackage poller
|
||||
* @copyright (C) Adam Armstrong
|
||||
*
|
||||
*/
|
||||
|
||||
@ -18,14 +18,13 @@
|
||||
$clusterusers = snmp_get($device, 'clusterConcurrentUsers.0', '-OQv', 'PULSESECURE-PSG-MIB');
|
||||
$iveusers = snmp_get($device, 'iveConcurrentUsers.0', '-OQv', 'PULSESECURE-PSG-MIB');
|
||||
|
||||
if (!is_null($clusterusers) and !is_null($iveusers))
|
||||
{
|
||||
rrdtool_update_ng($device, 'juniperive-users', array(
|
||||
'clusterusers' => $clusterusers,
|
||||
'iveusers' => $iveusers,
|
||||
));
|
||||
if (!is_null($clusterusers) and !is_null($iveusers)) {
|
||||
rrdtool_update_ng($device, 'juniperive-users', [
|
||||
'clusterusers' => $clusterusers,
|
||||
'iveusers' => $iveusers,
|
||||
]);
|
||||
|
||||
$graphs['juniperive_users'] = TRUE;
|
||||
$graphs['juniperive_users'] = TRUE;
|
||||
}
|
||||
|
||||
// Meetings
|
||||
@ -33,14 +32,13 @@ if (!is_null($clusterusers) and !is_null($iveusers))
|
||||
$meetingusers = snmp_get($device, 'meetingUserCount.0', '-OQv', 'PULSESECURE-PSG-MIB');
|
||||
$meetings = snmp_get($device, 'meetingCount.0', '-OQv', 'PULSESECURE-PSG-MIB');
|
||||
|
||||
if (is_numeric($meetingusers) and is_numeric($meetings))
|
||||
{
|
||||
rrdtool_update_ng($device, 'juniperive-meetings', array(
|
||||
'meetingusers' => $meetingusers,
|
||||
'meetings' => $meetings,
|
||||
));
|
||||
if (is_numeric($meetingusers) and is_numeric($meetings)) {
|
||||
rrdtool_update_ng($device, 'juniperive-meetings', [
|
||||
'meetingusers' => $meetingusers,
|
||||
'meetings' => $meetings,
|
||||
]);
|
||||
|
||||
$graphs['juniperive_meetings'] = TRUE;
|
||||
$graphs['juniperive_meetings'] = TRUE;
|
||||
}
|
||||
|
||||
// Connections
|
||||
@ -48,29 +46,27 @@ if (is_numeric($meetingusers) and is_numeric($meetings))
|
||||
$webusers = snmp_get($device, 'signedInWebUsers.0', '-OQv', 'PULSESECURE-PSG-MIB');
|
||||
$mailusers = snmp_get($device, 'signedInMailUsers.0', '-OQv', 'PULSESECURE-PSG-MIB');
|
||||
|
||||
if (!is_null($webusers) and !is_null($mailusers))
|
||||
{
|
||||
rrdtool_update_ng($device, 'juniperive-connections', array(
|
||||
'webusers' => $webusers,
|
||||
'mailusers' => $mailusers,
|
||||
));
|
||||
if (!is_null($webusers) and !is_null($mailusers)) {
|
||||
rrdtool_update_ng($device, 'juniperive-connections', [
|
||||
'webusers' => $webusers,
|
||||
'mailusers' => $mailusers,
|
||||
]);
|
||||
|
||||
$graphs['juniperive_connections'] = TRUE;
|
||||
$graphs['juniperive_connections'] = TRUE;
|
||||
}
|
||||
|
||||
// Storage
|
||||
|
||||
$diskpercent = snmp_get($device, 'diskFullPercent.0', '-OQv', 'PULSESECURE-PSG-MIB');
|
||||
$logpercent = snmp_get($device, 'logFullPercent.0', '-OQv', 'PULSESECURE-PSG-MIB');
|
||||
$logpercent = snmp_get($device, 'logFullPercent.0', '-OQv', 'PULSESECURE-PSG-MIB');
|
||||
|
||||
if (!is_null($diskpercent) and !is_null($logpercent))
|
||||
{
|
||||
rrdtool_update_ng($device, 'juniperive-storage', array(
|
||||
'diskpercent' => $diskpercent,
|
||||
'logpercent' => $logpercent,
|
||||
));
|
||||
if (!is_null($diskpercent) and !is_null($logpercent)) {
|
||||
rrdtool_update_ng($device, 'juniperive-storage', [
|
||||
'diskpercent' => $diskpercent,
|
||||
'logpercent' => $logpercent,
|
||||
]);
|
||||
|
||||
$graphs['juniperive_storage'] = TRUE;
|
||||
$graphs['juniperive_storage'] = TRUE;
|
||||
}
|
||||
|
||||
// EOF
|
||||
|
@ -1,80 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* Observium
|
||||
*
|
||||
* This file is part of Observium.
|
||||
*
|
||||
* @package observium
|
||||
* @subpackage poller
|
||||
* @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2020 Observium Limited
|
||||
*
|
||||
*/
|
||||
|
||||
if (str_contains($poll_device['sysDescr'], 'olive'))
|
||||
{
|
||||
$hardware = 'Olive';
|
||||
}
|
||||
elseif (preg_match('/^Juniper Networks, Inc\. ([a-z]+ )?(?<hw>[\w-][^,]+), kernel JUNOS (?<version>[^, ]+)/i', $poll_device['sysDescr'], $matches))
|
||||
{
|
||||
//Juniper Networks, Inc. qfx5100-48s-6q Ethernet Switch, kernel JUNOS 13.2X51-D38, Build date: 2015-06-12 02:19:10 UTC Copyright (c) 1996-2015 Juniper Networks, Inc.
|
||||
//Juniper Networks, Inc. ex2200-48t-4g Ethernet Switch, kernel JUNOS 12.3R3.4, Build date: 2013-06-14 02:21:01 UTC Copyright (c) 1996-2013 Juniper Networks, Inc.
|
||||
//Juniper Networks, Inc. acx4000 internet router, kernel JUNOS 12.3X52-D10.4, Build date: 2013-08-19 23:31:40 UTC Copyright (c) 1996-2013 Juniper Networks, Inc.
|
||||
//Juniper Networks, Inc. ex4200-48t internet router, kernel JUNOS 11.3R2.4 #0: 2011-09-29 07:21:04 UTC builder@dagmath.juniper.net:/volume/build/junos/11.3/release/11.3R2.4/obj-powerpc/bsd/kernels/JUNIPER-EX/kernel Build date: 2011-09-29 06:44:19 UTC C
|
||||
//Juniper Networks, Inc. DELL J-EX4200-24T internet router, kernel JUNOS 12.1R2.9 #0: 2012-05-31 09:24:31 UTC builder@greteth:/volume/build/junos/12.1/release/12.1R2.9/obj-powerpc/junos/bsd/kernels/JUNIPER-EX/kernel Build date: 2012-05-31 11:29:38 UTC
|
||||
|
||||
list($hardware, $features) = explode(' ', $matches['hw'], 2);
|
||||
$hardware = strtoupper($hardware);
|
||||
$features = ucwords($features);
|
||||
$version = $matches['version'];
|
||||
}
|
||||
|
||||
if (empty($hardware))
|
||||
{
|
||||
$hw = snmp_get_oid($device, 'jnxBoxDescr.0', 'JUNIPER-MIB');
|
||||
if (preg_match('/^([a-z]+ )?(?<hw>[\w\ -]+)/i', $hw, $matches))
|
||||
{
|
||||
//Juniper SRX100H2 Internet Router
|
||||
list($hardware, $features) = explode(' ', $matches['hw'], 2);
|
||||
//$hardware = strtoupper($hardware);
|
||||
$features = ucwords($features);
|
||||
} else {
|
||||
$hardware = $hw;
|
||||
}
|
||||
}
|
||||
|
||||
if ((empty($hardware) || str_icontains_array($hardware, 'Virtual')) &&
|
||||
is_device_mib($device, 'JUNIPER-VIRTUALCHASSIS-MIB'))
|
||||
{
|
||||
// JUNIPER-VIRTUALCHASSIS-MIB::jnxVirtualChassisMemberSerialnumber.0 = STRING: PE3715410287
|
||||
// JUNIPER-VIRTUALCHASSIS-MIB::jnxVirtualChassisMemberSerialnumber.1 = STRING: PE3715410286
|
||||
// JUNIPER-VIRTUALCHASSIS-MIB::jnxVirtualChassisMemberRole.0 = INTEGER: master(1)
|
||||
// JUNIPER-VIRTUALCHASSIS-MIB::jnxVirtualChassisMemberRole.1 = INTEGER: backup(2)
|
||||
// JUNIPER-VIRTUALCHASSIS-MIB::jnxVirtualChassisMemberSWVersion.0 = STRING: 14.1X53-D35.3
|
||||
// JUNIPER-VIRTUALCHASSIS-MIB::jnxVirtualChassisMemberSWVersion.1 = STRING: 14.1X53-D35.3
|
||||
// JUNIPER-VIRTUALCHASSIS-MIB::jnxVirtualChassisMemberModel.0 = STRING: ex4300-48t
|
||||
// JUNIPER-VIRTUALCHASSIS-MIB::jnxVirtualChassisMemberModel.1 = STRING: ex4300-48t
|
||||
foreach (snmp_cache_table($device, 'jnxVirtualChassisMemberRole', [], 'JUNIPER-VIRTUALCHASSIS-MIB') as $member => $chassis)
|
||||
{
|
||||
if ($chassis['jnxVirtualChassisMemberRole'] === 'master')
|
||||
{
|
||||
$data = snmp_get_multi_oid($device, [ 'jnxVirtualChassisMemberModel.'.$member,
|
||||
'jnxVirtualChassisMemberSWVersion.'.$member ], [], 'JUNIPER-VIRTUALCHASSIS-MIB');
|
||||
$hardware = $data[$member]['jnxVirtualChassisMemberModel'];
|
||||
$version = $data[$member]['jnxVirtualChassisMemberSWVersion'];
|
||||
//$serial = $data[$member]['jnxVirtualChassisMemberSerialnumber']; // Serial polled by JUNIPER-MIB
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (empty($version))
|
||||
{
|
||||
$jun_ver = snmp_get_oid($device, 'hrSWInstalledName.2', 'HOST-RESOURCES-MIB');
|
||||
if (preg_match('/^[^\[]+\[(?<version>[^]]+)\]/', $jun_ver, $matches))
|
||||
{
|
||||
//JUNOS Software Release [12.1X46-D30.2]
|
||||
$version = $matches['version'];
|
||||
}
|
||||
}
|
||||
|
||||
// EOF
|
@ -4,16 +4,15 @@
|
||||
*
|
||||
* This file is part of Observium.
|
||||
*
|
||||
* @package observium
|
||||
* @subpackage poller
|
||||
* @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2020 Observium Limited
|
||||
* @package observium
|
||||
* @subpackage poller
|
||||
* @copyright (C) Adam Armstrong
|
||||
*
|
||||
*/
|
||||
|
||||
if (empty($hardware) && strpos($poll_device['sysDescr'], 'olive'))
|
||||
{
|
||||
$hardware = 'Olive';
|
||||
$serial = '';
|
||||
if (empty($hardware) && strpos($poll_device['sysDescr'], 'olive')) {
|
||||
$hardware = 'Olive';
|
||||
$serial = '';
|
||||
}
|
||||
|
||||
// EOF
|
||||
|
@ -1,21 +0,0 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Observium
|
||||
*
|
||||
* This file is part of Observium.
|
||||
*
|
||||
* @package observium
|
||||
* @subpackage poller
|
||||
* @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2019 Observium Limited
|
||||
*
|
||||
*/
|
||||
|
||||
#JUNIPER-WX-COMMON-MIB::jnxWxSysHwVersion.0 = STRING: 1.0
|
||||
#JUNIPER-WX-COMMON-MIB::jnxWxChassisType.0 = INTEGER: jnxWx60(10)
|
||||
|
||||
$hardware = snmp_get($device, 'jnxWxChassisType.0', '-Ovq', 'JUNIPER-WX-GLOBAL-REG');
|
||||
$hardware = strtoupper(str_replace('jnx','',$hardware));
|
||||
$hardware .= ' ' . snmp_get($device, 'jnxWxSysHwVersion.0', '-Ovq', 'JUNIPER-WX-GLOBAL-REG');
|
||||
|
||||
// EOF
|
@ -5,9 +5,9 @@
|
||||
*
|
||||
* This file is part of Observium.
|
||||
*
|
||||
* @package observium
|
||||
* @subpackage poller
|
||||
* @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2019 Observium Limited
|
||||
* @package observium
|
||||
* @subpackage poller
|
||||
* @copyright (C) Adam Armstrong
|
||||
*
|
||||
*/
|
||||
|
||||
@ -18,7 +18,7 @@ $hardware = snmp_get($device, '1.3.6.1.4.1.18334.1.1.1.1.6.2.1.0', '-OQv');
|
||||
$version = snmp_get($device, '1.3.6.1.4.1.18334.1.1.1.1.6.1.0', '-OQv');
|
||||
|
||||
# Strip off useless brand fields
|
||||
$hardware = str_ireplace('KONICA MINOLTA ','',$hardware);
|
||||
$hardware = str_ireplace('KONICA MINOLTA ', '', $hardware);
|
||||
$hardware = ucfirst($hardware);
|
||||
|
||||
// EOF
|
||||
|
@ -5,17 +5,17 @@
|
||||
*
|
||||
* This file is part of Observium.
|
||||
*
|
||||
* @package observium
|
||||
* @subpackage poller
|
||||
* @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2019 Observium Limited
|
||||
* @package observium
|
||||
* @subpackage poller
|
||||
* @copyright (C) Adam Armstrong
|
||||
*
|
||||
*/
|
||||
|
||||
//LCOS-MIB::lcsFirmwareVersionTableEntryIfc.eIfc = INTEGER: eIfc(1)
|
||||
//LCOS-MIB::lcsFirmwareVersionTableEntryVersion.eIfc = STRING: 8.82.0100RU1 / 28.08.2013
|
||||
|
||||
$data = snmp_get_multi_oid($device, 'lcsFirmwareVersionTableEntryVersion.eIfc', array(), 'LCOS-MIB');
|
||||
$data = snmp_get_multi_oid($device, 'lcsFirmwareVersionTableEntryVersion.eIfc', [], 'LCOS-MIB');
|
||||
|
||||
list($version, $features) = explode(' / ', $data['eIfc']['lcsFirmwareVersionTableEntryVersion']);
|
||||
[$version, $features] = explode(' / ', $data['eIfc']['lcsFirmwareVersionTableEntryVersion']);
|
||||
|
||||
// EOF
|
||||
|
@ -1,5 +1,4 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Observium
|
||||
*
|
||||
@ -7,47 +6,45 @@
|
||||
*
|
||||
* @package observium
|
||||
* @subpackage poller
|
||||
* @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2019 Observium Limited
|
||||
* @copyright (C) Adam Armstrong
|
||||
*
|
||||
*/
|
||||
|
||||
$lgpAgentDeviceId = snmp_get_oid($device, 'lgpAgentDeviceId.1', 'LIEBERT-GP-AGENT-MIB');
|
||||
list(, $lgpAgentDeviceId) = explode('::', $lgpAgentDeviceId); // LIEBERT-GP-REGISTRATION-MIB::lgpNX
|
||||
|
||||
if (snmp_status())
|
||||
{
|
||||
$hardware = rewrite_liebert_hardware($lgpAgentDeviceId);
|
||||
if (snmp_status()) {
|
||||
$lgpAgentDeviceId = explode('::', $lgpAgentDeviceId)[1]; // LIEBERT-GP-REGISTRATION-MIB::lgpNX
|
||||
$hardware = rewrite_liebert_hardware($lgpAgentDeviceId);
|
||||
|
||||
//var_dump($GLOBALS['rewrite_liebert_hardware'][$lgpAgentDeviceId]);
|
||||
switch ($GLOBALS['rewrite_liebert_hardware'][$lgpAgentDeviceId]['type'])
|
||||
{
|
||||
case 'ups':
|
||||
include('includes/polling/os/ups-mib.inc.php');
|
||||
break;
|
||||
case 'environment':
|
||||
case 'network':
|
||||
// Change OS type
|
||||
$type = $GLOBALS['rewrite_liebert_hardware'][$lgpAgentDeviceId]['type'];
|
||||
case 'pdu':
|
||||
case 'power':
|
||||
default:
|
||||
//LIEBERT-GP-AGENT-MIB::lgpAgentIdentManufacturer.0 = STRING: Emerson Network Power
|
||||
//LIEBERT-GP-AGENT-MIB::lgpAgentIdentModel.0 = STRING: IS-UNITY-DP
|
||||
//LIEBERT-GP-AGENT-MIB::lgpAgentIdentFirmwareVersion.0 = STRING: 4.0.0.0
|
||||
//LIEBERT-GP-AGENT-MIB::lgpAgentIdentSerialNumber.0 = STRING: 417831G209J2014APR240173
|
||||
//LIEBERT-GP-AGENT-MIB::lgpAgentIdentPartNumber.0 = STRING: IS-UNITY_4.0.0.0_84525
|
||||
//LIEBERT-GP-AGENT-MIB::lgpAgentDeviceId.1 = OID: LIEBERT-GP-REGISTRATION-MIB::lgpIcomPAtypeDeluxeSys3
|
||||
/* moved to definition
|
||||
$lgpAgentIdent = snmpwalk_cache_oid($device, 'lgpAgentIdent', array(), 'LIEBERT-GP-AGENT-MIB');
|
||||
//var_dump($GLOBALS['rewrite_liebert_hardware'][$lgpAgentDeviceId]);
|
||||
switch ($GLOBALS['rewrite_liebert_hardware'][$lgpAgentDeviceId]['type']) {
|
||||
case 'ups':
|
||||
include('includes/polling/os/ups-mib.inc.php');
|
||||
break;
|
||||
case 'environment':
|
||||
case 'network':
|
||||
// Change OS type
|
||||
$type = $GLOBALS['rewrite_liebert_hardware'][$lgpAgentDeviceId]['type'];
|
||||
case 'pdu':
|
||||
case 'power':
|
||||
default:
|
||||
//LIEBERT-GP-AGENT-MIB::lgpAgentIdentManufacturer.0 = STRING: Emerson Network Power
|
||||
//LIEBERT-GP-AGENT-MIB::lgpAgentIdentModel.0 = STRING: IS-UNITY-DP
|
||||
//LIEBERT-GP-AGENT-MIB::lgpAgentIdentFirmwareVersion.0 = STRING: 4.0.0.0
|
||||
//LIEBERT-GP-AGENT-MIB::lgpAgentIdentSerialNumber.0 = STRING: 417831G209J2014APR240173
|
||||
//LIEBERT-GP-AGENT-MIB::lgpAgentIdentPartNumber.0 = STRING: IS-UNITY_4.0.0.0_84525
|
||||
//LIEBERT-GP-AGENT-MIB::lgpAgentDeviceId.1 = OID: LIEBERT-GP-REGISTRATION-MIB::lgpIcomPAtypeDeluxeSys3
|
||||
/* moved to definition
|
||||
$lgpAgentIdent = snmpwalk_cache_oid($device, 'lgpAgentIdent', array(), 'LIEBERT-GP-AGENT-MIB');
|
||||
|
||||
$manufacturer = $lgpAgentIdent[0]['lgpAgentIdentManufacturer'];
|
||||
//$hardware = $lgpAgentIdent[0]['lgpAgentIdentModel'];
|
||||
$version = $lgpAgentIdent[0]['lgpAgentIdentFirmwareVersion'];
|
||||
*/
|
||||
}
|
||||
$manufacturer = $lgpAgentIdent[0]['lgpAgentIdentManufacturer'];
|
||||
//$hardware = $lgpAgentIdent[0]['lgpAgentIdentModel'];
|
||||
$version = $lgpAgentIdent[0]['lgpAgentIdentFirmwareVersion'];
|
||||
*/
|
||||
}
|
||||
} else {
|
||||
// Uses UPS-MIB
|
||||
include('includes/polling/os/ups-mib.inc.php');
|
||||
// Uses UPS-MIB
|
||||
include('includes/polling/os/ups-mib.inc.php');
|
||||
}
|
||||
|
||||
// EOF
|
||||
|
@ -1,5 +1,4 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Observium
|
||||
*
|
||||
@ -7,8 +6,7 @@
|
||||
*
|
||||
* @package observium
|
||||
* @subpackage poller
|
||||
* @author Adam Armstrong <adama@observium.org>
|
||||
* @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2019 Observium Limited
|
||||
* @copyright (C) Adam Armstrong
|
||||
*
|
||||
*/
|
||||
|
||||
@ -17,19 +15,14 @@
|
||||
// sysDescr.0 = STRING: "MyPower S3100-28TP"
|
||||
// sysDescr.0 = STRING: "MyPower S3100-9TC"
|
||||
// sysDescr.0 = STRING: "Switch"
|
||||
//if (preg_match('/^(MyPower .*)/i', $poll_device['sysDescr'], $matches))
|
||||
//{
|
||||
// $hardware = $matches[1];
|
||||
//}
|
||||
|
||||
if (!$hardware || !$version) {
|
||||
// .1.3.6.1.4.1.5651.1.2.1.1.2.2.0 = STRING: "MyPower S3200-10TP V6.2.3.10"
|
||||
$somemaipustr = snmp_get($device, '.1.3.6.1.4.1.5651.1.2.1.1.2.2.0', '-OQv');
|
||||
if (preg_match('/^(MyPower [A-Z0-9-]*) (V[0-9\.]*)/i', $somemaipustr, $matches))
|
||||
{
|
||||
$hardware = $matches[1];
|
||||
$version = $matches[2];
|
||||
if (preg_match('/(?<hardware>MyPower \w\S+)( (version|V)\s*(?<version>[\d\.]+))?/i', snmp_get_oid($device, '.1.3.6.1.4.1.5651.1.2.1.1.2.2.0'), $matches)) {
|
||||
if ($matches['hardware']) { $hardware = $matches['hardware']; }
|
||||
if ($matches['version']) { $version = $matches['version']; }
|
||||
}
|
||||
}
|
||||
|
||||
$serial = snmp_get($device, '.1.3.6.1.4.1.5651.1.2.1.1.2.19.0', '-OQv');
|
||||
$serial = snmp_get_oid($device, '.1.3.6.1.4.1.5651.1.2.1.1.2.19.0');
|
||||
|
||||
// EOF
|
||||
|
@ -5,9 +5,9 @@
|
||||
*
|
||||
* This file is part of Observium.
|
||||
*
|
||||
* @package observium
|
||||
* @subpackage poller
|
||||
* @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2019 Observium Limited
|
||||
* @package observium
|
||||
* @subpackage poller
|
||||
* @copyright (C) Adam Armstrong
|
||||
*
|
||||
*/
|
||||
|
||||
@ -18,15 +18,14 @@
|
||||
//VerAg:07.00.00.01.00;VerSw:11.0.2.66;VerHw:MCD;VerPl:3300 ICP;HostSrv:192.168.100.121;VerMCD:5.0 SP2 PR2
|
||||
//VerAg:07.00.00.01.00;VerSw:11.0.2.66;VerHw:MCD;VerPl:3300 ICP;HostSrv:10.25.187.38;VerMCD:5.0 SP2 PR2
|
||||
|
||||
if (preg_match('/VerAg:(.+);VerSw:(?<version>.+);VerHw:(?<hw2>.+);VerPl:(?<hw1>[^;\n]+)(?:(;HostSrv:.+)?;VerMCD:(?<mcd>.+))?/', $poll_device['sysDescr'], $matches))
|
||||
{
|
||||
$hardware = 'MiVoice '.str_replace(' ICP', '', $matches['hw1']).' '.$matches['hw2'];
|
||||
// Convert to MCD version (see: http://www.prairiefyre.com/kb/KnowledgebaseArticle51645.aspx)
|
||||
$mcd = explode('.', $matches['version']);
|
||||
// Examples: "13.0.1.53" >> "MCD 7.0 SP1 (Build: 13.0.1.53)"
|
||||
// "13.0.1.53" >> "MCD 3.0 (Build: 9.0.0.41)"
|
||||
$version = 'MCD '.($mcd[0] - 6).'.'.$mcd[1].($mcd[2] > 0 ? ' SP'.$mcd[2] : '').' (Build: '.$matches['version'].')';
|
||||
//if (isset($matches['mcd'])) { $version = 'MCD '.$matches['mcd'].' (Build: '.$matches['version'].')'; }
|
||||
if (preg_match('/VerAg:(.+);VerSw:(?<version>.+);VerHw:(?<hw2>.+);VerPl:(?<hw1>[^;\n]+)(?:(;HostSrv:.+)?;VerMCD:(?<mcd>.+))?/', $poll_device['sysDescr'], $matches)) {
|
||||
$hardware = 'MiVoice ' . str_replace(' ICP', '', $matches['hw1']) . ' ' . $matches['hw2'];
|
||||
// Convert to MCD version (see: http://www.prairiefyre.com/kb/KnowledgebaseArticle51645.aspx)
|
||||
$mcd = explode('.', $matches['version']);
|
||||
// Examples: "13.0.1.53" >> "MCD 7.0 SP1 (Build: 13.0.1.53)"
|
||||
// "13.0.1.53" >> "MCD 3.0 (Build: 9.0.0.41)"
|
||||
$version = 'MCD ' . ($mcd[0] - 6) . '.' . $mcd[1] . ($mcd[2] > 0 ? ' SP' . $mcd[2] : '') . ' (Build: ' . $matches['version'] . ')';
|
||||
//if (isset($matches['mcd'])) { $version = 'MCD '.$matches['mcd'].' (Build: '.$matches['version'].')'; }
|
||||
}
|
||||
|
||||
unset($matches, $mcd);
|
||||
|
@ -5,24 +5,23 @@
|
||||
*
|
||||
* This file is part of Observium.
|
||||
*
|
||||
* @package observium
|
||||
* @subpackage poller
|
||||
* @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2019 Observium Limited
|
||||
* @package observium
|
||||
* @subpackage poller
|
||||
* @copyright (C) Adam Armstrong
|
||||
*
|
||||
*/
|
||||
|
||||
if (preg_match('/Linux .*? (?<kernel>[\d\.]+-MELLANOXuni-\w+) EFM_(?<arch>[^_]+)_(?<hardware>\w+) EFM_(?<version>[\d\.]+)/', $poll_device['sysDescr'], $matches))
|
||||
{
|
||||
// Linux switch-63014c 2.6.27-MELLANOXuni-m405ex EFM_PPC_M405EX EFM_1.1.3000 #1 2013-07-08 14:29:44 ppc
|
||||
// Linux c2-ibsw1 2.6.27-MELLANOXuni-m460ex EFM_PPC_M460EX EFM_1.1.2500 #1 2011-02-22 15:51:54 ppc
|
||||
if (preg_match('/Linux .*? (?<kernel>[\d\.]+-MELLANOXuni-\w+) EFM_(?<arch>[^_]+)_(?<hardware>\w+) EFM_(?<version>[\d\.]+)/', $poll_device['sysDescr'], $matches)) {
|
||||
// Linux switch-63014c 2.6.27-MELLANOXuni-m405ex EFM_PPC_M405EX EFM_1.1.3000 #1 2013-07-08 14:29:44 ppc
|
||||
// Linux c2-ibsw1 2.6.27-MELLANOXuni-m460ex EFM_PPC_M460EX EFM_1.1.2500 #1 2011-02-22 15:51:54 ppc
|
||||
|
||||
//$hardware = $matches['hardware'];
|
||||
$hardware = 'IS50XX'; // FIXME. Required devices for tests
|
||||
$version = $matches['version'];
|
||||
$kernel = $matches['kernel'];
|
||||
$arch = $matches['arch'];
|
||||
//$hardware = $matches['hardware'];
|
||||
$hardware = 'IS50XX'; // FIXME. Required devices for tests
|
||||
$version = $matches['version'];
|
||||
$kernel = $matches['kernel'];
|
||||
$arch = $matches['arch'];
|
||||
} else {
|
||||
// FIXME. Use snmp here
|
||||
// FIXME. Use snmp here
|
||||
}
|
||||
|
||||
unset($matches);
|
||||
|
@ -4,28 +4,24 @@
|
||||
*
|
||||
* This file is part of Observium.
|
||||
*
|
||||
* @package observium
|
||||
* @subpackage poller
|
||||
* @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2020 Observium Limited
|
||||
* @package observium
|
||||
* @subpackage poller
|
||||
* @copyright (C) Adam Armstrong
|
||||
*
|
||||
*/
|
||||
|
||||
if (preg_match('/^Meraki ([A-Z\-_0-9]+) (.*)/', $poll_device['sysDescr'], $matches))
|
||||
{
|
||||
$hardware = $matches[1];
|
||||
$platform = $matches[2];
|
||||
if (preg_match('/^Meraki ([A-Z\-_0-9]+) (.*)/', $poll_device['sysDescr'], $matches)) {
|
||||
$hardware = $matches[1];
|
||||
$platform = $matches[2];
|
||||
|
||||
if (str_contains_array($platform, 'AP') || str_starts($hardware, 'MR'))
|
||||
{
|
||||
// Meraki MR34 Cloud Managed AP
|
||||
$type = 'wireless';
|
||||
}
|
||||
else if (str_contains_array($platform, 'Security') || str_starts($hardware, 'MX'))
|
||||
{
|
||||
// Meraki MX100 Cloud Managed Security Appliance
|
||||
$type = 'firewall';
|
||||
}
|
||||
// else keep network for switches MS
|
||||
if (str_contains_array($platform, 'AP') || str_starts($hardware, 'MR')) {
|
||||
// Meraki MR34 Cloud Managed AP
|
||||
$type = 'wireless';
|
||||
} elseif (str_contains_array($platform, 'Security') || str_starts($hardware, 'MX')) {
|
||||
// Meraki MX100 Cloud Managed Security Appliance
|
||||
$type = 'firewall';
|
||||
}
|
||||
// else keep network for switches MS
|
||||
}
|
||||
|
||||
// EOF
|
||||
|
@ -1,5 +1,4 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Observium
|
||||
*
|
||||
@ -7,7 +6,7 @@
|
||||
*
|
||||
* @package observium
|
||||
* @subpackage poller
|
||||
* @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2019 Observium Limited
|
||||
* @copyright (C) Adam Armstrong
|
||||
*
|
||||
*/
|
||||
|
||||
@ -19,13 +18,18 @@
|
||||
|
||||
// MG-SNMP-UPS-MIB::upsmgIdentModelName.0 = STRING: "5000_60"
|
||||
|
||||
$model = snmp_get($device,'upsmgIdentModelName.0','-OQv','MG-SNMP-UPS-MIB');
|
||||
$hardware = snmp_get_oid($device, 'upsmgIdentFamilyName.0', 'MG-SNMP-UPS-MIB');
|
||||
$model = snmp_get_oid($device, 'upsmgIdentModelName.0', 'MG-SNMP-UPS-MIB');
|
||||
|
||||
// "5000_60" -> "5000 (60 kVA)"
|
||||
if (strstr($model,'_')) { $model = join(' (',explode('_',$model)) . ' kVA)'; }
|
||||
if (str_contains($model, '_')) {
|
||||
$hardware .= implode(' (', explode('_', $model)) . ' kVA)';
|
||||
} elseif (is_numeric($model) && $model >= 10000) {
|
||||
$hardware .= ' (' . (int)($model / 1000) . ' kVA)';
|
||||
} else {
|
||||
$hardware .= ' ' . $model;
|
||||
}
|
||||
|
||||
$hardware = snmp_get($device,'upsmgIdentFamilyName.0','-OQv','MG-SNMP-UPS-MIB') . ' ' . $model;
|
||||
|
||||
$features = 'Firmware: ' . snmp_get($device,'upsmgAgentFirmwareVersion.0','-OQv','MG-SNMP-UPS-MIB');
|
||||
$features = 'Firmware: ' . snmp_get_oid($device, 'upsmgAgentFirmwareVersion.0', 'MG-SNMP-UPS-MIB');
|
||||
|
||||
// EOF
|
||||
|
@ -5,9 +5,9 @@
|
||||
*
|
||||
* This file is part of Observium.
|
||||
*
|
||||
* @package observium
|
||||
* @subpackage poller
|
||||
* @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2019 Observium Limited
|
||||
* @package observium
|
||||
* @subpackage poller
|
||||
* @copyright (C) Adam Armstrong
|
||||
*
|
||||
*/
|
||||
|
||||
@ -28,8 +28,7 @@ $firmware = snmp_get($device, 'productFirmwareVersion.0', '-Osqv', $mib);
|
||||
|
||||
// FIXME --- remove this stuff soon
|
||||
|
||||
if(is_file($host_rrd . '/netapp_stats.rrd'))
|
||||
{
|
||||
if (is_file($host_rrd . '/netapp_stats.rrd')) {
|
||||
|
||||
/// FIXME. Move to graphs module.
|
||||
// 64-bit counters. We don't support the legacy 32-bit counters and their high-low maths.
|
||||
@ -44,9 +43,9 @@ if(is_file($host_rrd . '/netapp_stats.rrd'))
|
||||
// misc64TapeReadBytes.0 = 0
|
||||
// misc64TapeWriteBytes.0 = 0
|
||||
|
||||
$rrd_filename = $host_rrd . '/netapp_stats.rrd';
|
||||
$rrd_filename = $host_rrd . '/netapp_stats.rrd';
|
||||
|
||||
$rrd_create = ' \
|
||||
$rrd_create = ' \
|
||||
DS:iscsi_ops:COUNTER:600:0:10000000000 \
|
||||
DS:fcp_ops:COUNTER:600:0:10000000000 \
|
||||
DS:nfs_ops:COUNTER:600:0:10000000000 \
|
||||
@ -59,20 +58,19 @@ $rrd_create = ' \
|
||||
DS:tape_rd:COUNTER:600:0:10000000000 \
|
||||
DS:tape_wr:COUNTER:600:0:10000000000 ';
|
||||
|
||||
$snmpdata = snmp_get_multi_oid($device, 'iscsi64Ops.0 fcp64Ops.0 misc64NfsOps.0 misc64CifsOps.0 misc64HttpOps.0 misc64NetRcvdBytes.0 misc64NetSentBytes.0 misc64DiskReadBytes.0 misc64DiskWriteBytes.0 misc64TapeReadBytes.0 misc64TapeWriteBytes.0', array(), $mib);
|
||||
$snmpdata = snmp_get_multi_oid($device, 'iscsi64Ops.0 fcp64Ops.0 misc64NfsOps.0 misc64CifsOps.0 misc64HttpOps.0 misc64NetRcvdBytes.0 misc64NetSentBytes.0 misc64DiskReadBytes.0 misc64DiskWriteBytes.0 misc64TapeReadBytes.0 misc64TapeWriteBytes.0', [], $mib);
|
||||
|
||||
rrdtool_create($device, $rrd_filename, $rrd_create);
|
||||
rrdtool_update($device, $rrd_filename, array($snmpdata[0]['iscsi64Ops'], $snmpdata[0]['fcp64Ops'], $snmpdata[0]['misc64NfsOps'], $snmpdata[0]['misc64CifsOps'], $snmpdata[0]['misc64HttpOps'], $snmpdata[0]['misc64NetRcvdBytes'], $snmpdata[0]['misc64NetSentBytes'], $snmpdata[0]['misc64DiskReadBytes'], $snmpdata[0]['misc64DiskWriteBytes'], $snmpdata[0]['misc64TapeReadBytes'], $snmpdata[0]['misc64TapeWriteBytes']));
|
||||
rrdtool_create($device, $rrd_filename, $rrd_create);
|
||||
rrdtool_update($device, $rrd_filename, [$snmpdata[0]['iscsi64Ops'], $snmpdata[0]['fcp64Ops'], $snmpdata[0]['misc64NfsOps'], $snmpdata[0]['misc64CifsOps'], $snmpdata[0]['misc64HttpOps'], $snmpdata[0]['misc64NetRcvdBytes'], $snmpdata[0]['misc64NetSentBytes'], $snmpdata[0]['misc64DiskReadBytes'], $snmpdata[0]['misc64DiskWriteBytes'], $snmpdata[0]['misc64TapeReadBytes'], $snmpdata[0]['misc64TapeWriteBytes']]);
|
||||
|
||||
$graphs['netapp_ops'] = TRUE;
|
||||
$graphs['netapp_disk_io'] = TRUE;
|
||||
$graphs['netapp_net_io'] = TRUE;
|
||||
$graphs['netapp_tape_io'] = TRUE;
|
||||
$graphs['netapp_ops'] = TRUE;
|
||||
$graphs['netapp_disk_io'] = TRUE;
|
||||
$graphs['netapp_net_io'] = TRUE;
|
||||
$graphs['netapp_tape_io'] = TRUE;
|
||||
|
||||
}
|
||||
|
||||
if(is_file($host_rrd . '/netapp_cp.rrd'))
|
||||
{
|
||||
if (is_file($host_rrd . '/netapp_cp.rrd')) {
|
||||
|
||||
// Checkpoint Ops - use a separate RRD file
|
||||
//
|
||||
@ -90,9 +88,9 @@ if(is_file($host_rrd . '/netapp_cp.rrd'))
|
||||
// NETAPP-MIB::cpFromCpDeferredOps.0 = Counter32: 952
|
||||
// NETAPP-MIB::cpFromLowDatavecsOps.0 = Counter32: 0
|
||||
|
||||
$rrd_filename = $host_rrd . '/netapp-cp.rrd';
|
||||
$rrd_filename = $host_rrd . '/netapp-cp.rrd';
|
||||
|
||||
$rrd_create = '\
|
||||
$rrd_create = '\
|
||||
DS:time:COUNTER:600:0:10000000000 \
|
||||
DS:timer:COUNTER:600:0:10000000000 \
|
||||
DS:snapshot:COUNTER:600:0:10000000000 \
|
||||
@ -106,12 +104,12 @@ if(is_file($host_rrd . '/netapp_cp.rrd'))
|
||||
DS:cp_deferred:COUNTER:600:0:10000000000 \
|
||||
DS:low_datavecs:COUNTER:600:0:10000000000 ';
|
||||
|
||||
$snmpdata = snmp_get_multi_oid($device, 'cpTime.0 cpFromTimerOps.0 cpFromSnapshotOps.0 cpFromLowWaterOps.0 cpFromHighWaterOps.0 cpFromLogFullOps.0 cpFromCpOps.0 cpFromFlushOps.0 cpFromSyncOps.0 cpFromLowVbufOps.0 cpFromCpDeferredOps.0 cpFromLowDatavecsOps.0', array(), $mib);
|
||||
$snmpdata = snmp_get_multi_oid($device, 'cpTime.0 cpFromTimerOps.0 cpFromSnapshotOps.0 cpFromLowWaterOps.0 cpFromHighWaterOps.0 cpFromLogFullOps.0 cpFromCpOps.0 cpFromFlushOps.0 cpFromSyncOps.0 cpFromLowVbufOps.0 cpFromCpDeferredOps.0 cpFromLowDatavecsOps.0', [], $mib);
|
||||
|
||||
rrdtool_create($device, $rrd_filename, $rrd_create);
|
||||
rrdtool_update($device, $rrd_filename, array($snmpdata[0]['cpTime'], $snmpdata[0]['cpFromTimerOps'], $snmpdata[0]['cpFromSnapshotOps'], $snmpdata[0]['cpFromLowWaterOps'], $snmpdata[0]['cpFromHighWaterOps'], $snmpdata[0]['cpFromLogFullOps'], $snmpdata[0]['cpFromCpOps'], $snmpdata[0]['cpFromFlushOps'], $snmpdata[0]['cpFromSyncOps'], $snmpdata[0]['cpFromLowVbufOps'], $snmpdata[0]['cpFromCpDeferredOps'], $snmpdata[0]['cpFromLowDatavecsOps']));
|
||||
rrdtool_create($device, $rrd_filename, $rrd_create);
|
||||
rrdtool_update($device, $rrd_filename, [$snmpdata[0]['cpTime'], $snmpdata[0]['cpFromTimerOps'], $snmpdata[0]['cpFromSnapshotOps'], $snmpdata[0]['cpFromLowWaterOps'], $snmpdata[0]['cpFromHighWaterOps'], $snmpdata[0]['cpFromLogFullOps'], $snmpdata[0]['cpFromCpOps'], $snmpdata[0]['cpFromFlushOps'], $snmpdata[0]['cpFromSyncOps'], $snmpdata[0]['cpFromLowVbufOps'], $snmpdata[0]['cpFromCpDeferredOps'], $snmpdata[0]['cpFromLowDatavecsOps']]);
|
||||
|
||||
$graphs['netapp_cp_ops'] = TRUE;
|
||||
$graphs['netapp_cp_ops'] = TRUE;
|
||||
|
||||
}
|
||||
|
||||
|
@ -5,17 +5,16 @@
|
||||
*
|
||||
* This file is part of Observium.
|
||||
*
|
||||
* @package observium
|
||||
* @subpackage poller
|
||||
* @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2019 Observium Limited
|
||||
* @package observium
|
||||
* @subpackage poller
|
||||
* @copyright (C) Adam Armstrong
|
||||
*
|
||||
*/
|
||||
|
||||
// Linux netgear001000 2.4.27-devicescape.3 #1 Fri Jun 9 14:27:39 EDT 2006 armv5b
|
||||
|
||||
if (str_starts($poll_device['sysDescr'], 'Linux'))
|
||||
{
|
||||
$hardware = rewrite_unix_hardware($poll_device['sysDescr']);
|
||||
if (str_starts($poll_device['sysDescr'], 'Linux')) {
|
||||
$hardware = rewrite_unix_hardware($poll_device['sysDescr']);
|
||||
}
|
||||
|
||||
// EOF
|
||||
|
@ -5,9 +5,9 @@
|
||||
*
|
||||
* This file is part of Observium.
|
||||
*
|
||||
* @package observium
|
||||
* @subpackage poller
|
||||
* @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2019 Observium Limited
|
||||
* @package observium
|
||||
* @subpackage poller
|
||||
* @copyright (C) Adam Armstrong
|
||||
*
|
||||
*/
|
||||
|
||||
@ -15,8 +15,8 @@
|
||||
|
||||
$version = snmp_get($device, 'sysBuildVersion.0', '-Osqv', 'SNMPv2-MIB:NS-ROOT-MIB');
|
||||
|
||||
list($version,$features) = explode(':', $version);
|
||||
list(,$version) = explode(' ', $version);
|
||||
list($features) = explode(',', trim($features));
|
||||
[$version, $features] = explode(':', $version);
|
||||
[, $version] = explode(' ', $version);
|
||||
[$features] = explode(',', trim($features));
|
||||
|
||||
// EOF
|
||||
|
@ -1,16 +1,15 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Observium
|
||||
*
|
||||
* This file is part of Observium.
|
||||
*
|
||||
* @package observium
|
||||
* @subpackage poller
|
||||
* @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2019 Observium Limited
|
||||
* @package observium
|
||||
* @subpackage poller
|
||||
* @copyright (C) Adam Armstrong
|
||||
*
|
||||
*/
|
||||
|
||||
$hardware = rewrite_definition_hardware($device, $poll_device['sysObjectID']);
|
||||
$hardware = get_model_param($device, 'hardware', $poll_device['sysObjectID']);
|
||||
|
||||
// EOF
|
||||
|
@ -5,19 +5,18 @@
|
||||
*
|
||||
* This file is part of Observium.
|
||||
*
|
||||
* @package observium
|
||||
* @subpackage poller
|
||||
* @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2019 Observium Limited
|
||||
* @package observium
|
||||
* @subpackage poller
|
||||
* @copyright (C) Adam Armstrong
|
||||
*
|
||||
*/
|
||||
|
||||
// hardware
|
||||
#ISILON-MIB::chassisModel.1 = STRING: X200-2U-Single-48GB-2x1GE-2x10GE SFP+-36TB
|
||||
#ISILON-MIB::chassisModel.1 = STRING: X210-2U-Single-48GB-2x1GE-2x10GE SFP+-22TB-800GB SSD
|
||||
$data = snmp_get_multi_oid($device, 'chassisModel.1', array(), 'ISILON-MIB');
|
||||
if (is_array($data[1]))
|
||||
{
|
||||
list($hardware, $features) = explode('-', $data[1]['chassisModel'], 2);
|
||||
$data = snmp_get_multi_oid($device, 'chassisModel.1', [], 'ISILON-MIB');
|
||||
if (is_array($data[1])) {
|
||||
[$hardware, $features] = explode('-', $data[1]['chassisModel'], 2);
|
||||
}
|
||||
|
||||
// EOF
|
||||
|
@ -5,40 +5,38 @@
|
||||
*
|
||||
* This file is part of Observium.
|
||||
*
|
||||
* @package observium
|
||||
* @subpackage poller
|
||||
* @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2019 Observium Limited
|
||||
* @package observium
|
||||
* @subpackage poller
|
||||
* @copyright (C) Adam Armstrong
|
||||
*
|
||||
*/
|
||||
|
||||
$type = 'voip';
|
||||
if (preg_match('/^ONEOS\d+-(?<platform>[a-z]+)(?:_(?<features>\w+))?-V(?<version>[\w\.]+)/i', $poll_device['sysDescr'], $matches))
|
||||
{
|
||||
// ONEOS1-ADVIP-V3.5R4E30
|
||||
// ONEOS1-ADVIP-V4.2R5E15_A22_Q12
|
||||
// ONEOS10-ADVIP-V4.3R6E20
|
||||
// ONEOS10-ADVIP_11N-V5.2R1C13
|
||||
// ONEOS11-ADVIP-V4.2R5E2_FT12_C
|
||||
// ONEOS6-ADVIP-V4.2R5E9
|
||||
// ONEOS6-ADVIP-V4.2R5E9_A07
|
||||
// ONEOS6-ADVIP_11N-V5.2R1C7_HG2
|
||||
// ONEOS92-MULTI_FT-V5.2R1C9_FT9
|
||||
// ONEOS1-VOIP-V3.5R4E30
|
||||
// ONEOS1-VOIP_H323-V3.7R11E15_V30I
|
||||
// ONEOS1-VOIP_SIP-V3.7R11E15_V28G
|
||||
// ONEOS10-VOIP_SIP-V4.3R6E21_HB1_T2
|
||||
// ONEOS10-VOIP_SIP_11N-V4.3R4E40_CP3
|
||||
// ONEOS4-VOIP_H323_FT-V3.7R11E20_FT10
|
||||
// ONEOS5-VOIP_H323-V4.3R4E18
|
||||
// ONEOS9-VOIP_SIP-V5.1R5E18_HA1
|
||||
// ONEOS90-VOIP_SIP_11N_FT-V4.3R4E34_FT8
|
||||
if (preg_match('/^ONEOS\d+-(?<platform>[a-z]+)(?:_(?<features>\w+))?-V(?<version>[\w\.]+)/i', $poll_device['sysDescr'], $matches)) {
|
||||
// ONEOS1-ADVIP-V3.5R4E30
|
||||
// ONEOS1-ADVIP-V4.2R5E15_A22_Q12
|
||||
// ONEOS10-ADVIP-V4.3R6E20
|
||||
// ONEOS10-ADVIP_11N-V5.2R1C13
|
||||
// ONEOS11-ADVIP-V4.2R5E2_FT12_C
|
||||
// ONEOS6-ADVIP-V4.2R5E9
|
||||
// ONEOS6-ADVIP-V4.2R5E9_A07
|
||||
// ONEOS6-ADVIP_11N-V5.2R1C7_HG2
|
||||
// ONEOS92-MULTI_FT-V5.2R1C9_FT9
|
||||
// ONEOS1-VOIP-V3.5R4E30
|
||||
// ONEOS1-VOIP_H323-V3.7R11E15_V30I
|
||||
// ONEOS1-VOIP_SIP-V3.7R11E15_V28G
|
||||
// ONEOS10-VOIP_SIP-V4.3R6E21_HB1_T2
|
||||
// ONEOS10-VOIP_SIP_11N-V4.3R4E40_CP3
|
||||
// ONEOS4-VOIP_H323_FT-V3.7R11E20_FT10
|
||||
// ONEOS5-VOIP_H323-V4.3R4E18
|
||||
// ONEOS9-VOIP_SIP-V5.1R5E18_HA1
|
||||
// ONEOS90-VOIP_SIP_11N_FT-V4.3R4E34_FT8
|
||||
|
||||
if ($matches['platform'] == 'ADVIP' || $matches['platform'] == 'MULTI')
|
||||
{
|
||||
$type = 'network';
|
||||
}
|
||||
$features = $matches['features'];
|
||||
$version = $matches['version'];
|
||||
if ($matches['platform'] == 'ADVIP' || $matches['platform'] == 'MULTI') {
|
||||
$type = 'network';
|
||||
}
|
||||
$features = $matches['features'];
|
||||
$version = $matches['version'];
|
||||
}
|
||||
|
||||
// EOF
|
||||
|
@ -5,15 +5,15 @@
|
||||
*
|
||||
* This file is part of Observium.
|
||||
*
|
||||
* @package observium
|
||||
* @subpackage poller
|
||||
* @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2019 Observium Limited
|
||||
* @package observium
|
||||
* @subpackage poller
|
||||
* @copyright (C) Adam Armstrong
|
||||
*
|
||||
*/
|
||||
|
||||
// OG-STATUSv2-MIB::ogFirmwareVersion = STRING: "3.12.1 (Fri Sep 26 16:16:16 EST 2014)"
|
||||
$tmpver = snmp_get($device, 'ogFirmwareVersion', '-OQv', 'OG-STATUSv2-MIB');
|
||||
$tmpver = snmp_get($device, 'ogFirmwareVersion', '-OQv', 'OG-STATUSv2-MIB');
|
||||
$verarray = explode(' ', $tmpver);
|
||||
$version = $verarray[0];
|
||||
$version = $verarray[0];
|
||||
|
||||
// EOF
|
||||
|
@ -6,54 +6,71 @@
|
||||
*
|
||||
* @package observium
|
||||
* @subpackage poller
|
||||
* @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2021 Observium Limited
|
||||
* @copyright (C) Adam Armstrong
|
||||
*
|
||||
*/
|
||||
|
||||
// Kernel/Version
|
||||
if (str_starts($poll_device['sysDescr'], 'Linux')) {
|
||||
list(, , $version) = explode(' ', $poll_device['sysDescr']);
|
||||
$kernel = $version;
|
||||
if (str_starts_with($poll_device['sysDescr'], 'Linux')) {
|
||||
$version = explode(' ', $poll_device['sysDescr'])[2];
|
||||
$kernel = $version;
|
||||
|
||||
// this dumb way for detect version....
|
||||
// FIXME. I think it incorrect in some cases, but work for latest versions.
|
||||
$openwrt_versions = [
|
||||
'4.14' => [
|
||||
212 => '19.07.6',
|
||||
199 => '19.07.5',
|
||||
187 => '19.07.4',
|
||||
172 => '19.07.3',
|
||||
169 => '19.07.2', // or 18.06.8
|
||||
164 => '19.07.1',
|
||||
100 => '19.07.0', // ?
|
||||
// https://openwrt.org/about/history
|
||||
// this dumb way for detect version....
|
||||
// FIXME. I think it incorrect in some cases, but work for latest versions.
|
||||
$openwrt_versions = [
|
||||
'6.6' => [
|
||||
63 => '24.10.0-rc2',
|
||||
],
|
||||
'5.15' => [
|
||||
167 => '23.05.5',
|
||||
162 => '23.05.4',
|
||||
150 => '23.05.3',
|
||||
137 => '23.05.2',
|
||||
134 => '23.05.0',
|
||||
],
|
||||
'5.10' => [
|
||||
221 => '22.03.7',
|
||||
201 => '22.03.6',
|
||||
134 => '22.03.5',
|
||||
//187 => '19.07.4',
|
||||
],
|
||||
'4.14' => [
|
||||
212 => '19.07.6',
|
||||
199 => '19.07.5',
|
||||
187 => '19.07.4',
|
||||
172 => '19.07.3',
|
||||
169 => '19.07.2', // or 18.06.8
|
||||
164 => '19.07.1',
|
||||
100 => '19.07.0', // ?
|
||||
|
||||
60 => '18.06.1',
|
||||
],
|
||||
'4.9' => [
|
||||
212 => '18.06.8',
|
||||
209 => '18.06.7',
|
||||
199 => '18.06.6',
|
||||
186 => '18.06.5',
|
||||
154 => '18.06.4',
|
||||
153 => '18.06.3',
|
||||
122 => '18.06.2',
|
||||
117 => '18.06.1',
|
||||
0 => '18.06.0', // ?
|
||||
],
|
||||
];
|
||||
60 => '18.06.1',
|
||||
],
|
||||
'4.9' => [
|
||||
212 => '18.06.8',
|
||||
209 => '18.06.7',
|
||||
199 => '18.06.6',
|
||||
186 => '18.06.5',
|
||||
154 => '18.06.4',
|
||||
153 => '18.06.3',
|
||||
122 => '18.06.2',
|
||||
117 => '18.06.1',
|
||||
0 => '18.06.0', // ?
|
||||
],
|
||||
];
|
||||
|
||||
$kernel_vers = explode('.', $kernel);
|
||||
$kernel_base = $kernel_vers[0].'.'.$kernel_vers[1];
|
||||
if (isset($openwrt_versions[$kernel_base])) {
|
||||
//$version = $openwrt_versions[$kernel_base]['base'];
|
||||
//unset($openwrt_versions[$kernel_base]['base']);
|
||||
foreach ($openwrt_versions[$kernel_base] as $k => $v) {
|
||||
if ($kernel_vers[2] >= $k) {
|
||||
$version = $v;
|
||||
break;
|
||||
}
|
||||
$kernel_vers = explode('.', $kernel);
|
||||
$kernel_base = $kernel_vers[0] . '.' . $kernel_vers[1];
|
||||
if (isset($openwrt_versions[$kernel_base])) {
|
||||
//$version = $openwrt_versions[$kernel_base]['base'];
|
||||
//unset($openwrt_versions[$kernel_base]['base']);
|
||||
foreach ($openwrt_versions[$kernel_base] as $k => $v) {
|
||||
if ($kernel_vers[2] >= $k) {
|
||||
$version = $v;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
$hardware = rewrite_unix_hardware($poll_device['sysDescr']);
|
||||
|
@ -4,22 +4,24 @@
|
||||
*
|
||||
* This file is part of Observium.
|
||||
*
|
||||
* @package observium
|
||||
* @subpackage poller
|
||||
* @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2021 Observium Limited
|
||||
* @package observium
|
||||
* @subpackage poller
|
||||
* @copyright (C) Adam Armstrong
|
||||
*
|
||||
*/
|
||||
|
||||
// Detect Proxmox version is hard (by api package version)
|
||||
// Better by unix-agent packages..
|
||||
|
||||
if (!isset($config['os'][$device['os']]['packages'])) { return; }
|
||||
if (!isset($config['os'][$device['os']]['packages'])) {
|
||||
return;
|
||||
}
|
||||
|
||||
unset($version); // reset kernel based version
|
||||
|
||||
$metatypes = [ 'features', 'type', 'version' ];
|
||||
$metatypes = ['features', 'type', 'version'];
|
||||
foreach (poll_device_unix_packages($device, $metatypes) as $metatype => $value) {
|
||||
$$metatype = $value;
|
||||
$$metatype = $value;
|
||||
}
|
||||
|
||||
// EOF
|
||||
|
@ -5,9 +5,9 @@
|
||||
*
|
||||
* This file is part of Observium.
|
||||
*
|
||||
* @package observium
|
||||
* @subpackage poller
|
||||
* @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2019 Observium Limited
|
||||
* @package observium
|
||||
* @subpackage poller
|
||||
* @copyright (C) Adam Armstrong
|
||||
*
|
||||
*/
|
||||
|
||||
@ -24,18 +24,15 @@
|
||||
// $hardware = trim(str_replace('TRIPP LITE', '', $data[0]['upsIdentModel']));
|
||||
// //$version = $data[0]['upsIdentAgentSoftwareVersion'];
|
||||
//} else {
|
||||
if (empty($hardware))
|
||||
{
|
||||
//$hardware = $poll_device['sysDescr'];
|
||||
$hw = snmp_get_oid($device, '.1.3.6.1.4.1.850.10.2.2.1.9.1', 'TRIPPLITE-12X');
|
||||
if ($hw)
|
||||
{
|
||||
$hardware = trim(str_replace('TRIPP LITE', '', $hw));
|
||||
}
|
||||
if (empty($hardware)) {
|
||||
//$hardware = $poll_device['sysDescr'];
|
||||
$hw = snmp_get_oid($device, '.1.3.6.1.4.1.850.10.2.2.1.9.1', 'TRIPPLITE-12X');
|
||||
if ($hw) {
|
||||
$hardware = trim(str_replace('TRIPP LITE', '', $hw));
|
||||
}
|
||||
}
|
||||
if (empty($version))
|
||||
{
|
||||
$version = snmp_get_oid($device, '.1.3.6.1.4.1.850.10.1.2.3.0', 'TRIPPLITE-12X');
|
||||
if (empty($version)) {
|
||||
$version = snmp_get_oid($device, '.1.3.6.1.4.1.850.10.1.2.3.0', 'TRIPPLITE-12X');
|
||||
}
|
||||
|
||||
// EOF
|
||||
|
@ -5,9 +5,9 @@
|
||||
*
|
||||
* This file is part of Observium.
|
||||
*
|
||||
* @package observium
|
||||
* @subpackage poller
|
||||
* @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2019 Observium Limited
|
||||
* @package observium
|
||||
* @subpackage poller
|
||||
* @copyright (C) Adam Armstrong
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -6,30 +6,34 @@
|
||||
*
|
||||
* @package observium
|
||||
* @subpackage poller
|
||||
* @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2022 Observium Limited
|
||||
* @copyright (C) Adam Armstrong
|
||||
*
|
||||
*/
|
||||
|
||||
if (!safe_empty($hardware)) { return; }
|
||||
if (!safe_empty($hardware)) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Printers hardware
|
||||
// Printer hardware
|
||||
|
||||
if ($printer = snmp_get_oid($device, 'hrDeviceDescr.1', 'HOST-RESOURCES-MIB')) {
|
||||
list($hardware) = explode(';', $printer);
|
||||
$hardware = explode(';', $printer)[0];
|
||||
} elseif (is_device_mib($device, 'HP-LASERJET-COMMON-MIB')) {
|
||||
// HP-LASERJET-COMMON-MIB::gdStatusId.0 = STRING: MFG:Hewlett-Packard;CMD:PJL,PML,PCLXL,URP,PCL,PDF,POSTSCRIPT;MDL:HP LaserJet 500 colorMFP M570dw;CLS:PRINTER;DES:Hewlett-Packard LaserJet 500 colorMFP M570dw;MEM:MEM=230MB;COMMENT:RES=600x8;LEDMDIS:USB#ff#04#01;CID:HPLJPDLV1;
|
||||
// MFG:Hewlett-Packard;CMD:PJL,MLC,BIDI-ECP,PCL,POSTSCRIPT,PCLXL;MDL:hp LaserJet 1320 series;CLS:PRINTER;DES:Hewlett-Packard LaserJet 1320 series;MEM:9MB;COMMENT:RES=1200x1;
|
||||
// MFG:HP;MDL:Officejet Pro K5400;CMD:MLC,PCL,PML,DW-PCL,DESKJET,DYN;1284.4DL:4d,4e,1;CLS:PRINTER;DES:C8185A;SN:MY82E680JG;S:038000ec840010210068eb800008fb8000041c8003844c8004445c8004d46c8003b;Z:0102,05000009000009029cc1016a81017a21025e41,0600,070000000000000
|
||||
// MFG:HP;CMD:PJL,DW-PCL,POSTSCRIPT,HP-GL/2,RTL,JPEG,TIFF,PDF,CALSRASTER,ASCII,URF;MDL:HP DesignJet T1600 PostScript Printer;CLS:PRINTER;LEDMDIS:USB#FF#CC#00;MCT:PR;MCL:DJA;MCV:3.0;DES:HP DesignJet T1600 PostScript Printer;SN:CN9541H01M;FW:CYCLOPSNEPTUNE_03_19_48.1;CID:HPDJPST;
|
||||
$jdinfo = snmp_get_oid($device, 'gdStatusId.0', 'HP-LASERJET-COMMON-MIB');
|
||||
if (preg_match('/(?:MDL|MODEL|DESCRIPTION):([^;]+);/', $jdinfo, $matches)) {
|
||||
$hardware = $matches[1];
|
||||
}
|
||||
// HP-LASERJET-COMMON-MIB::gdStatusId.0 = STRING: MFG:Hewlett-Packard;CMD:PJL,PML,PCLXL,URP,PCL,PDF,POSTSCRIPT;MDL:HP LaserJet 500 colorMFP M570dw;CLS:PRINTER;DES:Hewlett-Packard LaserJet 500 colorMFP M570dw;MEM:MEM=230MB;COMMENT:RES=600x8;LEDMDIS:USB#ff#04#01;CID:HPLJPDLV1;
|
||||
// MFG:Hewlett-Packard;CMD:PJL,MLC,BIDI-ECP,PCL,POSTSCRIPT,PCLXL;MDL:hp LaserJet 1320 series;CLS:PRINTER;DES:Hewlett-Packard LaserJet 1320 series;MEM:9MB;COMMENT:RES=1200x1;
|
||||
// MFG:HP;MDL:Officejet Pro K5400;CMD:MLC,PCL,PML,DW-PCL,DESKJET,DYN;1284.4DL:4d,4e,1;CLS:PRINTER;DES:C8185A;SN:MY82E680JG;S:038000ec840010210068eb800008fb8000041c8003844c8004445c8004d46c8003b;Z:0102,05000009000009029cc1016a81017a21025e41,0600,070000000000000
|
||||
// MFG:HP;CMD:PJL,DW-PCL,POSTSCRIPT,HP-GL/2,RTL,JPEG,TIFF,PDF,CALSRASTER,ASCII,URF;MDL:HP DesignJet T1600 PostScript Printer;CLS:PRINTER;LEDMDIS:USB#FF#CC#00;MCT:PR;MCL:DJA;MCV:3.0;DES:HP DesignJet T1600 PostScript Printer;SN:CN9541H01M;FW:CYCLOPSNEPTUNE_03_19_48.1;CID:HPDJPST;
|
||||
$printer = snmp_get_oid($device, 'gdStatusId.0', 'HP-LASERJET-COMMON-MIB');
|
||||
if (preg_match('/(?:MDL|MODEL|DESCRIPTION):([^;]+);/', $printer, $matches)) {
|
||||
$hardware = $matches[1];
|
||||
}
|
||||
}
|
||||
|
||||
if ($hardware) {
|
||||
// Strip off useless brand fields
|
||||
$hardware = str_ireplace(array('HP ', 'Hewlett-Packard ', ' Series', 'Samsung ', 'Epson ', 'Brother ', 'OKI '), '', $hardware);
|
||||
// Strip off useless brand fields
|
||||
$hardware = str_ireplace([ 'HP ', 'Hewlett-Packard ', ' Series', 'Samsung ', 'Epson ', 'Brother ', 'OKI ' ], '', $hardware);
|
||||
}
|
||||
|
||||
unset($printer);
|
||||
|
||||
// EOF
|
||||
|
26
includes/polling/os/privatetech.inc.php
Normal file
26
includes/polling/os/privatetech.inc.php
Normal file
@ -0,0 +1,26 @@
|
||||
<?php
|
||||
/**
|
||||
* Observium
|
||||
*
|
||||
* This file is part of Observium.
|
||||
*
|
||||
* @package observium
|
||||
* @subpackage poller
|
||||
* @copyright (C) Adam Armstrong
|
||||
*
|
||||
*/
|
||||
|
||||
if ($data = snmp_get_oid($device, 'entPhysicalSoftwareRev.1', 'ENTITY-MIB')) {
|
||||
// OP-MEN99216BC (standalone) v7.10.2297
|
||||
$data = explode(' ', $data);
|
||||
|
||||
$hardware = array_shift($data);
|
||||
$version = array_pop($data);
|
||||
$version = ltrim($version, 'v');
|
||||
|
||||
if (!$vendor && str_starts($hardware, ['OP-', 'OL-'])) {
|
||||
$vendor = 'Optilink';
|
||||
}
|
||||
}
|
||||
|
||||
// EOF
|
@ -5,25 +5,22 @@
|
||||
*
|
||||
* This file is part of Observium.
|
||||
*
|
||||
* @package observium
|
||||
* @subpackage poller
|
||||
* @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2019 Observium Limited
|
||||
* @package observium
|
||||
* @subpackage poller
|
||||
* @copyright (C) Adam Armstrong
|
||||
*
|
||||
*/
|
||||
|
||||
if (preg_match('/^(?:HP )?ProCurve (?:AP|Access Point) .*?(?<hardware>\w+)(?:, (?:revision )?|: v)(?<version>[\w\.]+)/', $poll_device['sysDescr'], $matches))
|
||||
{
|
||||
// ProCurve Access Point 10ag WW J9141A, revision WM.01.17, boot version WAB.01.00
|
||||
// HP ProCurve Access Point 420: v2.2.3 v3.0.6
|
||||
$hardware = 'AP '.$matches['hardware'];
|
||||
$version = $matches['version'];
|
||||
}
|
||||
else if (preg_match('/^(?:HP )?ProCurve (?:AP|Access Point) (?<hardware>\w+?)v(?<version>[\d\.]+).+ SN-(?<serial>\w+)/', $poll_device['sysDescr'], $matches))
|
||||
{
|
||||
// HP ProCurve AP 520wlv2.4.5(758) SN-PG34JL9CWY23 v2.0.10
|
||||
$hardware = 'AP '.$matches['hardware'];
|
||||
$version = $matches['version'];
|
||||
$serial = $matches['serial'];
|
||||
if (preg_match('/^(?:HP )?ProCurve (?:AP|Access Point) .*?(?<hardware>\w+)(?:, (?:revision )?|: v)(?<version>[\w\.]+)/', $poll_device['sysDescr'], $matches)) {
|
||||
// ProCurve Access Point 10ag WW J9141A, revision WM.01.17, boot version WAB.01.00
|
||||
// HP ProCurve Access Point 420: v2.2.3 v3.0.6
|
||||
$hardware = 'AP ' . $matches['hardware'];
|
||||
$version = $matches['version'];
|
||||
} elseif (preg_match('/^(?:HP )?ProCurve (?:AP|Access Point) (?<hardware>\w+?)v(?<version>[\d\.]+).+ SN-(?<serial>\w+)/', $poll_device['sysDescr'], $matches)) {
|
||||
// HP ProCurve AP 520wlv2.4.5(758) SN-PG34JL9CWY23 v2.0.10
|
||||
$hardware = 'AP ' . $matches['hardware'];
|
||||
$version = $matches['version'];
|
||||
$serial = $matches['serial'];
|
||||
}
|
||||
|
||||
// EOF
|
||||
|
@ -5,42 +5,36 @@
|
||||
*
|
||||
* This file is part of Observium.
|
||||
*
|
||||
* @package observium
|
||||
* @subpackage poller
|
||||
* @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2019 Observium Limited
|
||||
* @package observium
|
||||
* @subpackage poller
|
||||
* @copyright (C) Adam Armstrong
|
||||
*
|
||||
*/
|
||||
|
||||
if (preg_match('/^PROCURVE (.*) - (.*)/', $poll_device['sysDescr'], $matches))
|
||||
{
|
||||
// PROCURVE J9029A - PA.03.04
|
||||
// PROCURVE J9028B - PB.03.00
|
||||
$hardware = $matches[1];
|
||||
$version = $matches[2];
|
||||
}
|
||||
else if (preg_match('/^(?:HP )?ProCurve (?<hardware>\w+.+?), (?:revision )?(?<version>[\w\.]+)/', $poll_device['sysDescr'], $matches))
|
||||
{
|
||||
// ProCurve J4900C Switch 2626, revision H.10.67, ROM H.08.05 (/sw/code/build/fish(mkfs))
|
||||
// HP ProCurve 1810G - 24 GE, P.1.14, eCos-2.0
|
||||
$hardware = $matches['hardware'];
|
||||
$version = $matches['version'];
|
||||
}
|
||||
else if (preg_match('/^(?:Aruba|HP|Hewlett-Packard Company) (?<hw>\w+) (?:(?:.*?(?<sw1>(?:Routing )?Switch) (?<hw1>[\w\-\+]+))|(?:(?<hw2>[\w\-\+]+) (?<sw2>(?:Routing )?Switch))), (?:revision|Software Version) (?<version>[\w\.]+)/', $poll_device['sysDescr'], $matches))
|
||||
{
|
||||
// Aruba JL075A 3810M-16SFP+-2-slot Switch, revision KB.16.02.0013, ROM KB.16.01.0006 (/ws/swbuildm/rel_spokane_qaoff/code/build/bom(swbuildm_rel_spokane_qaoff_rel_spokane))
|
||||
// HP J4121A ProCurve Switch 4000M, revision C.09.22, ROM C.06.01 (/sw/code/build/vgro(c09))
|
||||
// HP J9091A Switch E8212zl, revision K.15.06.0008, ROM K.15.19 (/sw/code/build/btm(K_15_06)) (Formerly ProCurve)
|
||||
// HP J9138A Switch 2520-24-PoE, revision S.15.09.0022, ROM S.14.03 (/ws/swbuildm/S_rel_hartford_qaoff/code/build/elmo(S_rel_hartford_qaoff)) (Formerly ProCurve)
|
||||
// HP J9729A 2920-48G-POE+ Switch, revision WB.15.16.0005, ROM WB.15.05 (/ws/swbuildm/rel_orlando_qaoff/code/build/anm(swbuildm_rel_orlando_qaoff_rel_orlando)) (Formerly ProCurve)
|
||||
// Hewlett-Packard Company J4139A HP ProCurve Routing Switch 9304M, Software Version 08.0.01rT53 Compiled on Jul 30 2008 at 02:28:35 labeled as H2R08001r
|
||||
$hardware = $matches['hw'];
|
||||
if ($matches['hw1'])
|
||||
{
|
||||
$hardware .= ' '.$matches['sw1'].' '.$matches['hw1'];
|
||||
} else {
|
||||
$hardware .= ' '.$matches['sw2'].' '.$matches['hw2'];
|
||||
}
|
||||
$version = $matches['version'];
|
||||
if (preg_match('/^PROCURVE (.*) - (.*)/', $poll_device['sysDescr'], $matches)) {
|
||||
// PROCURVE J9029A - PA.03.04
|
||||
// PROCURVE J9028B - PB.03.00
|
||||
$hardware = $matches[1];
|
||||
$version = $matches[2];
|
||||
} elseif (preg_match('/^(?:HP )?ProCurve (?<hardware>\w+.+?), (?:revision )?(?<version>[\w\.]+)/', $poll_device['sysDescr'], $matches)) {
|
||||
// ProCurve J4900C Switch 2626, revision H.10.67, ROM H.08.05 (/sw/code/build/fish(mkfs))
|
||||
// HP ProCurve 1810G - 24 GE, P.1.14, eCos-2.0
|
||||
$hardware = $matches['hardware'];
|
||||
$version = $matches['version'];
|
||||
} elseif (preg_match('/^(?:Aruba|HP|Hewlett-Packard Company) (?<hw>\w+) (?:(?:.*?(?<sw1>(?:Routing )?Switch) (?<hw1>[\w\-\+]+))|(?:(?<hw2>[\w\-\+]+) (?<sw2>(?:Routing )?Switch))), (?:revision|Software Version) (?<version>[\w\.]+)/', $poll_device['sysDescr'], $matches)) {
|
||||
// Aruba JL075A 3810M-16SFP+-2-slot Switch, revision KB.16.02.0013, ROM KB.16.01.0006 (/ws/swbuildm/rel_spokane_qaoff/code/build/bom(swbuildm_rel_spokane_qaoff_rel_spokane))
|
||||
// HP J4121A ProCurve Switch 4000M, revision C.09.22, ROM C.06.01 (/sw/code/build/vgro(c09))
|
||||
// HP J9091A Switch E8212zl, revision K.15.06.0008, ROM K.15.19 (/sw/code/build/btm(K_15_06)) (Formerly ProCurve)
|
||||
// HP J9138A Switch 2520-24-PoE, revision S.15.09.0022, ROM S.14.03 (/ws/swbuildm/S_rel_hartford_qaoff/code/build/elmo(S_rel_hartford_qaoff)) (Formerly ProCurve)
|
||||
// HP J9729A 2920-48G-POE+ Switch, revision WB.15.16.0005, ROM WB.15.05 (/ws/swbuildm/rel_orlando_qaoff/code/build/anm(swbuildm_rel_orlando_qaoff_rel_orlando)) (Formerly ProCurve)
|
||||
// Hewlett-Packard Company J4139A HP ProCurve Routing Switch 9304M, Software Version 08.0.01rT53 Compiled on Jul 30 2008 at 02:28:35 labeled as H2R08001r
|
||||
$hardware = $matches['hw'];
|
||||
if ($matches['hw1']) {
|
||||
$hardware .= ' ' . $matches['sw1'] . ' ' . $matches['hw1'];
|
||||
} else {
|
||||
$hardware .= ' ' . $matches['sw2'] . ' ' . $matches['hw2'];
|
||||
}
|
||||
$version = $matches['version'];
|
||||
}
|
||||
|
||||
// EOF
|
||||
|
@ -5,17 +5,17 @@
|
||||
*
|
||||
* This file is part of Observium.
|
||||
*
|
||||
* @package observium
|
||||
* @subpackage poller
|
||||
* @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2019 Observium Limited
|
||||
* @package observium
|
||||
* @subpackage poller
|
||||
* @copyright (C) Adam Armstrong
|
||||
*
|
||||
*/
|
||||
|
||||
$hardware = snmp_get($device, '1.3.6.1.4.1.3417.2.11.1.2.0', '-OQv');
|
||||
$hardware = snmp_get($device, '1.3.6.1.4.1.3417.2.11.1.2.0', '-OQv');
|
||||
$version_string = snmp_get($device, '1.3.6.1.4.1.3417.2.11.1.3.0', '-OQv');
|
||||
|
||||
list(,$version) = explode(': ', $version_string);
|
||||
list($version) = explode(',', $version);
|
||||
[, $version] = explode(': ', $version_string);
|
||||
[$version] = explode(',', $version);
|
||||
$version = str_replace('SGOS ', '', $version);
|
||||
|
||||
$serial = snmp_get($device, '1.3.6.1.4.1.3417.2.11.1.4.0', '-OQv');
|
||||
|
@ -5,15 +5,14 @@
|
||||
*
|
||||
* This file is part of Observium.
|
||||
*
|
||||
* @package observium
|
||||
* @subpackage poller
|
||||
* @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2019 Observium Limited
|
||||
* @package observium
|
||||
* @subpackage poller
|
||||
* @copyright (C) Adam Armstrong
|
||||
*
|
||||
*/
|
||||
|
||||
if (!$hardware)
|
||||
{
|
||||
$hardware = trim(str_replace('ATI', '', $poll_device['sysDescr']));
|
||||
if (!$hardware) {
|
||||
$hardware = trim(str_replace('ATI', '', $poll_device['sysDescr']));
|
||||
}
|
||||
|
||||
// EOF
|
||||
|
@ -5,9 +5,9 @@
|
||||
*
|
||||
* This file is part of Observium.
|
||||
*
|
||||
* @package observium
|
||||
* @subpackage poller
|
||||
* @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2019 Observium Limited
|
||||
* @package observium
|
||||
* @subpackage poller
|
||||
* @copyright (C) Adam Armstrong
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -4,28 +4,28 @@
|
||||
*
|
||||
* This file is part of Observium.
|
||||
*
|
||||
* @package observium
|
||||
* @subpackage poller
|
||||
* @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2019 Observium Limited
|
||||
* @package observium
|
||||
* @subpackage poller
|
||||
* @copyright (C) Adam Armstrong
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
RUCKUS-HWINFO-MIB::ruckusHwInfoModelNumber.0 = STRING: ZF7982
|
||||
RUCKUS-HWINFO-MIB::ruckusHwInfoCustomerID.0 = STRING: <removed>
|
||||
RUCKUS-HWINFO-MIB::ruckusHwInfoHWMajorRevision.0 = Gauge32: 2818
|
||||
RUCKUS-HWINFO-MIB::ruckusHwInfoHWMinorRevision.0 = Gauge32: 911
|
||||
RUCKUS-SWINFO-MIB::ruckusSwRevIndex.1 = INTEGER: 1
|
||||
RUCKUS-SWINFO-MIB::ruckusSwRevName.1 = STRING: not yet available
|
||||
RUCKUS-SWINFO-MIB::ruckusSwRevision.1 = STRING: 9.6.1.0.15
|
||||
RUCKUS-SWINFO-MIB::ruckusSwRevSize.1 = Gauge32: 0
|
||||
RUCKUS-SWINFO-MIB::ruckusSwRevStatus.1 = INTEGER: active(2)
|
||||
* RUCKUS-HWINFO-MIB::ruckusHwInfoModelNumber.0 = STRING: ZF7982
|
||||
* RUCKUS-HWINFO-MIB::ruckusHwInfoCustomerID.0 = STRING: <removed>
|
||||
* RUCKUS-HWINFO-MIB::ruckusHwInfoHWMajorRevision.0 = Gauge32: 2818
|
||||
* RUCKUS-HWINFO-MIB::ruckusHwInfoHWMinorRevision.0 = Gauge32: 911
|
||||
* RUCKUS-SWINFO-MIB::ruckusSwRevIndex.1 = INTEGER: 1
|
||||
* RUCKUS-SWINFO-MIB::ruckusSwRevName.1 = STRING: not yet available
|
||||
* RUCKUS-SWINFO-MIB::ruckusSwRevision.1 = STRING: 9.6.1.0.15
|
||||
* RUCKUS-SWINFO-MIB::ruckusSwRevSize.1 = Gauge32: 0
|
||||
* RUCKUS-SWINFO-MIB::ruckusSwRevStatus.1 = INTEGER: active(2)
|
||||
*/
|
||||
|
||||
$data = snmp_get_multi_oid($device, 'ruckusHwInfoModelNumber.0 ruckusHwInfoSerialNumber.0 ruckusHwInfoCustomerID.0 ruckusHwInfoHWMajorRevision.0 ruckusHwInfoHWMinorRevision.0', array(), 'RUCKUS-HWINFO-MIB');
|
||||
$data = snmp_get_multi_oid($device, 'ruckusHwInfoModelNumber.0 ruckusHwInfoSerialNumber.0 ruckusHwInfoCustomerID.0 ruckusHwInfoHWMajorRevision.0 ruckusHwInfoHWMinorRevision.0', [], 'RUCKUS-HWINFO-MIB');
|
||||
$data = $data[0];
|
||||
|
||||
$hw_ver = $data['ruckusHwInfoHWMajorRevision'] .'.'. $data['ruckusHwInfoHWMinorRevision'];
|
||||
$hw_ver = $data['ruckusHwInfoHWMajorRevision'] . '.' . $data['ruckusHwInfoHWMinorRevision'];
|
||||
|
||||
// Currently unused information
|
||||
// $customer_id = $data['ruckusHwInfoSerialNumber'];
|
||||
@ -34,17 +34,15 @@ $hw_ver = $data['ruckusHwInfoHWMajorRevision'] .'.'. $data['ruckusHwInfoHW
|
||||
|
||||
unset ($data);
|
||||
|
||||
$data = snmpwalk_cache_oid($device, 'ruckusSwRevTable', array(), 'RUCKUS-SWINFO-MIB');
|
||||
$data = snmpwalk_cache_oid($device, 'ruckusSwRevTable', [], 'RUCKUS-SWINFO-MIB');
|
||||
|
||||
//print_r($data);
|
||||
|
||||
foreach ($data as $sw_rev)
|
||||
{
|
||||
if ($sw_rev['ruckusSwRevStatus'] = 'active')
|
||||
{
|
||||
$version = $sw_rev['ruckusSwRevision'];
|
||||
break;
|
||||
}
|
||||
foreach ($data as $sw_rev) {
|
||||
if ($sw_rev['ruckusSwRevStatus'] = 'active') {
|
||||
$version = $sw_rev['ruckusSwRevision'];
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// EOF
|
||||
|
@ -4,20 +4,20 @@
|
||||
*
|
||||
* This file is part of Observium.
|
||||
*
|
||||
* @package observium
|
||||
* @subpackage poller
|
||||
* @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2020 Observium Limited
|
||||
* @package observium
|
||||
* @subpackage poller
|
||||
* @copyright (C) Adam Armstrong
|
||||
*
|
||||
*/
|
||||
|
||||
// FIXME move to graph definitions
|
||||
$snmpdata = snmp_get_multi_oid($device, 'nsResSessAllocate.0 nsResSessMaxium.0 nsResSessFailed.0', array(), 'NETSCREEN-RESOURCE-MIB');
|
||||
$snmpdata = snmp_get_multi_oid($device, 'nsResSessAllocate.0 nsResSessMaxium.0 nsResSessFailed.0', [], 'NETSCREEN-RESOURCE-MIB');
|
||||
|
||||
rrdtool_update_ng($device, 'screenos-sessions', array(
|
||||
rrdtool_update_ng($device, 'screenos-sessions', [
|
||||
'allocate' => $snmpdata[0]['nsResSessAllocate'],
|
||||
'max' => $snmpdata[0]['nsResSessMaxium'],
|
||||
'failed' => $snmpdata[0]['nsResSessFailed'],
|
||||
));
|
||||
]);
|
||||
|
||||
$graphs['screenos_sessions'] = TRUE;
|
||||
|
||||
|
@ -5,9 +5,9 @@
|
||||
*
|
||||
* This file is part of Observium.
|
||||
*
|
||||
* @package observium
|
||||
* @subpackage poller
|
||||
* @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2019 Observium Limited
|
||||
* @package observium
|
||||
* @subpackage poller
|
||||
* @copyright (C) Adam Armstrong
|
||||
*
|
||||
*/
|
||||
|
||||
@ -17,8 +17,10 @@
|
||||
|
||||
$hardware = snmp_get($device, '.1.3.6.1.4.1.32050.2.1.25.2.0', '-Oqvn', 'SNMPv2-SMI');
|
||||
$hardware = "SiteMonitor $hardware";
|
||||
$version = snmp_get($device, '.1.3.6.1.4.1.32050.2.1.25.3.0', '-Oqvn', 'SNMPv2-SMI');
|
||||
$serial = snmp_get($device, '.1.3.6.1.4.1.32050.2.1.25.4.0', '-Oqvn', 'SNMPv2-SMI');
|
||||
if (!$serial) { unset($serial); }
|
||||
$version = snmp_get($device, '.1.3.6.1.4.1.32050.2.1.25.3.0', '-Oqvn', 'SNMPv2-SMI');
|
||||
$serial = snmp_get($device, '.1.3.6.1.4.1.32050.2.1.25.4.0', '-Oqvn', 'SNMPv2-SMI');
|
||||
if (!$serial) {
|
||||
unset($serial);
|
||||
}
|
||||
|
||||
// EOF
|
||||
|
@ -4,9 +4,9 @@
|
||||
*
|
||||
* This file is part of Observium.
|
||||
*
|
||||
* @package observium
|
||||
* @subpackage poller
|
||||
* @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2020 Observium Limited
|
||||
* @package observium
|
||||
* @subpackage poller
|
||||
* @copyright (C) Adam Armstrong
|
||||
*
|
||||
*/
|
||||
|
||||
@ -36,38 +36,30 @@ $mfeatures = [
|
||||
];
|
||||
|
||||
# SmartOptics, M-Series M-1601-D1A30C1 R1B, SmartOS v2.3.9 (Compiled on Tue Oct 14 09:40:33 CEST 2014)
|
||||
if (preg_match('/^SmartOptics, \S+Series (?<hardware>.+), SmartOS v(?<version>\S+) /', $poll_device['sysDescr'], $matches))
|
||||
{
|
||||
$hardware = $matches['hardware']; // -> M-1601-D1A30C1 R1B
|
||||
$version = $matches['version']; // -> 2.3.9
|
||||
if (preg_match('/^SmartOptics, \S+Series (?<hardware>.+), SmartOS v(?<version>\S+) /', $poll_device['sysDescr'], $matches)) {
|
||||
$hardware = $matches['hardware']; // -> M-1601-D1A30C1 R1B
|
||||
$version = $matches['version']; // -> 2.3.9
|
||||
|
||||
// Features
|
||||
$fa = array();
|
||||
if (preg_match('/^(M-1601-[A-Z0-9]+)(C0|C1) /', $hardware, $matches))
|
||||
{
|
||||
# An M-1601 ending in "C1" has an optical supervisory channel feature.
|
||||
if ($matches[2] == 'C1')
|
||||
{
|
||||
$fa[] = 'OSC';
|
||||
// Features
|
||||
$fa = [];
|
||||
if (preg_match('/^(M-1601-[A-Z0-9]+)(C0|C1) /', $hardware, $matches)) {
|
||||
# An M-1601 ending in "C1" has an optical supervisory channel feature.
|
||||
if ($matches[2] == 'C1') {
|
||||
$fa[] = 'OSC';
|
||||
}
|
||||
if (isset($mfeatures[$matches[1] . 'C0'])) {
|
||||
$fa[] = $mfeatures[$matches[1] . 'C0'];
|
||||
}
|
||||
} elseif (preg_match('/^(M-\d+-[A-Z\d]+) /', $hardware, $matches)) {
|
||||
# all other M-series
|
||||
if (isset($mfeatures[$matches[1]])) {
|
||||
$fa[] = $mfeatures[$matches[1]];
|
||||
}
|
||||
}
|
||||
if (isset($mfeatures[$matches[1] . 'C0']))
|
||||
{
|
||||
$fa[] = $mfeatures[$matches[1] . 'C0'];
|
||||
}
|
||||
}
|
||||
elseif (preg_match('/^(M-\d+-[A-Z\d]+) /', $hardware, $matches))
|
||||
{
|
||||
# all other M-series
|
||||
if (isset($mfeatures[$matches[1]]))
|
||||
{
|
||||
$fa[] = $mfeatures[$matches[1]];
|
||||
}
|
||||
}
|
||||
|
||||
if (count($fa))
|
||||
{
|
||||
$features = implode(', ', $fa);
|
||||
}
|
||||
if (count($fa)) {
|
||||
$features = implode(', ', $fa);
|
||||
}
|
||||
}
|
||||
|
||||
// EOF
|
||||
|
@ -5,19 +5,18 @@
|
||||
*
|
||||
* This file is part of Observium.
|
||||
*
|
||||
* @package observium
|
||||
* @subpackage poller
|
||||
* @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2019 Observium Limited
|
||||
* @package observium
|
||||
* @subpackage poller
|
||||
* @copyright (C) Adam Armstrong
|
||||
*
|
||||
*/
|
||||
|
||||
// Filthy hack to get software version. may not work on anything but 585v7 :)
|
||||
$loop = snmp_get($device, 'ifDescr.101');
|
||||
|
||||
if ($loop)
|
||||
{
|
||||
preg_match('@([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+)@i',
|
||||
$loop, $matches);
|
||||
if ($loop) {
|
||||
preg_match('@([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+)@i',
|
||||
$loop, $matches);
|
||||
$version = $matches[1];
|
||||
}
|
||||
|
||||
|
@ -5,15 +5,15 @@
|
||||
*
|
||||
* This file is part of Observium.
|
||||
*
|
||||
* @package observium
|
||||
* @subpackage poller
|
||||
* @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2019 Observium Limited
|
||||
* @package observium
|
||||
* @subpackage poller
|
||||
* @copyright (C) Adam Armstrong
|
||||
*
|
||||
*/
|
||||
|
||||
if (empty($hardware)) // Fallback since svnApplianceProductName (from definitions) is only supported since R77.10
|
||||
{
|
||||
$hardware = rewrite_unix_hardware($poll_device['sysDescr']);
|
||||
$hardware = rewrite_unix_hardware($poll_device['sysDescr']);
|
||||
}
|
||||
|
||||
// EOF
|
||||
|
@ -5,9 +5,9 @@
|
||||
*
|
||||
* This file is part of Observium.
|
||||
*
|
||||
* @package observium
|
||||
* @subpackage discovery
|
||||
* @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2019 Observium Limited
|
||||
* @package observium
|
||||
* @subpackage discovery
|
||||
* @copyright (C) Adam Armstrong
|
||||
*
|
||||
*/
|
||||
|
||||
@ -34,29 +34,25 @@
|
||||
// RBT-MIB::products.51.2.11.1.1.2.2 = STRING: "SSL_Peering_CAs"
|
||||
|
||||
// CX models, most common
|
||||
$serial = snmp_get($device, '.1.3.6.1.4.1.17163.1.1.1.2.0', '-OQv', 'STEELHEAD-MIB');
|
||||
$model_oid = '.1.3.6.1.4.1.17163.1.1.1.1.0';
|
||||
$serial = snmp_get($device, '.1.3.6.1.4.1.17163.1.1.1.2.0', '-OQv', 'STEELHEAD-MIB');
|
||||
$model_oid = '.1.3.6.1.4.1.17163.1.1.1.1.0';
|
||||
$version_oid = '.1.3.6.1.4.1.17163.1.1.1.3.0';
|
||||
|
||||
if ($serial == '')
|
||||
{
|
||||
$serial = snmp_get($device, '.1.3.6.1.4.1.17163.1.51.1.2.0', '-OQv', 'STEELHEAD-MIB');
|
||||
$model_oid = '.1.3.6.1.4.1.17163.1.51.1.1.0';
|
||||
$version_oid = '.1.3.6.1.4.1.17163.1.51.1.3.0';
|
||||
if ($serial == '') {
|
||||
$serial = snmp_get($device, '.1.3.6.1.4.1.17163.1.51.1.2.0', '-OQv', 'STEELHEAD-MIB');
|
||||
$model_oid = '.1.3.6.1.4.1.17163.1.51.1.1.0';
|
||||
$version_oid = '.1.3.6.1.4.1.17163.1.51.1.3.0';
|
||||
}
|
||||
|
||||
if ($serial != '')
|
||||
{
|
||||
if (preg_match('/^(rbt[a-zA-Z_\-]+) ([a-zA-Z\.\-_0-9]+) (.*)/', snmp_get($device, $version_oid, '-OQv', 'STEELHEAD-MIB'), $regexp_result))
|
||||
{
|
||||
$version = $regexp_result[2];
|
||||
}
|
||||
if ($serial != '') {
|
||||
if (preg_match('/^(rbt[a-zA-Z_\-]+) ([a-zA-Z\.\-_0-9]+) (.*)/', snmp_get($device, $version_oid, '-OQv', 'STEELHEAD-MIB'), $regexp_result)) {
|
||||
$version = $regexp_result[2];
|
||||
}
|
||||
|
||||
$hw = snmp_get($device, $model_oid, '-OQv', 'STEELHEAD-MIB');
|
||||
if (preg_match('/([a-zA-Z0-9\.\-_]+) \(([a-zA-Z0-9\.\-_]+)\)/', $hw, $regexp_result))
|
||||
{
|
||||
$hardware = $regexp_result[2];
|
||||
}
|
||||
$hw = snmp_get($device, $model_oid, '-OQv', 'STEELHEAD-MIB');
|
||||
if (preg_match('/([a-zA-Z0-9\.\-_]+) \(([a-zA-Z0-9\.\-_]+)\)/', $hw, $regexp_result)) {
|
||||
$hardware = $regexp_result[2];
|
||||
}
|
||||
}
|
||||
|
||||
// TODO: $features = '';
|
||||
|
@ -4,9 +4,9 @@
|
||||
*
|
||||
* This file is part of Observium.
|
||||
*
|
||||
* @package observium
|
||||
* @subpackage poller
|
||||
* @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2019 Observium Limited
|
||||
* @package observium
|
||||
* @subpackage poller
|
||||
* @copyright (C) Adam Armstrong
|
||||
*
|
||||
*/
|
||||
|
||||
@ -16,22 +16,24 @@
|
||||
//TIMETRA-CHASSIS-MIB::tmnxChassisTypeName.20 = STRING: "7210 SAS-M 24F 2XFP-1"
|
||||
|
||||
// Prefer db serial
|
||||
$entPhysical = dbFetchRow('SELECT * FROM `entPhysical` WHERE `device_id` = ? AND `entPhysicalContainedIn` = ? AND `entPhysicalParentRelPos` = ? AND `deleted` IS NULL', [ $device['device_id'], 0, -1 ]);
|
||||
$entPhysical = dbFetchRow('SELECT * FROM `entPhysical` WHERE `device_id` = ? AND `entPhysicalContainedIn` = ? AND `entPhysicalParentRelPos` = ? AND `deleted` IS NULL', [$device['device_id'], 0, -1]);
|
||||
if (is_valid_param($entPhysical['entPhysicalSerialNum'], 'serial')) {
|
||||
$serial = $entPhysical['entPhysicalSerialNum'];
|
||||
$serial = $entPhysical['entPhysicalSerialNum'];
|
||||
}
|
||||
|
||||
//TIMETRA-CHASSIS-MIB::tmnxHwSerialNumber.1.50331649 = STRING: XX1416X2339
|
||||
//TIMETRA-CHASSIS-MIB::tmnxHwSerialNumber.1.83886081 = STRING:
|
||||
//TIMETRA-CHASSIS-MIB::tmnxHwSerialNumber.1.83886082 = STRING:
|
||||
foreach (snmpwalk_cache_oid($device, 'tmnxHwSerialNumber', NULL, 'TIMETRA-CHASSIS-MIB') as $index => $entry) {
|
||||
if (!is_valid_param($entry['tmnxHwSerialNumber'], 'serial')) { continue; }
|
||||
if (!is_valid_param($entry['tmnxHwSerialNumber'], 'serial')) {
|
||||
continue;
|
||||
}
|
||||
|
||||
// In mostly cases first entry is chassis, but need to check it
|
||||
$check = snmp_get_multi_oid($device, "tmnxHwContainedIn.$index tmnxHwParentRelPos.$index", [], 'TIMETRA-CHASSIS-MIB');
|
||||
if ($check[$index]['tmnxHwContainedIn'] === '0' && $check[$index]['tmnxHwParentRelPos'] === '-1') {
|
||||
$serial = $entry['tmnxHwSerialNumber'];
|
||||
}
|
||||
// In mostly cases first entry is chassis, but need to check it
|
||||
$check = snmp_get_multi_oid($device, "tmnxHwContainedIn.$index tmnxHwParentRelPos.$index", [], 'TIMETRA-CHASSIS-MIB');
|
||||
if ($check[$index]['tmnxHwContainedIn'] === '0' && $check[$index]['tmnxHwParentRelPos'] === '-1') {
|
||||
$serial = $entry['tmnxHwSerialNumber'];
|
||||
}
|
||||
}
|
||||
|
||||
unset($check, $index, $entry);
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user