2015-05-19 19:58:46 +02:00
|
|
|
<?php
|
|
|
|
|
2015-07-13 20:10:26 +02:00
|
|
|
if ($device['os'] == 'routeros') {
|
2017-01-13 11:34:02 +00:00
|
|
|
$descr_prefix = 'fan ';
|
|
|
|
$oids = array(
|
|
|
|
'.1.3.6.1.4.1.14988.1.1.3.17.0', // MIKROTIK-MIB::mtxrHlFanSpeed1.0
|
|
|
|
'.1.3.6.1.4.1.14988.1.1.3.18.0', // MIKROTIK-MIB::mtxrHlFanSpeed2.0
|
|
|
|
);
|
2015-05-19 19:58:46 +02:00
|
|
|
|
2017-01-13 11:34:02 +00:00
|
|
|
echo 'MIKROTIK-MIB ';
|
|
|
|
foreach ($oids as $index => $oid) {
|
|
|
|
$value = trim(snmp_get($device, $oid, '-Oqv'), '"');
|
2015-07-13 20:10:26 +02:00
|
|
|
|
2017-01-13 11:34:02 +00:00
|
|
|
if (is_numeric($value)) {
|
|
|
|
$descr = $descr_prefix . ($index + 1);
|
|
|
|
discover_sensor($valid['sensor'], 'fanspeed', $device, $oid, $index, 'snmp', $descr, 1, 1, null, null, null, null, $value);
|
2015-07-13 20:10:26 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|