librenms/includes/discovery/temperatures/powerconnect.inc.php
Tom Laermans ed6ffa6067 syntaxer run
git-svn-id: http://www.observium.org/svn/observer/trunk@2964 61d68cd4-352d-0410-923a-c4978735b2b8
2012-04-05 16:17:41 +00:00

25 lines
678 B
PHP

<?php
if ($device['os'] == "powerconnect")
{
$temps = snmp_walk($device, "boxServicesTempSensorTemperature", "-OsqnU", "FASTPATH-BOXSERVICES-PRIVATE-MIB");
if ($debug) { echo($temps."\n"); }
$index = 0;
foreach (explode("\n",$temps) as $oids)
{
echo("Powerconnect ");
list($oid,$current) = explode(' ',$oids);
$divisor = "1";
$multiplier = "1";
$type = "powerconnect";
$index++;
$descr = "Internal Temperature";
if (count(explode("\n",$temps)) > 1) { $descr .= " $index"; }
discover_sensor($valid['sensor'], 'temperature', $device, $oid, $index, $type, $descr, $divisor, $multiplier, NULL, NULL, NULL, NULL, $current);
}
}
?>