Merge branch 'master' of github.com:laf/librenms into issue-laf-110-new

Conflicts:
	includes/defaults.inc.php
This commit is contained in:
laf
2015-05-25 18:06:49 +01:00
189 changed files with 106921 additions and 56791 deletions
+8 -6
View File
@@ -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;
}