Issues (2963)

discovery/sensors/temperature/ericsson-ml.inc.php (1 issue)

1
<?php
2
/*
3
 * LibreNMS
4
 *
5
 * Copyright (c) 2017 Martin Zatloukal <[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
d_echo('ERICSSON-ML');
14
$oid = '.1.3.6.1.4.1.193.223.2.4.1.1.2.1';
15
$index = 0;
16
$sensor_type = ' temperatureRadio';
17
$descr = 'Internal Temp';
18
$divisor = 1;
19
$temperature = (snmp_get($device, $oid, '-Oqv', 'PT-MONITOR-MIB') / $divisor);
20
if (is_numeric($temperature)) {
0 ignored issues
show
The condition is_numeric($temperature) is always true.
Loading history...
21
    discover_sensor($valid['sensor'], 'temperature', $device, $oid, $index, $sensor_type, $descr, $divisor, null, null, null, null, null, $temperature);
22
}
23