initial commit; version 22.5.12042
This commit is contained in:
25
includes/discovery/processors/bluecoat-sg-proxy-mib.inc.php
Normal file
25
includes/discovery/processors/bluecoat-sg-proxy-mib.inc.php
Normal file
@ -0,0 +1,25 @@
|
||||
<?php
|
||||
/**
|
||||
* Observium
|
||||
*
|
||||
* This file is part of Observium.
|
||||
*
|
||||
* @package observium
|
||||
* @subpackage discovery
|
||||
* @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2022 Observium Limited
|
||||
*
|
||||
*/
|
||||
|
||||
$processors_array = snmpwalk_cache_oid($device, 'sgProxyCpuCoreBusyPerCent', [], 'BLUECOAT-SG-PROXY-MIB');
|
||||
|
||||
foreach ($processors_array as $index => $entry) {
|
||||
$descr = ($index == 1) ? 'CPU' : 'CPU' . ($index - 1);
|
||||
$oid = ".1.3.6.1.4.1.3417.2.11.2.4.1.8.$index";
|
||||
$usage = $entry['sgProxyCpuCoreBusyPerCent'];
|
||||
|
||||
discover_processor($valid['processor'], $device, $oid, $index, 'cpu', $descr, 1, $usage);
|
||||
}
|
||||
|
||||
unset($processors_array, $descr, $oid, $usage, $index, $entry);
|
||||
|
||||
// EOF
|
29
includes/discovery/processors/bluecoat-sg-usage-mib.inc.php
Normal file
29
includes/discovery/processors/bluecoat-sg-usage-mib.inc.php
Normal file
@ -0,0 +1,29 @@
|
||||
<?php
|
||||
/**
|
||||
* Observium
|
||||
*
|
||||
* This file is part of Observium.
|
||||
*
|
||||
* @package observium
|
||||
* @subpackage discovery
|
||||
* @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2022 Observium Limited
|
||||
*
|
||||
*/
|
||||
|
||||
// ProxyAV devices hide their CPUs/Memory/Interfaces in here
|
||||
|
||||
$av_array = snmpwalk_cache_oid($device, 'deviceUsage', [], $mib);
|
||||
|
||||
foreach ($av_array as $index => $entry) {
|
||||
if (str_contains($entry['deviceUsageName'], 'CPU')) {
|
||||
$descr = $entry['deviceUsageName'];
|
||||
$oid = ".1.3.6.1.4.1.3417.2.4.1.1.1.4.$index";
|
||||
$usage = $entry['deviceUsagePercent'];
|
||||
|
||||
discover_processor($valid['processor'], $device, $oid, $index, 'cpu', $descr, 1, $usage);
|
||||
}
|
||||
}
|
||||
|
||||
unset($av_array, $descr, $oid, $usage, $index, $entry);
|
||||
|
||||
// EOF
|
25
includes/discovery/processors/cisco-entity-pfe-mib.inc.php
Normal file
25
includes/discovery/processors/cisco-entity-pfe-mib.inc.php
Normal file
@ -0,0 +1,25 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Observium
|
||||
*
|
||||
* This file is part of Observium.
|
||||
*
|
||||
* @package observium
|
||||
* @subpackage discovery
|
||||
* @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2019 Observium Limited
|
||||
*
|
||||
*/
|
||||
|
||||
$pxf_array = snmpwalk_cache_oid($device, 'cePfePerfCurrent5MinUtilization', array(), $mib);
|
||||
|
||||
foreach ($pxf_array as $index => $entry)
|
||||
{
|
||||
$descr = 'PXF engine';
|
||||
if (count($pxf_array) > 1) { $descr .= ' ' . $index; }
|
||||
|
||||
$oid = ".1.3.6.1.4.1.9.9.265.1.1.2.1.5.$index";
|
||||
discover_processor($valid['processor'], $device, $oid, $index, 'cisco-entity-pfe-mib', $descr, 1, $entry['cePfePerfCurrent5MinUtilization']);
|
||||
}
|
||||
|
||||
// EOF
|
25
includes/discovery/processors/cisco-entity-qfp-mib.inc.php
Normal file
25
includes/discovery/processors/cisco-entity-qfp-mib.inc.php
Normal file
@ -0,0 +1,25 @@
|
||||
<?php
|
||||
/**
|
||||
* Observium
|
||||
*
|
||||
* This file is part of Observium.
|
||||
*
|
||||
* @package observium
|
||||
* @subpackage discovery
|
||||
* @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2022 Observium Limited
|
||||
*
|
||||
*/
|
||||
|
||||
$array = snmpwalk_cache_oid($device, 'ceqfpUtilizationEntry', [], $mib);
|
||||
|
||||
foreach ($array as $index => $entry) {
|
||||
list($entPhysicalIndex, $interval) = explode('.', $index);
|
||||
if ($interval === 'fiveMinutes' && is_numeric($entry['ceqfpUtilProcessingLoad'])) {
|
||||
$descr = snmp_get_oid($device, "entPhysicalName.$entPhysicalIndex", 'ENTITY-MIB');
|
||||
$usage_oid = ".1.3.6.1.4.1.9.9.715.1.1.6.1.14.$entPhysicalIndex.3";
|
||||
|
||||
discover_processor($valid['processor'], $device, $usage_oid, $entPhysicalIndex, 'qfp', $descr, 1, $entry['ceqfpUtilProcessingLoad'], $entPhysicalIndex);
|
||||
}
|
||||
}
|
||||
|
||||
// EOF
|
59
includes/discovery/processors/cisco-process-mib.inc.php
Normal file
59
includes/discovery/processors/cisco-process-mib.inc.php
Normal file
@ -0,0 +1,59 @@
|
||||
<?php
|
||||
/**
|
||||
* Observium
|
||||
*
|
||||
* This file is part of Observium.
|
||||
*
|
||||
* @package observium
|
||||
* @subpackage discovery
|
||||
* @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2020 Observium Limited
|
||||
*
|
||||
*/
|
||||
|
||||
$processors_array = snmpwalk_cache_oid($device, 'cpmCPU', array(), $mib);
|
||||
|
||||
foreach ($processors_array as $index => $entry)
|
||||
{
|
||||
if (is_numeric($entry['cpmCPUTotal5minRev']) || is_numeric($entry['cpmCPUTotal5min']))
|
||||
{
|
||||
$entPhysicalIndex = $entry['cpmCPUTotalPhysicalIndex'];
|
||||
|
||||
if (isset($entry['cpmCPUTotal5minRev']))
|
||||
{
|
||||
$usage_oid = ".1.3.6.1.4.1.9.9.109.1.1.1.1.8.$index";
|
||||
$usage = $entry['cpmCPUTotal5minRev'];
|
||||
} elseif (isset($entry['cpmCPUTotal5min'])) {
|
||||
$usage_oid = ".1.3.6.1.4.1.9.9.109.1.1.1.1.5.$index";
|
||||
$usage = $entry['cpmCPUTotal5min'];
|
||||
}
|
||||
|
||||
if ($entPhysicalIndex)
|
||||
{
|
||||
$descr_oid = 'entPhysicalName.' . $entPhysicalIndex;
|
||||
$descr = snmp_get_oid($device, $descr_oid, 'ENTITY-MIB');
|
||||
}
|
||||
if (!strlen($descr))
|
||||
{
|
||||
$descr = "Processor $index";
|
||||
}
|
||||
|
||||
if (!str_contains($descr, 'No') && !str_contains($usage, 'No') && $descr != '')
|
||||
{
|
||||
discover_processor($valid['processor'], $device, $usage_oid, $index, 'cpm', $descr, 1, $usage, $entPhysicalIndex);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!is_array($valid['processor']['cpm']))
|
||||
{
|
||||
// OLD-CISCO-CPU-MIB::avgBusy5
|
||||
$avgBusy5 = snmp_get($device, '.1.3.6.1.4.1.9.2.1.58.0', '-Oqv');
|
||||
if (is_numeric($avgBusy5))
|
||||
{
|
||||
discover_processor($valid['processor'], $device, '.1.3.6.1.4.1.9.2.1.58.0', 0, 'ios', 'Processor', 1, $avgBusy5);
|
||||
}
|
||||
}
|
||||
|
||||
unset($processors_array);
|
||||
|
||||
// EOF
|
27
includes/discovery/processors/ciscosb-rndmng.inc.php
Normal file
27
includes/discovery/processors/ciscosb-rndmng.inc.php
Normal file
@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Observium
|
||||
*
|
||||
* This file is part of Observium.
|
||||
*
|
||||
* @package observium
|
||||
* @subpackage discovery
|
||||
* @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2019 Observium Limited
|
||||
*
|
||||
*/
|
||||
|
||||
# CISCOSB-rndMng::rlCpuUtilEnable.0 = INTEGER: true(1)
|
||||
# CISCOSB-rndMng::rlCpuUtilDuringLast5Minutes.0 = INTEGER: 4
|
||||
|
||||
$data = snmp_get_multi_oid($device, 'rlCpuUtilEnable.0 rlCpuUtilDuringLast5Minutes.0', array(), $mib);
|
||||
$usage = $data[0]['rlCpuUtilDuringLast5Minutes'];
|
||||
|
||||
if ($data[0]['rlCpuUtilEnable'] == 'true')
|
||||
{
|
||||
discover_processor($valid['processor'], $device, ".1.3.6.1.4.1.9.6.1.101.1.9.0", 0, 'ciscosb', 'CPU', 1, $usage);
|
||||
}
|
||||
|
||||
unset($usage, $data);
|
||||
|
||||
// EOF
|
@ -0,0 +1,48 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Observium
|
||||
*
|
||||
* This file is part of Observium.
|
||||
*
|
||||
* @package observium
|
||||
* @subpackage discovery
|
||||
* @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2019 Observium Limited
|
||||
*
|
||||
*/
|
||||
|
||||
// DELL-NETWORKING-CHASSIS-MIB
|
||||
|
||||
//DELL-NETWORKING-CHASSIS-MIB::dellNetCpuUtil5Min.stack.1.1 = Gauge32: 14 percent
|
||||
|
||||
$processors_array = snmpwalk_cache_threepart_oid($device, 'dellNetCpuUtil5Min', array(), $mib, NULL, OBS_SNMP_ALL_NUMERIC_INDEX);
|
||||
//print_vars($processors_array);
|
||||
|
||||
foreach ($processors_array as $type => $entry1)
|
||||
{
|
||||
// Hrm, this is possible for multiple types?
|
||||
$first_unit = array_shift(array_keys($entry1));
|
||||
foreach ($entry1 as $unit => $entry2)
|
||||
{
|
||||
$processors_count = count($entry2);
|
||||
foreach ($entry2 as $processor => $entry)
|
||||
{
|
||||
$dot_index = ".{$type}.{$unit}.{$processor}";
|
||||
$descr = 'Unit ' . strval($unit - $first_unit);
|
||||
if ($processors_count > 1)
|
||||
{
|
||||
$descr .= " Processor {$processor}";
|
||||
}
|
||||
$oid_table = 'dellNetCpuUtilTable';
|
||||
$oid_name = 'dellNetCpuUtil5Min';
|
||||
$oid_num = ".1.3.6.1.4.1.6027.3.26.1.4.4.1.5{$dot_index}";
|
||||
$usage = $entry[$oid_name];
|
||||
|
||||
discover_processor($valid['processor'], $device, $oid_num, $oid_table . $dot_index, $oid_name, $descr, 1, $usage);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
unset($processors_array, $dot_index, $entry, $descr, $oid_table, $oid_name, $oid_num, $usage);
|
||||
|
||||
// EOF
|
25
includes/discovery/processors/dnos-switching-mib.inc.php
Normal file
25
includes/discovery/processors/dnos-switching-mib.inc.php
Normal file
@ -0,0 +1,25 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Observium
|
||||
*
|
||||
* This file is part of Observium.
|
||||
*
|
||||
* @package observium
|
||||
* @subpackage discovery
|
||||
* @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2019 Observium Limited
|
||||
*
|
||||
*/
|
||||
|
||||
// DNOS-SWITCHING-MIB::agentSwitchCpuProcessTotalUtilization.0 = STRING: " 5 Secs ( 6.510%) 60 Secs ( 7.724%) 300 Secs ( 6.3812%)"
|
||||
|
||||
$data = snmp_get($device, 'agentSwitchCpuProcessTotalUtilization.0', '-OQUvs', $mib);
|
||||
|
||||
if (preg_match('/300 Secs \(\s*(?<proc>[\d\.]+)%\)/', $data, $matches))
|
||||
{
|
||||
discover_processor($valid['processor'], $device, '.1.3.6.1.4.1.674.10895.5000.2.6132.1.1.1.1.4.9.0', '0', 'dnos-switching-mib', 'Processor', 1, $matches['proc']);
|
||||
}
|
||||
|
||||
unset($data);
|
||||
|
||||
// EOF
|
@ -0,0 +1,25 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Observium
|
||||
*
|
||||
* This file is part of Observium.
|
||||
*
|
||||
* @package observium
|
||||
* @subpackage discovery
|
||||
* @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2019 Observium Limited
|
||||
*
|
||||
*/
|
||||
|
||||
// EdgeSwitch-SWITCHING-MIB::agentSwitchCpuProcessTotalUtilization.0 = STRING: " 5 Secs ( 99.9999%) 60 Secs ( 99.6358%) 300 Secs ( 99.2401%)"
|
||||
|
||||
$data = snmp_get_oid($device, 'agentSwitchCpuProcessTotalUtilization.0', $mib);
|
||||
|
||||
if (preg_match('/300 Secs \(\s*(?<proc>[\d\.]+)%\)/', $data, $matches))
|
||||
{
|
||||
discover_processor($valid['processor'], $device, '.1.3.6.1.4.1.4413.1.1.1.1.4.9.0', '0', 'edgeswitch-switching-mib', 'Processor', 1, $matches['proc']);
|
||||
}
|
||||
|
||||
unset($data, $matches);
|
||||
|
||||
// EOF
|
@ -0,0 +1,26 @@
|
||||
<?php
|
||||
/**
|
||||
* Observium
|
||||
*
|
||||
* This file is part of Observium.
|
||||
*
|
||||
* @package observium
|
||||
* @subpackage discovery
|
||||
* @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2022 Observium Limited
|
||||
*
|
||||
*/
|
||||
|
||||
$processors_array = snmpwalk_cache_oid($device, 'extremeCpuMonitorSystemTable', [], $mib);
|
||||
|
||||
foreach ($processors_array as $index => $entry) {
|
||||
if (is_numeric($entry['extremeCpuMonitorSystemUtilization5mins']) && is_numeric($index)) {
|
||||
$descr = "Slot $index";
|
||||
$usage = $entry['extremeCpuMonitorSystemUtilization5mins'];
|
||||
$oid = ".1.3.6.1.4.1.1916.1.32.1.4.1.9.$index";
|
||||
discover_processor($valid['processor'], $device, $oid, $index, 'xos', $descr, 1, $usage);
|
||||
}
|
||||
}
|
||||
|
||||
unset($processors_array, $index, $descr, $usage, $oid);
|
||||
|
||||
// EOF
|
@ -0,0 +1,29 @@
|
||||
<?php
|
||||
/**
|
||||
* Observium
|
||||
*
|
||||
* This file is part of Observium.
|
||||
*
|
||||
* @package observium
|
||||
* @subpackage discovery
|
||||
* @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2022 Observium Limited
|
||||
*
|
||||
*/
|
||||
|
||||
// Force10 C-Series
|
||||
|
||||
// chRpmCpuUtil5Min.1 = Gauge32: 47
|
||||
|
||||
$processors_array = snmpwalk_cache_oid($device, 'chRpmCpuUtil5Min', [], $mib);
|
||||
|
||||
foreach ($processors_array as $index => $entry) {
|
||||
$descr = ($index == 1) ? 'CP' : 'RP' . ($index - 1);
|
||||
$oid = ".1.3.6.1.4.1.6027.3.8.1.3.7.1.5.$index";
|
||||
$usage = $entry['chRpmCpuUtil5Min'];
|
||||
|
||||
discover_processor($valid['processor'], $device, $oid, $index, 'ftos-cseries', $descr, 1, $usage);
|
||||
}
|
||||
|
||||
unset($processors_array, $descr, $oid, $usage, $index, $entry);
|
||||
|
||||
// EOF
|
31
includes/discovery/processors/f10-chassis-mib.inc.php
Normal file
31
includes/discovery/processors/f10-chassis-mib.inc.php
Normal file
@ -0,0 +1,31 @@
|
||||
<?php
|
||||
/**
|
||||
* Observium
|
||||
*
|
||||
* This file is part of Observium.
|
||||
*
|
||||
* @package observium
|
||||
* @subpackage discovery
|
||||
* @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2022 Observium Limited
|
||||
*
|
||||
*/
|
||||
|
||||
// Force10 E-Series
|
||||
|
||||
// chRpmCpuUtil5Min.1 = Gauge32: 34
|
||||
// chRpmCpuUtil5Min.2 = Gauge32: 34
|
||||
// chRpmCpuUtil5Min.3 = Gauge32: 34
|
||||
|
||||
$processors_array = snmpwalk_cache_oid($device, 'chRpmCpuUtil5Min', [], $mib);
|
||||
|
||||
foreach ($processors_array as $index => $entry) {
|
||||
$descr = ($index == 1) ? 'CP' : 'RP' . ($index - 1);
|
||||
$oid = ".1.3.6.1.4.1.6027.3.1.1.3.7.1.5.$index";
|
||||
$usage = $entry['chRpmCpuUtil5Min'];
|
||||
|
||||
discover_processor($valid['processor'], $device, $oid, $index, 'ftos-eseries', $descr, 1, $usage);
|
||||
}
|
||||
|
||||
unset($processors_array, $descr, $oid, $index, $entry, $usage);
|
||||
|
||||
// EOF
|
@ -0,0 +1,28 @@
|
||||
<?php
|
||||
/**
|
||||
* Observium
|
||||
*
|
||||
* This file is part of Observium.
|
||||
*
|
||||
* @package observium
|
||||
* @subpackage discovery
|
||||
* @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2022 Observium Limited
|
||||
*
|
||||
*/
|
||||
|
||||
// Force10 M-Series
|
||||
|
||||
$processors_array = snmpwalk_cache_oid($device, 'chStackUnitCpuUtil5Min', [], $mib);
|
||||
$processors_array = snmpwalk_cache_oid($device, 'chStackUnitSysType', $processors_array, $mib);
|
||||
|
||||
foreach ($processors_array as $index => $entry) {
|
||||
$descr = 'Unit ' . ($index - 1) . ' ' . $entry['chStackUnitSysType'];
|
||||
$oid = "1.3.6.1.4.1.6027.3.19.1.2.8.1.4.$index";
|
||||
$usage = $entry['chStackUnitCpuUtil5Min'];
|
||||
|
||||
discover_processor($valid['processor'], $device, $oid, $index, 'F10-M-SERIES-CHASSIS-MIB', $descr, 1, $usage);
|
||||
}
|
||||
|
||||
unset($processors_array);
|
||||
|
||||
// EOF
|
@ -0,0 +1,30 @@
|
||||
<?php
|
||||
/**
|
||||
* Observium
|
||||
*
|
||||
* This file is part of Observium.
|
||||
*
|
||||
* @package observium
|
||||
* @subpackage discovery
|
||||
* @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2022 Observium Limited
|
||||
*
|
||||
*/
|
||||
|
||||
// Force10 S-Series
|
||||
|
||||
# chStackUnitCpuUtil5Min.1 = Gauge32: 47
|
||||
|
||||
$processors_array = snmpwalk_cache_oid($device, 'chStackUnitCpuUtil5Min', [], $mib);
|
||||
$processors_array = snmpwalk_cache_oid($device, 'chStackUnitSysType', $processors_array, $mib);
|
||||
|
||||
foreach ($processors_array as $index => $entry) {
|
||||
$descr = 'Unit ' . ($index - 1) . ' ' . $entry['chStackUnitSysType'];
|
||||
$oid = ".1.3.6.1.4.1.6027.3.10.1.2.9.1.4.$index";
|
||||
$usage = $entry['chStackUnitCpuUtil5Min'];
|
||||
|
||||
discover_processor($valid['processor'], $device, $oid, $index, 'ftos-sseries', $descr, 1, $usage);
|
||||
}
|
||||
|
||||
unset($processors_array, $index, $entry, $descr, $oid, $usage);
|
||||
|
||||
// EOF
|
28
includes/discovery/processors/f5-bigip-system-mib.inc.php
Normal file
28
includes/discovery/processors/f5-bigip-system-mib.inc.php
Normal file
@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Observium
|
||||
*
|
||||
* This file is part of Observium.
|
||||
*
|
||||
* @package observium
|
||||
* @subpackage discovery
|
||||
* @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2019 Observium Limited
|
||||
*
|
||||
*/
|
||||
|
||||
$tmm_processor = snmpwalk_cache_oid($device, 'sysTmmStatTmUsageRatio5m', array(), $mib);
|
||||
|
||||
foreach ($tmm_processor as $index => $entry)
|
||||
{
|
||||
$oid = ".1.3.6.1.4.1.3375.2.1.8.2.3.1.39." . snmp_string_to_oid($index);
|
||||
$descr = "TMM $index Processor";
|
||||
$usage = $entry['sysTmmStatTmUsageRatio5m'];
|
||||
|
||||
// FIXME, when will converted to definition-based, note that here used "named" index instead numeric
|
||||
discover_processor($valid['processor'], $device, $oid, $index, 'f5-bigip-tmm', $descr, 1, $usage);
|
||||
}
|
||||
|
||||
unset ($tmm_processor, $index, $used);
|
||||
|
||||
// EOF
|
52
includes/discovery/processors/foundry-sn-agent-mib.inc.php
Normal file
52
includes/discovery/processors/foundry-sn-agent-mib.inc.php
Normal file
@ -0,0 +1,52 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Observium
|
||||
*
|
||||
* This file is part of Observium.
|
||||
*
|
||||
* @package observium
|
||||
* @subpackage discovery
|
||||
* @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2019 Observium Limited
|
||||
*
|
||||
*/
|
||||
|
||||
$processors_array = snmpwalk_cache_triple_oid($device, 'snAgentCpuUtilEntry', $processors_array, $mib);
|
||||
|
||||
foreach ($processors_array as $index => $entry)
|
||||
{
|
||||
if ((isset($entry['snAgentCpuUtilValue']) || isset($entry['snAgentCpuUtil100thPercent'])) && $entry['snAgentCpuUtilInterval'] == 300)
|
||||
{
|
||||
#$entPhysicalIndex = $entry['cpmCPUTotalPhysicalIndex'];
|
||||
|
||||
if ($entry['snAgentCpuUtil100thPercent'])
|
||||
{
|
||||
$usage_oid = ".1.3.6.1.4.1.1991.1.1.2.11.1.1.6.$index";
|
||||
$usage = $entry['snAgentCpuUtil100thPercent'];
|
||||
$precision = 100;
|
||||
} elseif ($entry['snAgentCpuUtilValue']) {
|
||||
$usage_oid = ".1.3.6.1.4.1.1991.1.1.2.11.1.1.4.$index";
|
||||
$usage = $entry['snAgentCpuUtilValue'];
|
||||
$precision = 100;
|
||||
}
|
||||
|
||||
list($slot, $instance, $interval) = explode('.', $index);
|
||||
|
||||
$descr_oid = 'snAgentConfigModuleDescription.' . $entry['snAgentCpuUtilSlotNum'];
|
||||
$descr = snmp_get($device, $descr_oid, '-Oqv', $mib);
|
||||
$descr = str_replace('"', '', $descr);
|
||||
list($descr) = explode(' ', $descr);
|
||||
|
||||
$descr = 'Slot ' . $entry['snAgentCpuUtilSlotNum'] . ' ' . $descr;
|
||||
$descr = $descr . ' ['.$instance.']';
|
||||
|
||||
if (!strstr($descr, 'No') && !strstr($usage, 'No') && $descr != '')
|
||||
{
|
||||
discover_processor($valid['processor'], $device, $usage_oid, $index, 'ironware', $descr, $precision, $usage, $entPhysicalIndex);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
unset ($processors_array);
|
||||
|
||||
// EOF
|
39
includes/discovery/processors/hh3c-entity-ext-mib.inc.php
Normal file
39
includes/discovery/processors/hh3c-entity-ext-mib.inc.php
Normal file
@ -0,0 +1,39 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Observium
|
||||
*
|
||||
* This file is part of Observium.
|
||||
*
|
||||
* @package observium
|
||||
* @subpackage discovery
|
||||
* @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2019 Observium Limited
|
||||
*
|
||||
*/
|
||||
|
||||
// HH3C-ENTITY-EXT-MIB::hh3cEntityExtCpuUsage.30 = INTEGER: 16
|
||||
// HH3C-ENTITY-EXT-MIB::hh3cEntityExtCpuUsage.36 = INTEGER: 5
|
||||
// HH3C-ENTITY-EXT-MIB::hh3cEntityExtCpuUsage.42 = INTEGER: 5
|
||||
// HH3C-ENTITY-EXT-MIB::hh3cEntityExtCpuUsage.48 = INTEGER: 12
|
||||
|
||||
$oids = array('hh3cEntityExtCpuUsage', 'entPhysicalName');
|
||||
$processors_array = array();
|
||||
foreach ($oids as $oid)
|
||||
{
|
||||
$processors_array = snmpwalk_cache_oid($device, $oid, $processors_array, 'ENTITY-MIB:HH3C-ENTITY-EXT-MIB');
|
||||
}
|
||||
|
||||
foreach ($processors_array as $index => $entry)
|
||||
{
|
||||
if ($entry['hh3cEntityExtCpuUsage'] != 0)
|
||||
{
|
||||
$oid = ".1.3.6.1.4.1.25506.2.6.1.1.1.1.6.$index";
|
||||
$descr = $entry['entPhysicalName'];
|
||||
$usage = $entry['hh3cEntityExtCpuUsage'];
|
||||
discover_processor($valid['processor'], $device, $oid, $index, 'hh3c-fixed', $descr, 1, $usage);
|
||||
}
|
||||
}
|
||||
|
||||
unset ($processors_array);
|
||||
|
||||
// EOF
|
77
includes/discovery/processors/host-resources-mib.inc.php
Normal file
77
includes/discovery/processors/host-resources-mib.inc.php
Normal file
@ -0,0 +1,77 @@
|
||||
<?php
|
||||
/**
|
||||
* Observium
|
||||
*
|
||||
* This file is part of Observium.
|
||||
*
|
||||
* @package observium
|
||||
* @subpackage discovery
|
||||
* @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2021 Observium Limited
|
||||
*
|
||||
*/
|
||||
|
||||
$hrDevice_oids = array('hrDevice', 'hrProcessorLoad');
|
||||
$hrDevice_array = [];
|
||||
foreach ($hrDevice_oids as $oid) {
|
||||
$hrDevice_array = snmpwalk_cache_oid($device, $oid, $hrDevice_array, 'HOST-RESOURCES-MIB:HOST-RESOURCES-TYPES');
|
||||
}
|
||||
|
||||
$hr_cpus = 0;
|
||||
$hr_total = 0;
|
||||
|
||||
if (safe_count($hrDevice_array)) {
|
||||
foreach ($hrDevice_array as $index => $entry) {
|
||||
if (!is_numeric($entry['hrProcessorLoad'])) { continue; }
|
||||
|
||||
if (!isset($entry['hrDeviceType'])) {
|
||||
$entry['hrDeviceType'] = 'hrDeviceProcessor';
|
||||
$entry['hrDeviceIndex'] = $index;
|
||||
} elseif ($entry['hrDeviceType'] === 'hrDeviceOther' &&
|
||||
preg_match('/^cpu\d+:/', $entry['hrDeviceDescr'])) {
|
||||
// Workaround bsnmpd reporting CPUs as hrDeviceOther (FY FreeBSD.)
|
||||
$entry['hrDeviceType'] = 'hrDeviceProcessor';
|
||||
}
|
||||
|
||||
if ($entry['hrDeviceType'] === 'hrDeviceProcessor') {
|
||||
$hrDeviceIndex = $entry['hrDeviceIndex'];
|
||||
|
||||
$usage_oid = ".1.3.6.1.2.1.25.3.3.1.2.$index";
|
||||
$usage = $entry['hrProcessorLoad'];
|
||||
|
||||
// What is this for? I have forgotten. What has : in its hrDeviceDescr?
|
||||
// Set description to that found in hrDeviceDescr, first part only if containing a :
|
||||
$descr_array = explode(':',$entry['hrDeviceDescr']);
|
||||
if ($descr_array['1']) { $descr = $descr_array['1']; } else { $descr = $descr_array['0']; }
|
||||
|
||||
// Workaround to set fake description for Mikrotik and other who don't populate hrDeviceDescr
|
||||
if (empty($entry['hrDeviceDescr'])) { $descr = 'Processor'; }
|
||||
|
||||
$descr = rewrite_entity_name($descr);
|
||||
|
||||
if ($device['os'] === 'arista_eos' && $index == 1) { continue; }
|
||||
|
||||
if ($descr !== 'An electronic chip that makes the computer work.') {
|
||||
discover_processor($valid['processor'], $device, $usage_oid, $index, 'hr', $descr, 1, $usage, NULL, $hrDeviceIndex);
|
||||
$hr_cpus++;
|
||||
$hr_total += $usage;
|
||||
}
|
||||
unset($old_rrd,$new_rrd,$descr,$entry,$usage_oid,$index,$usage,$hrDeviceIndex,$descr_array);
|
||||
}
|
||||
unset($entry);
|
||||
}
|
||||
|
||||
if ($hr_cpus) {
|
||||
$hr_total = $hr_total / $hr_cpus;
|
||||
discover_processor($valid['processor'], $device, 1, 1, 'hr-average', 'Average', 1, $usage);
|
||||
//$ucd_count = @dbFetchCell("SELECT COUNT(*) FROM `processors` WHERE `device_id` = ? AND `processor_type` = 'ucd-old'", array($device['device_id']));
|
||||
//if ($ucd_count)
|
||||
if (dbExist('processors', '`device_id` = ? AND `processor_type` = ?', array($device['device_id'], 'ucd-old'))) {
|
||||
$GLOBALS['module_stats']['processors']['deleted']++; //echo('-');
|
||||
dbDelete('processors', "`device_id` = ? AND `processor_type` = ?", array($device['device_id'], 'ucd-old')); // Heh, this is because UCD-SNMP-MIB run earlier
|
||||
}
|
||||
}
|
||||
|
||||
unset($hrDevice_oids, $hrDevice_array, $oid);
|
||||
}
|
||||
|
||||
// EOF
|
39
includes/discovery/processors/hpn-icf-entity-ext-mib.inc.php
Normal file
39
includes/discovery/processors/hpn-icf-entity-ext-mib.inc.php
Normal file
@ -0,0 +1,39 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Observium
|
||||
*
|
||||
* This file is part of Observium.
|
||||
*
|
||||
* @package observium
|
||||
* @subpackage discovery
|
||||
* @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2019 Observium Limited
|
||||
*
|
||||
*/
|
||||
|
||||
// HPN-ICF-ENTITY-EXT-MIB::hpnicfEntityExtCpuUsage.30 = INTEGER: 16
|
||||
// HPN-ICF-ENTITY-EXT-MIB::hpnicfEntityExtCpuUsage.36 = INTEGER: 5
|
||||
// HPN-ICF-ENTITY-EXT-MIB::hpnicfEntityExtCpuUsage.42 = INTEGER: 5
|
||||
// HPN-ICF-ENTITY-EXT-MIB::hpnicfEntityExtCpuUsage.48 = INTEGER: 12
|
||||
|
||||
$oids = array('hpnicfEntityExtCpuUsage', 'entPhysicalName');
|
||||
$processors_array = array();
|
||||
foreach ($oids as $oid)
|
||||
{
|
||||
$processors_array = snmpwalk_cache_oid($device, $oid, $processors_array, 'ENTITY-MIB:HPN-ICF-ENTITY-EXT-MIB');
|
||||
}
|
||||
|
||||
foreach ($processors_array as $index => $entry)
|
||||
{
|
||||
if ($entry['hpnicfEntityExtCpuUsage'] != 0)
|
||||
{
|
||||
$oid = ".1.3.6.1.4.1.11.2.14.11.15.2.6.1.1.1.1.6.$index";
|
||||
$descr = $entry['entPhysicalName'];
|
||||
$usage = $entry['hpnicfEntityExtCpuUsage'];
|
||||
discover_processor($valid['processor'], $device, $oid, $index, 'hh3c-fixed', $descr, 1, $usage);
|
||||
}
|
||||
}
|
||||
|
||||
unset ($processors_array);
|
||||
|
||||
// EOF
|
@ -0,0 +1,50 @@
|
||||
<?php
|
||||
/**
|
||||
* Observium
|
||||
*
|
||||
* This file is part of Observium.
|
||||
*
|
||||
* @package observium
|
||||
* @subpackage discovery
|
||||
* @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2022 Observium Limited
|
||||
*
|
||||
*/
|
||||
|
||||
$processors_array = snmpwalk_cache_oid($device, 'hwEntityCpuUsage', [], 'HUAWEI-ENTITY-EXTENT-MIB');
|
||||
|
||||
if (!safe_empty($processors_array)) {
|
||||
$processors_array = snmpwalk_cache_oid($device, 'hwEntityCpuUsageThreshold', $processors_array, 'HUAWEI-ENTITY-EXTENT-MIB');
|
||||
$processors_array = snmpwalk_cache_oid($device, 'hwEntityMemSize', $processors_array, 'HUAWEI-ENTITY-EXTENT-MIB');
|
||||
$processors_array = snmpwalk_cache_oid($device, 'entPhysicalName', $processors_array, 'ENTITY-MIB');
|
||||
|
||||
foreach ($processors_array as $index => $entry) {
|
||||
if (!is_numeric($entry['hwEntityCpuUsage'])) {
|
||||
print_debug("Entity is not support CPU usage:");
|
||||
print_debug_vars($entry);
|
||||
|
||||
continue;
|
||||
}
|
||||
if (isset($entry['hwEntityMemSize'])) {
|
||||
// not all platforms have hwEntityMemSize.. what tf
|
||||
if ($entry['hwEntityMemSize'] == 0) {
|
||||
print_debug("Entity is not support CPU usage:");
|
||||
print_debug_vars($entry);
|
||||
continue;
|
||||
}
|
||||
} elseif (isset($entry['hwEntityCpuUsageThreshold']) && $entry['hwEntityCpuUsageThreshold'] == 0 && $entry['hwEntityCpuUsage'] == 0) {
|
||||
print_debug("Entity is not support CPU usage:");
|
||||
print_debug_vars($entry);
|
||||
continue;
|
||||
}
|
||||
print_debug($index . ' ' . $entry['entPhysicalName'] . ' -> ' . $entry['hwEntityCpuUsage'] . ' -> ' . $entry['hwEntityMemSize']);
|
||||
$usage_oid = ".1.3.6.1.4.1.2011.5.25.31.1.1.1.1.5.$index";
|
||||
$descr = rewrite_entity_name($entry['entPhysicalName']);
|
||||
if (!safe_empty($descr) && !str_contains($descr, 'No')) {
|
||||
discover_processor($valid['processor'], $device, $usage_oid, $index, 'vrp', $descr, 1, $entry['hwEntityCpuUsage']);
|
||||
}
|
||||
} // End Foreach
|
||||
} // End if array
|
||||
|
||||
unset($processors_array);
|
||||
|
||||
// EOF
|
52
includes/discovery/processors/isilon-mib.inc.php
Normal file
52
includes/discovery/processors/isilon-mib.inc.php
Normal file
@ -0,0 +1,52 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Observium
|
||||
*
|
||||
* This file is part of Observium.
|
||||
*
|
||||
* @package observium
|
||||
* @subpackage discovery
|
||||
* @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2019 Observium Limited
|
||||
*
|
||||
*/
|
||||
|
||||
//ISILON-MIB::nodeCPUUser.0 = Gauge32: 25
|
||||
//ISILON-MIB::nodeCPUNice.0 = Gauge32: 0
|
||||
//ISILON-MIB::nodeCPUSystem.0 = Gauge32: 53
|
||||
//ISILON-MIB::nodeCPUInterrupt.0 = Gauge32: 13
|
||||
//ISILON-MIB::nodeCPUIdle.0 = Gauge32: 909
|
||||
//ISILON-MIB::nodePerCPUUser.1 = Gauge32: 6
|
||||
//ISILON-MIB::nodePerCPUUser.2 = Gauge32: 1
|
||||
//ISILON-MIB::nodePerCPUNice.1 = Gauge32: 0
|
||||
//ISILON-MIB::nodePerCPUNice.2 = Gauge32: 0
|
||||
//ISILON-MIB::nodePerCPUSystem.1 = Gauge32: 25
|
||||
//ISILON-MIB::nodePerCPUSystem.2 = Gauge32: 24
|
||||
//ISILON-MIB::nodePerCPUInterrupt.1 = Gauge32: 7
|
||||
//ISILON-MIB::nodePerCPUInterrupt.2 = Gauge32: 3
|
||||
//ISILON-MIB::nodePerCPUIdle.1 = Gauge32: 962
|
||||
//ISILON-MIB::nodePerCPUIdle.2 = Gauge32: 972
|
||||
|
||||
// Skip this processors discovery if HOST-RESOURCES-MIB discovered and exist
|
||||
if (isset($valid['processor']['hr']) || isset($valid['processor']['hr-average'])) { return; }
|
||||
|
||||
$processors_array = snmpwalk_cache_oid($device, 'nodePerCPUIdle', array(), 'ISILON-MIB');
|
||||
//print_vars($processors_array);
|
||||
|
||||
$processors_count = count($processors_array);
|
||||
foreach ($processors_array as $index => $entry)
|
||||
{
|
||||
$dot_index = ".{$index}";
|
||||
$descr = 'Processor ' . strval($index - 1);
|
||||
$oid_table = 'nodeCPUPerfTable';
|
||||
$oid_name = 'nodePerCPUIdle';
|
||||
$oid_num = ".1.3.6.1.4.1.12124.2.2.3.10.1.5{$dot_index}";
|
||||
$usage = $entry[$oid_name];
|
||||
$idle = 1;
|
||||
|
||||
discover_processor($valid['processor'], $device, $oid_num, $oid_table . $dot_index, $oid_name, $descr, 10, $usage, NULL, NULL, $idle);
|
||||
}
|
||||
|
||||
unset($processors_array, $dot_index, $entry, $descr, $oid_table, $oid_name, $oid_num, $usage, $idle);
|
||||
|
||||
// EOF
|
37
includes/discovery/processors/juniper-mib.inc.php
Normal file
37
includes/discovery/processors/juniper-mib.inc.php
Normal file
@ -0,0 +1,37 @@
|
||||
<?php
|
||||
/**
|
||||
* Observium
|
||||
*
|
||||
* This file is part of Observium.
|
||||
*
|
||||
* @package observium
|
||||
* @subpackage discovery
|
||||
* @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2022 Observium Limited
|
||||
*
|
||||
*/
|
||||
|
||||
$processors_array = snmpwalk_cache_oid($device, 'jnxOperatingCPU', [], $mib);
|
||||
|
||||
if (!safe_empty($processors_array)) {
|
||||
$processors_array = snmpwalk_cache_oid($device, 'jnxOperatingDRAMSize', $processors_array, $mib);
|
||||
$processors_array = snmpwalk_cache_oid($device, 'jnxOperatingDescr', $processors_array, $mib);
|
||||
|
||||
foreach ($processors_array as $index => $entry) {
|
||||
if (str_contains_array($entry['jnxOperatingDescr'], [ 'Routing Engine', 'FPC']) ||
|
||||
$entry['jnxOperatingDRAMSize'] > 0) {
|
||||
|
||||
if (!is_numeric($entry['jnxOperatingCPU']) ||
|
||||
str_icontains_array($entry['jnxOperatingDescr'], [ 'sensor', 'fan', 'pcmcia', 'no' ])) { continue; }
|
||||
|
||||
$oid = ".1.3.6.1.4.1.2636.3.1.13.1.8.$index";
|
||||
$descr = $entry['jnxOperatingDescr'];
|
||||
$usage = $entry['jnxOperatingCPU'];
|
||||
|
||||
discover_processor($valid['processor'], $device, $oid, $index, 'junos', $descr, 1, $usage);
|
||||
} // End if checks
|
||||
} // End Foreach
|
||||
} // End if array
|
||||
|
||||
unset($processors_array);
|
||||
|
||||
// EOF
|
@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Observium
|
||||
*
|
||||
* This file is part of Observium.
|
||||
*
|
||||
* @package observium
|
||||
* @subpackage discovery
|
||||
* @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2019 Observium Limited
|
||||
*
|
||||
*/
|
||||
|
||||
$srx_spu_array = snmpwalk_cache_oid($device, 'jnxJsSPUMonitoringNodeDescr', array(), $mib);
|
||||
$srx_spu_array = snmpwalk_cache_oid($device, 'jnxJsSPUMonitoringFPCIndex', $srx_spu_array, $mib);
|
||||
$srx_spu_array = snmpwalk_cache_oid($device, 'jnxJsSPUMonitoringCPUUsage', $srx_spu_array, $mib);
|
||||
|
||||
foreach ($srx_spu_array as $index => $entry)
|
||||
{
|
||||
$oid = ".1.3.6.1.4.1.2636.3.39.1.12.1.1.1.4.$index"; // node0 FPC: SRX3k SPC
|
||||
$descr = ($entry['jnxJsSPUMonitoringNodeDescr'] == 'single' ? '' : $entry['jnxJsSPUMonitoringNodeDescr'] . ' ') . 'SPC slot ' . $entry['jnxJsSPUMonitoringFPCIndex'];
|
||||
$usage = $entry['jnxJsSPUMonitoringCPUUsage'];
|
||||
|
||||
discover_processor($valid['processor'], $device, $oid, $index, 'junos', $descr, 1, $usage);
|
||||
}
|
||||
|
||||
unset ($srx_spu_array, $oid, $descr, $usage, $index, $entry);
|
||||
|
||||
// EOF
|
35
includes/discovery/processors/juniper-system-mib.inc.php
Normal file
35
includes/discovery/processors/juniper-system-mib.inc.php
Normal file
@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Observium
|
||||
*
|
||||
* This file is part of Observium.
|
||||
*
|
||||
* @package observium
|
||||
* @subpackage discovery
|
||||
* @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2019 Observium Limited
|
||||
*
|
||||
*/
|
||||
|
||||
$processors_array = snmpwalk_cache_double_oid($device, 'juniSystemModule', array(), 'Juniper-System-MIB');
|
||||
|
||||
foreach ($processors_array as $index => $entry)
|
||||
{
|
||||
if ($entry['juniSystemModuleCpuUtilPct'] && $entry['juniSystemModuleCpuUtilPct'] != -1)
|
||||
{
|
||||
$entPhysicalIndex = $entry['juniSystemModulePhysicalIndex'];
|
||||
$usage_oid = ".1.3.6.1.4.1.4874.2.2.2.1.3.5.1.3.$index";
|
||||
$descr_oid = ".1.3.6.1.4.1.4874.2.2.2.1.3.5.1.6.$index";
|
||||
$descr = $entry['juniSystemModuleDescr'];
|
||||
$usage = $entry['juniSystemModuleCpuFiveMinAvgPct'];
|
||||
|
||||
if (!strstr($descr, 'No') && !strstr($usage, 'No') && $descr != '')
|
||||
{
|
||||
discover_processor($valid['processor'], $device, $usage_oid, $index, 'junose', $descr, 1, $usage, $entPhysicalIndex);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
unset ($processors_array);
|
||||
|
||||
// EOF
|
35
includes/discovery/processors/ns-root-mib.inc.php
Normal file
35
includes/discovery/processors/ns-root-mib.inc.php
Normal file
@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Observium
|
||||
*
|
||||
* This file is part of Observium.
|
||||
*
|
||||
* @package observium
|
||||
* @subpackage discovery
|
||||
* @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2019 Observium Limited
|
||||
*
|
||||
*/
|
||||
|
||||
#root@alpha:/home/observium/dev# snmpwalk -v2c -c // -M mibs -m +NS-ROOT-MIB netscaler.test nsCPUTable
|
||||
#NS-ROOT-MIB::nsCPUname."cpu0" = STRING: "cpu0"
|
||||
#NS-ROOT-MIB::nsCPUusage."cpu0" = Gauge32: 0
|
||||
|
||||
if (safe_empty($nsaarray)) {
|
||||
$nsarray = snmpwalk_cache_oid($device, 'nsCPUTable', [], $mib);
|
||||
}
|
||||
|
||||
foreach ($nsarray as $descr => $data) {
|
||||
|
||||
$current = $data['nsCPUusage'];
|
||||
|
||||
$oid = '.1.3.6.1.4.1.5951.4.1.1.41.6.1.2.' . snmp_string_to_oid($descr);
|
||||
$descr = $data['nsCPUname'];
|
||||
|
||||
// FIXME, when will converted to definition-based, note that here used "named" index instead numeric
|
||||
discover_processor($valid['processor'], $device, $oid, $descr, 'netscaler', $descr, 1, $current);
|
||||
}
|
||||
|
||||
unset($nsarray, $oid, $descr, $current);
|
||||
|
||||
// EOF
|
27
includes/discovery/processors/smartnode-mib.inc.php
Normal file
27
includes/discovery/processors/smartnode-mib.inc.php
Normal file
@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Observium
|
||||
*
|
||||
* This file is part of Observium.
|
||||
*
|
||||
* @package observium
|
||||
* @subpackage discovery
|
||||
* @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2019 Observium Limited
|
||||
*
|
||||
*/
|
||||
|
||||
$processors_array = snmpwalk_cache_oid($device, 'cpu', array(), $mib);
|
||||
|
||||
foreach ($processors_array as $index => $entry)
|
||||
{
|
||||
$descr = $entry['cpuDescr'];
|
||||
$oid = ".1.3.6.1.4.1.1768.100.70.10.2.1.3.$index";
|
||||
$usage = $entry['cpuWorkload5MinuteAverage'];
|
||||
|
||||
discover_processor($valid['processor'], $device, $oid, $index, 'smartnode', $descr, 1, $usage);
|
||||
}
|
||||
|
||||
unset ($processors_array);
|
||||
|
||||
// EOF
|
34
includes/discovery/processors/ucd-snmp-mib.inc.php
Normal file
34
includes/discovery/processors/ucd-snmp-mib.inc.php
Normal file
@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Observium
|
||||
*
|
||||
* This file is part of Observium.
|
||||
*
|
||||
* @package observium
|
||||
* @subpackage discovery
|
||||
* @author Adam Armstrong <adama@observium.org>
|
||||
* @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2019 Observium Limited
|
||||
*
|
||||
*/
|
||||
|
||||
// FIXME. UCD-CPU already polled by ucd-mib poller
|
||||
//$count_processors = dbFetchCell("SELECT COUNT(*) FROM `processors` WHERE `device_id` = ? AND `processor_type` != ?", array($device['device_id'], 'ucd-old'));
|
||||
|
||||
//if ($device['os_group'] == 'unix' && $count == 0)
|
||||
//if ($count_processors == 0)
|
||||
if (!dbExist('processors', '`device_id` = ? AND `processor_type` != ?', array($device['device_id'], 'ucd-old')))
|
||||
{
|
||||
//$system = snmp_get($device, 'ssCpuSystem.0', '-OvQ', $mib);
|
||||
//$user = snmp_get($device, 'ssCpuUser.0' , '-OvQ', $mib);
|
||||
//$idle = snmp_get($device, 'ssCpuIdle.0' , '-OvQ', $mib);
|
||||
$idle = snmp_get_oid($device, 'ssCpuIdle.0', $mib);
|
||||
|
||||
if (is_numeric($idle))
|
||||
{
|
||||
//$percent = $system + $user + $idle;
|
||||
discover_processor($valid['processor'], $device, 0, 0, 'ucd-old', 'CPU', 1, $idle, NULL, NULL, 1);
|
||||
}
|
||||
}
|
||||
|
||||
// EOF
|
26
includes/discovery/processors/wlsx-switch-mib.inc.php
Normal file
26
includes/discovery/processors/wlsx-switch-mib.inc.php
Normal file
@ -0,0 +1,26 @@
|
||||
<?php
|
||||
/**
|
||||
* Observium
|
||||
*
|
||||
* This file is part of Observium.
|
||||
*
|
||||
* @package observium
|
||||
* @subpackage discovery
|
||||
* @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2022 Observium Limited
|
||||
*
|
||||
*/
|
||||
|
||||
$processors_array = snmpwalk_cache_oid($device, 'wlsxSysXProcessorTable', [], $mib);
|
||||
|
||||
foreach ($processors_array as $index => $entry) {
|
||||
if (is_numeric($entry['sysXProcessorLoad']) && is_numeric($index)) {
|
||||
$descr = $entry['sysXProcessorDescr'];
|
||||
$usage = $entry['sysXProcessorLoad'];
|
||||
$oid = "1.3.6.1.4.1.14823.2.2.1.1.1.9.1.3.$index";
|
||||
discover_processor($valid['processor'], $device, $oid, $index, 'WLSX-SWITCH-MIB', $descr, 1, $usage);
|
||||
}
|
||||
}
|
||||
|
||||
unset($processors_array, $index, $descr, $usage, $oid);
|
||||
|
||||
// EOF
|
@ -0,0 +1,41 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Observium
|
||||
*
|
||||
* This file is part of Observium.
|
||||
*
|
||||
* @package observium
|
||||
* @subpackage discovery
|
||||
* @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2019 Observium Limited
|
||||
*
|
||||
*/
|
||||
|
||||
// ZHONE-CARD-RESOURCES-MIB::cardRuntimeTable
|
||||
// ZHONE-CARD-RESOURCES-MIB::cardProcessorIdle.1.1 = INTEGER: 29
|
||||
// ZHONE-CARD-RESOURCES-MIB::cardProcessorUsage.1.1 = INTEGER: 71
|
||||
// ZHONE-CARD-RESOURCES-MIB::cardProcessorHighUsage.1.1 = INTEGER: 13
|
||||
// ZHONE-CARD-RESOURCES-MIB::cardProcessorServicesUsage.1.1 = INTEGER: 20
|
||||
// ZHONE-CARD-RESOURCES-MIB::cardProcessorFrameworkUsage.1.1 = INTEGER: 35
|
||||
// ZHONE-CARD-RESOURCES-MIB::cardProcessorLowUsage.1.1 = INTEGER: 2
|
||||
|
||||
$processors_array = snmpwalk_cache_oid($device, 'cardProcessorUsage', array(), $mib); // INDEX { zhoneShelfIndex, zhoneSlotIndex }
|
||||
$processors_count = count($processors_array);
|
||||
|
||||
foreach ($processors_array as $index => $entry)
|
||||
{
|
||||
$descr = 'Processor';
|
||||
if ($processors_count > 1)
|
||||
{
|
||||
list($zhoneShelfIndex, $zhoneSlotIndex) = explode('.', $index);
|
||||
$descr .= " - Shelf $zhoneShelfIndex, Slot $zhoneSlotIndex";
|
||||
}
|
||||
$oid_name = 'cardProcessorUsage';
|
||||
$oid_num = ".1.3.6.1.4.1.5504.3.3.3.1.5.$index";
|
||||
$type = 'ZHONE-CARD-RESOURCES-MIB-'.$oid_name;
|
||||
discover_processor($valid['processor'], $device, $oid_num, $index, $type, $descr, 1, $entry[$oid_name]);
|
||||
}
|
||||
|
||||
unset($processors_array);
|
||||
|
||||
// EOF
|
44
includes/discovery/processors/zxr10-mib.inc.php
Normal file
44
includes/discovery/processors/zxr10-mib.inc.php
Normal file
@ -0,0 +1,44 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Observium
|
||||
*
|
||||
* This file is part of Observium.
|
||||
*
|
||||
* @package observium
|
||||
* @subpackage discovery
|
||||
* @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2019 Observium Limited
|
||||
*
|
||||
*/
|
||||
|
||||
$processors_array = snmpwalk_cache_oid($device, 'zxr10SystemUnitTable', array(), $mib);
|
||||
$processors_count = count($processors_array);
|
||||
//print_vars($processors_array);
|
||||
|
||||
foreach ($processors_array as $index => $entry)
|
||||
{
|
||||
if ($entry['zxr10SystemUnitRunStatus'] == 'down') { continue; }
|
||||
|
||||
$descr = 'CPU';
|
||||
if ($processors_count > 1)
|
||||
{
|
||||
$descr = 'Unit ' . $index . ' ' . $descr;
|
||||
}
|
||||
if (is_numeric($entry['zxr10SystemCpuUtility5m']))
|
||||
{
|
||||
$oid_name = 'zxr10SystemCpuUtility5m';
|
||||
$oid_num = '.1.3.6.1.4.1.3902.3.3.1.1.12.'.$index;
|
||||
} else {
|
||||
$oid_name = 'zxr10SystemCpuUtility2m';
|
||||
$oid_num = '.1.3.6.1.4.1.3902.3.3.1.1.5.'.$index;
|
||||
}
|
||||
|
||||
$type = $mib . '-' . $oid_name;
|
||||
$usage = $entry[$oid_name];
|
||||
|
||||
discover_processor($valid['processor'], $device, $oid_num, $index, $type, $descr, 1, $usage);
|
||||
}
|
||||
|
||||
unset($processors_array);
|
||||
|
||||
// EOF
|
Reference in New Issue
Block a user