mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
* refactor: Tidy up sensor discovery * more files * removed uneeded files * updated array check * updates for linux/supermicro * small changes * Update linux.inc.php * Add supermicro temps back to linux.inc.php * No need for is_file on rfc1628.inc.php, it exists * Revert rfc1628 change * Fix whitespace... * rebased * fixed $valid data not being passed to new sensors() function
13 lines
418 B
PHP
13 lines
418 B
PHP
<?php
|
|
|
|
echo 'MIKROTIK-MIB ';
|
|
|
|
$input_oid = '.1.3.6.1.4.1.14988.1.1.3.13.0'; // MIKROTIK-MIB::mtxrHlCurrent
|
|
$input_value = snmp_get($device, $input_oid, '-Oqv');
|
|
$descr = 'Current';
|
|
$divisor = 1000;
|
|
|
|
if (is_numeric($input_value) && $input_value > 0) {
|
|
discover_sensor($valid['sensor'], 'current', $device, $input_oid, 0, $device['os'], $descr, $divisor, 1, null, null, null, null, $input_value / $divisor);
|
|
}
|