2010-07-11 15:31:48 +00:00
|
|
|
<?php
|
|
|
|
|
2011-03-15 09:57:13 +00:00
|
|
|
if ($device['os'] == "apc")
|
2010-07-11 15:31:48 +00:00
|
|
|
{
|
2010-07-11 23:49:26 +00:00
|
|
|
$oids = snmp_get($device, "1.3.6.1.4.1.318.1.1.1.2.2.2.0", "-OsqnU", "");
|
|
|
|
if ($debug) { echo($oids."\n"); }
|
|
|
|
if ($oids)
|
2010-07-11 15:31:48 +00:00
|
|
|
{
|
|
|
|
echo("APC UPS Internal ");
|
2010-07-11 23:49:26 +00:00
|
|
|
list($oid,$current) = explode(' ',$oids);
|
2010-07-11 15:31:48 +00:00
|
|
|
$precision = 1;
|
|
|
|
$type = "apc";
|
|
|
|
$index = 0;
|
|
|
|
$descr = "Internal Temperature";
|
2011-03-15 09:57:13 +00:00
|
|
|
|
2011-05-04 11:04:19 +00:00
|
|
|
discover_sensor($valid['sensor'], 'temperature', $device, $oid, $index, 'apc', $descr, '1', '1', NULL, NULL, NULL, NULL, $current);
|
2010-07-11 15:31:48 +00:00
|
|
|
}
|
2011-03-15 17:10:44 +00:00
|
|
|
# InRow Chiller.
|
|
|
|
# A silly check to find out if it's the right hardware.
|
|
|
|
$oids = snmp_get($device, "airIRRCGroupSetpointsCoolMetric.0", "-OsqnU", "PowerNet-MIB");
|
|
|
|
if ($oids)
|
|
|
|
{
|
|
|
|
echo("APC InRow Chiller ");
|
|
|
|
$temps = array();
|
|
|
|
$temps['airIRRCUnitStatusRackInletTempMetric'] = "Rack Inlet";
|
|
|
|
$temps['airIRRCUnitStatusSupplyAirTempMetric'] = "Supply Air";
|
|
|
|
$temps['airIRRCUnitStatusReturnAirTempMetric'] = "Return Air";
|
|
|
|
$temps['airIRRCUnitStatusEnteringFluidTemperatureMetric'] = "Entering Fluid";
|
|
|
|
$temps['airIRRCUnitStatusLeavingFluidTemperatureMetric'] = "Leaving Fluid";
|
2011-10-04 09:10:21 +00:00
|
|
|
foreach ($temps as $obj => $descr)
|
2011-03-15 17:10:44 +00:00
|
|
|
{
|
|
|
|
$oids = snmp_get($device, $obj . ".0", "-OsqnU", "PowerNet-MIB");
|
|
|
|
list($oid,$current) = explode(' ',$oids);
|
|
|
|
$divisor = 10;
|
|
|
|
$sensorType = substr($descr, 0, 2);
|
2011-05-04 11:04:19 +00:00
|
|
|
echo(discover_sensor($valid['sensor'], 'temperature', $device, $oid, '0', $sensorType, $descr, $divisor, '1', NULL, NULL, NULL, NULL, $current));
|
2011-03-15 17:10:44 +00:00
|
|
|
}
|
|
|
|
}
|
2010-07-11 15:31:48 +00:00
|
|
|
}
|
|
|
|
|
2011-03-15 17:10:44 +00:00
|
|
|
?>
|