mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
26 lines
877 B
PHP
26 lines
877 B
PHP
<?php
|
|
|
|
if ($device['os'] == "hytera") {
|
|
$oids = snmp_walk($device, "rptPaTemprature", "-OsqnU", "HYTERA-REPEATER-MIB");
|
|
d_echo($oids);
|
|
if ($oids !== false) {
|
|
echo("HYTERA-REPEATER-MIB ");
|
|
}
|
|
$divisor = 1;
|
|
$type = "hytera";
|
|
|
|
foreach (explode("\n", $oids) as $data) {
|
|
$data = trim($data);
|
|
if ($data) {
|
|
list($oid,$descr) = explode(" ", $data, 2);
|
|
$split_oid = explode('.', $oid);
|
|
$index = $split_oid[count($split_oid)-1];
|
|
$descr = "PA Temperature " . $index;
|
|
$oid = ".1.3.6.1.4.1.40297.1.2.1.2.2." . $index;
|
|
$temperature = hytera_h2f(str_replace("\"", "", snmp_get($device, $oid, "-Oqv")), 2);
|
|
|
|
discover_sensor($valid['sensor'], 'temperature', $device, $oid, $index, $type, $descr, $divisor, '1', 0, 0, 70, 75, $temperature);
|
|
}
|
|
}
|
|
}
|