1<?php 2 3/** 4 * Observium 5 * 6 * This file is part of Observium. 7 * 8 * @package observium 9 * @subpackage discovery 10 * @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2019 Observium Limited 11 * 12 */ 13 14//ISILON-MIB::nodeCPUUser.0 = Gauge32: 25 15//ISILON-MIB::nodeCPUNice.0 = Gauge32: 0 16//ISILON-MIB::nodeCPUSystem.0 = Gauge32: 53 17//ISILON-MIB::nodeCPUInterrupt.0 = Gauge32: 13 18//ISILON-MIB::nodeCPUIdle.0 = Gauge32: 909 19//ISILON-MIB::nodePerCPUUser.1 = Gauge32: 6 20//ISILON-MIB::nodePerCPUUser.2 = Gauge32: 1 21//ISILON-MIB::nodePerCPUNice.1 = Gauge32: 0 22//ISILON-MIB::nodePerCPUNice.2 = Gauge32: 0 23//ISILON-MIB::nodePerCPUSystem.1 = Gauge32: 25 24//ISILON-MIB::nodePerCPUSystem.2 = Gauge32: 24 25//ISILON-MIB::nodePerCPUInterrupt.1 = Gauge32: 7 26//ISILON-MIB::nodePerCPUInterrupt.2 = Gauge32: 3 27//ISILON-MIB::nodePerCPUIdle.1 = Gauge32: 962 28//ISILON-MIB::nodePerCPUIdle.2 = Gauge32: 972 29 30// Skip this processors discovery if HOST-RESOURCES-MIB discovered and exist 31if (isset($valid['processor']['hr']) || isset($valid['processor']['hr-average'])) { return; } 32 33$processors_array = snmpwalk_cache_multi_oid($device, 'nodePerCPUIdle', array(), 'ISILON-MIB'); 34//print_vars($processors_array); 35 36$processors_count = count($processors_array); 37foreach ($processors_array as $index => $entry) 38{ 39 $dot_index = ".{$index}"; 40 $descr = 'Processor ' . strval($index - 1); 41 $oid_table = 'nodeCPUPerfTable'; 42 $oid_name = 'nodePerCPUIdle'; 43 $oid_num = ".1.3.6.1.4.1.12124.2.2.3.10.1.5{$dot_index}"; 44 $usage = $entry[$oid_name]; 45 $idle = 1; 46 47 discover_processor($valid['processor'], $device, $oid_num, $oid_table . $dot_index, $oid_name, $descr, 10, $usage, NULL, NULL, $idle); 48} 49 50unset($processors_array, $dot_index, $entry, $descr, $oid_table, $oid_name, $oid_num, $usage, $idle); 51 52// EOF 53