Comware Temperature Discovery #3881

Merged
merged 3 commits into from Jul 26, 2016

Projects

None yet

3 participants

@Rosiak
Contributor
Rosiak commented Jul 26, 2016

Basic temp disco, tested on 5900 & 5930.

@Rosiak Rosiak Comware Temperature Discovery
Basic temp disco, tested on 5900 & 5930.
beea32a
@Rosiak Rosiak Small change
7a08957
@laf laf commented on an outdated diff Jul 26, 2016
includes/discovery/sensors/temperatures/comware.inc.php
+ * LibreNMS
+ *
+ * Copyright (c) 2016 Søren Friis Rosiak <sorenrosiak@gmail.com>
+ * 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.
+ */
+
+if ($device['os'] == 'comware') {
+
+ $entphydata = dbFetchRows("SELECT `entPhysicalIndex`, `entPhysicalClass`, `entPhysicalName` FROM `entPhysical` WHERE `device_id` = ? AND `entPhysicalClass` REGEXP 'module|sensor' ORDER BY `entPhysicalIndex`", array(
+ $device['device_id']
+ ));
+ $tempdata = snmpwalk_cache_multi_oid($device, 'hh3cEntityExtTemperature', array(), 'HH3C-ENTITY-EXT-MIB');
@laf
laf Jul 26, 2016 Member

No need to do the snmp lookup here, do it in the if (!empty check to save an snmp lookup.

@laf laf added the Discovery label Jul 26, 2016
@Rosiak Rosiak Move SNMP query
705b0a7
@laf laf merged commit 24d0610 into librenms:master Jul 26, 2016

2 checks passed

Auto-Deploy Build finished.
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@Rosiak Rosiak deleted the Rosiak:comware-temp-disco branch Feb 5, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment