mirror of
https://github.com/stylersnico/librenms.git
synced 2026-08-01 00:24:21 +02:00
Merge branch 'master' of github.com:laf/librenms into issue-laf-110-new
Conflicts: includes/defaults.inc.php
This commit is contained in:
@@ -34,6 +34,8 @@ function poll_sensor($device, $class, $unit)
|
||||
sleep(1); # Give the TME some time to reset
|
||||
}
|
||||
}
|
||||
} elseif ($class == "state") {
|
||||
$sensor_value = trim(str_replace("\"", "", snmp_walk($device, $sensor['sensor_oid'], "-Oevq", "SNMPv2-MIB")));
|
||||
} else {
|
||||
if ($sensor['sensor_type'] == 'apc') {
|
||||
$sensor_value = trim(str_replace("\"", "", snmp_walk($device, $sensor['sensor_oid'], "-OUqnv", "SNMPv2-MIB:PowerNet-MIB$mib")));
|
||||
@@ -266,7 +268,7 @@ function poll_mib_def($device, $mib_name_table, $mib_subdir, $mib_oids, $mib_gra
|
||||
|
||||
echo("This is mag_poll_mib_def Processing\n");
|
||||
$mib = NULL;
|
||||
|
||||
|
||||
if (stristr($mib_name_table, "UBNT")) {
|
||||
list($mib,) = explode(":", $mib_name_table, 2);
|
||||
//$mib_dirs = mib_dirs($mib_subdir);
|
||||
@@ -285,7 +287,7 @@ function poll_mib_def($device, $mib_name_table, $mib_subdir, $mib_oids, $mib_gra
|
||||
$oiddsdesc = $param[2];
|
||||
$oiddstype = $param[3];
|
||||
$oiddsopts = $param[4];
|
||||
|
||||
|
||||
if (strlen($oiddsname) > 19) { $oiddsname = truncate($oiddsname, 19, ''); }
|
||||
|
||||
if (empty($oiddsopts)) {
|
||||
@@ -300,7 +302,7 @@ function poll_mib_def($device, $mib_name_table, $mib_subdir, $mib_oids, $mib_gra
|
||||
} else {
|
||||
$fulloid = $oid;
|
||||
}
|
||||
|
||||
|
||||
// Add to oid GET list
|
||||
$oidglist[] = $fulloid;
|
||||
|
||||
@@ -308,7 +310,7 @@ function poll_mib_def($device, $mib_name_table, $mib_subdir, $mib_oids, $mib_gra
|
||||
|
||||
// Implde for LibreNMS Version
|
||||
$oidilist = implode(" ",$oidglist);
|
||||
|
||||
|
||||
$snmpdata = snmp_get_multi($device, $oidilist, "-OQUs", $mib);
|
||||
if (isset($GLOBALS['exec_status']['exitcode']) && $GLOBALS['exec_status']['exitcode'] !== 0)
|
||||
{
|
||||
@@ -328,7 +330,7 @@ function poll_mib_def($device, $mib_name_table, $mib_subdir, $mib_oids, $mib_gra
|
||||
}
|
||||
}
|
||||
|
||||
$rrdfilename = $config['rrd_dir']."/".$device['hostname']."/".$rrd_file;
|
||||
$rrdfilename = $config['rrd_dir']."/".$device['hostname']."/".$rrd_file;
|
||||
|
||||
if (!is_file($rrdfilename))
|
||||
{
|
||||
@@ -340,7 +342,7 @@ function poll_mib_def($device, $mib_name_table, $mib_subdir, $mib_oids, $mib_gra
|
||||
{
|
||||
$graphs[$graphtoenable] = TRUE;
|
||||
}
|
||||
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user