1<?php
2/**
3 * LibreNMS - ADVA device support - Voltage Sensors
4 *
5 * @category   Network_Monitoring
6 * @author     Christoph Zilian <czilian@hotmail.com>
7 * @license    https://gnu.org/copyleft/gpl.html GNU GPL
8 * @link       https://github.com/librenms/librenms/
9 *
10 * This program is free software: you can redistribute it and/or modify it
11 * under the terms of the GNU General Public License as published by the
12 * Free Software Foundation, either version 3 of the License, or (at your
13 * option) any later version.  Please see LICENSE.txt at the top level of
14 * the source code distribution for details.
15 **/
16
17// *************************************************************
18// ***** Sensors for ADVA FSP3000 R7
19// *************************************************************
20
21    $multiplier = 1;
22    $divisor = 1000;
23
24if (is_array($pre_cache['adva_fsp3kr7_Card'])) {
25    foreach (array_keys($pre_cache['adva_fsp3kr7_Card']) as $index) {
26        if ($pre_cache['adva_fsp3kr7_Card'][$index]['eqptPhysInstValuePsuVoltInp']) {
27            $oid = '.1.3.6.1.4.1.2544.1.11.11.1.2.1.1.1.7.' . $index;
28            $descr = strtoupper($pre_cache['adva_fsp3kr7_Card'][$index]['entityEqptAidString']) . ' Input';
29            $rrd_filename = $descr;
30            $current = $pre_cache['adva_fsp3kr7_Card'][$index]['eqptPhysInstValuePsuVoltInp'] / $divisor;
31
32            discover_sensor(
33                $valid['sensor'],
34                'voltage',
35                $device,
36                $oid,
37                'eqptPhysInstValuePsuVoltInp' . $index,
38                'adva_fsp3kr7',
39                $descr,
40                $divisor,
41                $multiplier,
42                null,
43                null,
44                null,
45                null,
46                $current
47            );
48        }
49    }
50}// ******** End If of FSP3000 R7
51