mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
fix: Fix can't find CPQHOST-MIB (#8024)
This commit is contained in:
Tony Murray
committed by
Neil Lathwood
parent
91cd338c35
commit
4ffdbe0e6a
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
$ilo_storage = snmpwalk_group($device, 'cpqHoFileSysEntry', 'CPQHOST-MIB');
|
||||
$ilo_storage = snmpwalk_group($device, 'cpqHoFileSysEntry', 'CPQHOST-MIB', 1, array(), 'hp');
|
||||
$units = 1024*1024;
|
||||
|
||||
if (is_array($ilo_storage)) {
|
||||
|
@ -583,11 +583,12 @@ function snmpwalk_cache_triple_oid($device, $oid, $array, $mib = null, $mibdir =
|
||||
* @param string $mib The MIB to use
|
||||
* @param int $depth how many indexes to group
|
||||
* @param array $array optionally insert the entries into an existing array (helpful for grouping multiple walks)
|
||||
* @param string $mibdir custom mib dir to search for mib
|
||||
* @return array grouped array of data
|
||||
*/
|
||||
function snmpwalk_group($device, $oid, $mib = '', $depth = 1, $array = array())
|
||||
function snmpwalk_group($device, $oid, $mib = '', $depth = 1, $array = array(), $mibdir = null)
|
||||
{
|
||||
$cmd = gen_snmpwalk_cmd($device, $oid, '-OQUsetX', $mib);
|
||||
$cmd = gen_snmpwalk_cmd($device, $oid, '-OQUsetX', $mib, $mibdir);
|
||||
$data = rtrim(external_exec($cmd));
|
||||
|
||||
$line = strtok($data, "\n");
|
||||
|
Reference in New Issue
Block a user