1 | <?php |
||
2 | /* |
||
3 | * LibreNMS |
||
4 | * |
||
5 | * Copyright (c) 2016 Neil Lathwood <[email protected]> |
||
6 | * This program is free software: you can redistribute it and/or modify it |
||
7 | * under the terms of the GNU General Public License as published by the |
||
8 | * Free Software Foundation, either version 3 of the License, or (at your |
||
9 | * option) any later version. Please see LICENSE.txt at the top level of |
||
10 | * the source code distribution for details. |
||
11 | */ |
||
12 | |||
13 | $descr_prefix = 'Blower '; |
||
14 | $oids = [ |
||
15 | '.1.3.6.1.4.1.2.3.51.2.2.3.20.0', // BLADE-MIB:blower1speedRPM |
||
16 | '.1.3.6.1.4.1.2.3.51.2.2.3.21.0', // BLADE-MIB:blower2speedRPM |
||
17 | '.1.3.6.1.4.1.2.3.51.2.2.3.22.0', // BLADE-MIB:blower3speedRPM |
||
18 | '.1.3.6.1.4.1.2.3.51.2.2.3.23.0', // BLADE-MIB:blower4speedRPM |
||
19 | ]; |
||
20 | |||
21 | echo 'BLADE-MIB '; |
||
22 | foreach ($oids as $index => $oid) { |
||
23 | $value = trim(snmp_get($device, $oid, '-Oqv'), '"'); |
||
0 ignored issues
–
show
Bug
introduced
by
Loading history...
|
|||
24 | |||
25 | if (is_numeric($value)) { |
||
26 | $descr = $descr_prefix . ($index + 1); |
||
27 | discover_sensor($valid['sensor'], 'fanspeed', $device, $oid, $index, 'snmp', $descr, 1, 1, null, null, null, null, $value); |
||
28 | } |
||
29 | } |
||
30 |