diff --git a/includes/definitions.inc.php b/includes/definitions.inc.php index 90b1ed3b2e..66e89cc8c5 100644 --- a/includes/definitions.inc.php +++ b/includes/definitions.inc.php @@ -1905,6 +1905,10 @@ $os = 'hwg-ste2'; $config['os'][$os]['text'] = 'HWg STE2'; $config['os'][$os]['type'] = 'environment'; $config['os'][$os]['icon'] = 'hwg'; +$config['os'][$os]['over'][0]['graph'] = 'device_temperature'; +$config['os'][$os]['over'][0]['text'] = 'Temperature'; +$config['os'][$os]['over'][1]['graph'] = 'device_humidity'; +$config['os'][$os]['over'][1]['text'] = 'Humidity'; // EATON PDU $os = 'eatonpdu'; diff --git a/includes/discovery/sensors/humidity/hwg-ste2.inc.php b/includes/discovery/sensors/humidity/hwg-ste2.inc.php index a549ea1bb2..5f02640f96 100644 --- a/includes/discovery/sensors/humidity/hwg-ste2.inc.php +++ b/includes/discovery/sensors/humidity/hwg-ste2.inc.php @@ -17,8 +17,7 @@ if ($device['os'] == 'hwg-ste2') { $descr = 'Input 1 Humidity'; $humidity = snmp_get($device, $oid, '-Osqnv'); - if ($humidity != 0) { + if ($humidity !== false) { discover_sensor($valid['sensor'], 'humidity', $device, $oid, '1', $sensorType, $descr, '1', '1', null, null, null, null, $humidity); } - } diff --git a/includes/discovery/sensors/temperatures/hwg-ste2.inc.php b/includes/discovery/sensors/temperatures/hwg-ste2.inc.php index 22e67f9d05..8e48da11d2 100644 --- a/includes/discovery/sensors/temperatures/hwg-ste2.inc.php +++ b/includes/discovery/sensors/temperatures/hwg-ste2.inc.php @@ -14,11 +14,10 @@ if ($device['os'] == 'hwg-ste2') { d_echo('HWg STE2 Temperature '); $oid = '.1.3.6.1.4.1.21796.4.9.3.1.4.2'; $sensorType = 'ste2_temp'; - $descr = 'Input 1 Temperature'; + $descr = 'Input 2 Temperature'; $temperature = snmp_get($device, $oid, '-Osqnv'); - if ($humidity != 0) { + if ($temperature !== false) { discover_sensor($valid['sensor'], 'temperature', $device, $oid, '1', $sensorType, $descr, '1', '1', null, null, null, null, $temperature); } - } diff --git a/includes/polling/os/hwg-ste2.inc.php b/includes/polling/os/hwg-ste2.inc.php new file mode 100644 index 0000000000..1d37bf4fc3 --- /dev/null +++ b/includes/polling/os/hwg-ste2.inc.php @@ -0,0 +1,14 @@ + + * This program is free software: you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation, either version 3 of the License, or (at your + * option) any later version. Please see LICENSE.txt at the top level of + * the source code distribution for details. + */ + +preg_match_all('/STE2/', $poll_device['sysDescr'], $matches); +$hardware = $matches[0][0]; \ No newline at end of file