mirror of
https://github.com/stylersnico/librenms.git
synced 2026-08-02 00:32:09 +02:00
Added Fiberhome Temeprature Discvover and Poller
Added option on includes/polling/functions.inc.php for especific MIB temperature polling
This commit is contained in:
@@ -0,0 +1,10 @@
|
|||||||
|
<?php
|
||||||
|
if ($device['os'] == 'fiberhome')
|
||||||
|
{
|
||||||
|
$temperature = snmp_get($device, "sysTemperature.0", "-Oqv", "GEPON-OLT-COMMON-MIB");
|
||||||
|
if (is_numeric($temperature)) {
|
||||||
|
echo("Fiberhome - $temperature \n");
|
||||||
|
discover_sensor($valid['sensor'], 'temperature', $device, "GEPON-OLT-COMMON-MIB::sysTemperature", "0", 'fiberhome',"Internal Temperature", '1', '1', "20" , NULL, NULL, "50", $temperature);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
||||||
@@ -20,6 +20,8 @@ function poll_sensor($device, $class, $unit)
|
|||||||
{
|
{
|
||||||
if ($device['os'] == 'netapp') {
|
if ($device['os'] == 'netapp') {
|
||||||
require "includes/polling/temperatures/netapp.inc.php";
|
require "includes/polling/temperatures/netapp.inc.php";
|
||||||
|
} elseif ($device['os'] == 'fiberhome') {
|
||||||
|
require "includes/polling/temperatures/fiberhome.inc.php";
|
||||||
} else {
|
} else {
|
||||||
for ($i = 0;$i < 5;$i++) # Try 5 times to get a valid temp reading
|
for ($i = 0;$i < 5;$i++) # Try 5 times to get a valid temp reading
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -0,0 +1,3 @@
|
|||||||
|
<?php
|
||||||
|
$sensor_value = snmp_get($device, "sysTemperature.0", "-Oqv", "GEPON-OLT-COMMON-MIB");
|
||||||
|
|
||||||
Reference in New Issue
Block a user