mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
add agent sensor capacity, hddtemp script in agent-local as demo, possibly needs a little more work
git-svn-id: http://www.observium.org/svn/observer/trunk@3213 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
@@ -116,7 +116,7 @@ function discover_sensor(&$valid, $class, $device, $oid, $index, $type, $descr,
|
||||
{
|
||||
global $config, $debug;
|
||||
|
||||
if ($debug) { echo("Discover sensor: $oid, $index, $type, $descr, $precision, $entPhysicalIndex\n"); }
|
||||
if ($debug) { echo("Discover sensor: $oid, $index, $type, $descr, $poller_type, $precision, $entPhysicalIndex\n"); }
|
||||
|
||||
if (is_null($low_warn_limit) || !is_null($warn_limit))
|
||||
{
|
||||
@@ -314,9 +314,9 @@ function sensor_limit($class, $current)
|
||||
return $limit;
|
||||
}
|
||||
|
||||
function check_valid_sensors($device, $class, $valid)
|
||||
function check_valid_sensors($device, $class, $valid, $poller_type = 'snmp')
|
||||
{
|
||||
$entries = dbFetchRows("SELECT * FROM sensors AS S, devices AS D WHERE S.sensor_class=? AND S.device_id = D.device_id AND D.device_id = ?", array($class, $device['device_id']));
|
||||
$entries = dbFetchRows("SELECT * FROM sensors AS S, devices AS D WHERE S.sensor_class=? AND S.device_id = D.device_id AND D.device_id = ? AND S.poller_type = ?", array($class, $device['device_id'], $poller_type));
|
||||
|
||||
if (count($entries))
|
||||
{
|
||||
|
Reference in New Issue
Block a user