<?php // JUNOSe Processors if ($device['os'] == "junose") { echo "JUNOSe : "; $processors_array = snmpwalk_cache_double_oid($device, "juniSystemModule", $processors_array, "Juniper-System-MIB", $config['install_dir'] . "/mibs/junose"); if ($debug) { print_r($processors_array); } 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, NULL); } } } } // End JUNOSe Processors unset($processors_array);
<?php // JUNOSe Processors if ($device['os'] == 'junose') { echo 'JUNOSe : '; $processors_array = snmpwalk_cache_double_oid($device, 'juniSystemModule', $processors_array, 'Juniper-System-MIB', $config['install_dir'] . '/mibs/junose'); if ($debug) { print_r($processors_array); } 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, null); } } } } //end if unset($processors_array);
<?php // JUNOSe Processors if ($device['os'] == "junose") { echo "JUNOSe : "; $processors_array = snmpwalk_cache_double_oid($device, "juniSystemModule", $processors_array, "Juniper-System-MIB", mib_dirs('junose')); if ($debug) { print_r($processors_array); } 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, NULL); } } } } // End JUNOSe Processors unset($processors_array);
<?php /* * LibreNMS * * Copyright (c) 2014 Neil Lathwood <https://github.com/laf/ fua http://www.lathwood.co.uk> * * This program is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the * Free Software Foundation, either version 3 of the License, or (at your * option) any later version. Please see LICENSE.txt at the top level of * the source code distribution for details. */ if ($device['os_group'] == 'cisco' && $device['os'] == 'asa' && $device['type'] == 'firewall') { $oid_list = 'cfwConnectionStatValue.protoIp.currentInUse'; $temp_data = snmpwalk_cache_double_oid($device, $oid_list, array(), 'CISCO-FIREWALL-MIB'); foreach ($temp_data as $oid => $result) { $oid = substr(strchr($oid, '.'), 1); $data[$oid]['data'] = $result['cfwConnectionStatValue']; $asa_db = dbFetchCell('SELECT `ciscoASA_id` FROM `ciscoASA` WHERE `device_id` = ? AND `oid` = ?', array($device['device_id'], $oid)); if (!is_numeric($asa_db)) { $asa_db = dbInsert(array('device_id' => $device['device_id'], 'oid' => $oid, 'data' => $result['cfwConnectionStatValue']), 'ciscoASA'); } else { $asa_db = dbUpdate(array('data' => $result['cfwConnectionStatValue']), 'ciscoASA', 'device_id=?', array($device['device_id'])); } $data[$oid]['db_id'] = $asa_db; } if ($data['currentInUse']) { $rrd_def = 'DS:connections:GAUGE:600:0:U'; $fields = array('connections' => $data['currentInUse']['data']); $tags = compact('rrd_def');
<?php /** * Observium * * This file is part of Observium. * * @package observium * @subpackage discovery * @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2016 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