mirror of
https://github.com/stylersnico/librenms.git
synced 2026-08-02 00:32:09 +02:00
Changed temperature discovery per device model
This commit is contained in:
@@ -2,23 +2,38 @@
|
|||||||
|
|
||||||
if ($device['os'] == "powerconnect")
|
if ($device['os'] == "powerconnect")
|
||||||
{
|
{
|
||||||
$temps = snmp_walk($device, "boxServicesTempSensorTemperature", "-OsqnU", "FASTPATH-BOXSERVICES-PRIVATE-MIB");
|
$sysObjectId = snmp_get ($device, "SNMPv2-MIB::sysObjectID.0", "-Ovqn");
|
||||||
if ($debug) { echo($temps."\n"); }
|
switch ($sysObjectId) {
|
||||||
|
case ".1.3.6.1.4.1.674.10895.3031":
|
||||||
|
/**
|
||||||
|
* Devices supported:
|
||||||
|
* Dell Powerconnect 55xx
|
||||||
|
* Operating Temperature: 0º C to 40º C
|
||||||
|
*/
|
||||||
|
$temperature = trim(snmp_get($device, ".1.3.6.1.4.1.89.53.15.1.9.1", "-Ovq"));
|
||||||
|
discover_sensor($valid['sensor'], 'temperature', $device , ".1.3.6.1.4.1.89.53.15.1.9.1", 0 , "powerconnect" , "Internal Temperature" , '1', '1', "0" , NULL, NULL, "40", $temperature);
|
||||||
|
break;
|
||||||
|
default :
|
||||||
|
/**
|
||||||
|
* Defaul Discovery for powerconnect series
|
||||||
|
* Dell-Vendor-MIB::dellLanExtension.6132.1.1.1.1.4.4.0 = STRING: "5 Sec (6.99%), 1 Min (6.72%), 5 Min (9.06%)"
|
||||||
|
*/
|
||||||
|
$temps = snmp_walk($device, "boxServicesTempSensorTemperature", "-OsqnU", "FASTPATH-BOXSERVICES-PRIVATE-MIB");
|
||||||
|
if ($debug) { echo($temps."\n"); }
|
||||||
|
|
||||||
$index = 0;
|
$index = 0;
|
||||||
foreach (explode("\n",$temps) as $oids)
|
foreach (explode("\n",$temps) as $oids)
|
||||||
{
|
{
|
||||||
echo("Powerconnect ");
|
echo("Powerconnect ");
|
||||||
list($oid,$current) = explode(' ',$oids);
|
list($oid,$current) = explode(' ',$oids);
|
||||||
$divisor = "1";
|
$divisor = "1";
|
||||||
$multiplier = "1";
|
$multiplier = "1";
|
||||||
$type = "powerconnect";
|
$type = "powerconnect";
|
||||||
$index++;
|
$index++;
|
||||||
$descr = "Internal Temperature";
|
$descr = "Internal Temperature";
|
||||||
if (count(explode("\n",$temps)) > 1) { $descr .= " $index"; }
|
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);
|
discover_sensor($valid['sensor'], 'temperature', $device, $oid, $index, $type, $descr, $divisor, $multiplier, NULL, NULL, NULL, NULL, $current);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
|
||||||
|
|||||||
Reference in New Issue
Block a user