From 46b0084741267d9749eb9c97b6e93e926d01f11a Mon Sep 17 00:00:00 2001 From: einhirn Date: Mon, 15 Jun 2015 16:48:59 +0200 Subject: [PATCH] Added support for CPU graphing of Alcatel-Lucent AOS 7 devices. Removed unused line from code. --- includes/discovery/processors/aos-device.inc.php | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/includes/discovery/processors/aos-device.inc.php b/includes/discovery/processors/aos-device.inc.php index ea058e590..177f99a10 100644 --- a/includes/discovery/processors/aos-device.inc.php +++ b/includes/discovery/processors/aos-device.inc.php @@ -13,8 +13,19 @@ if ($device['os'] == "aos") { discover_processor($valid['processor'], $device, "1.3.6.1.4.1.6486.800.1.2.1.16.1.1.1.13.0", "0", "aos-system", $descr, "1", $usage, NULL, NULL); } + else + { + // AOS7 devices use a different OID for CPU load. Not all Switches have + // healthModuleCpuLatest so we use healthModuleCpu1MinAvg which makes no + // difference for a 5 min. polling interval. + // Note: This OID shows (a) the CPU load of a single switch or (b) the + // average CPU load of all CPUs in a stack of switches. + $usage = snmp_get($device, "1.3.6.1.4.1.6486.801.1.2.1.16.1.1.1.1.1.11.0", "-OQUvs", NULL, NULL); + if (is_numeric($usage)) + { + discover_processor($valid['processor'], $device, "1.3.6.1.4.1.6486.801.1.2.1.16.1.1.1.1.1.11.0", "0", "aos-system", $descr, "1", $usage, NULL, NULL); + } + } } -unset ($processors_array); - ?>