diff --git a/includes/discovery/mempools/netonix.inc.php b/includes/discovery/mempools/netonix.inc.php
index 56a53d3e5d..8bd487b384 100644
--- a/includes/discovery/mempools/netonix.inc.php
+++ b/includes/discovery/mempools/netonix.inc.php
@@ -1,22 +1,34 @@
- *
- * 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.
- */
+/**
+ * netonix.inc.php
+ *
+ * LibreNMS mempools module for Netonix
+ *
+ * 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.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ *
+ * @package LibreNMS
+ * @link http://librenms.org
+ * @copyright 2016 Tony Murray
+ * @author Tony Murray
+ */
if ($device['os'] == 'netonix') {
echo 'NETONIX : ';
- $free = str_replace('"', "", snmp_get($device, 'UCD-SNMP-MIB::memTotalFree.0', '-OvQU'));
+ $free = snmp_get($device, 'UCD-SNMP-MIB::memTotalFree.0', '-OvQU');
if (is_numeric($free)) {
- discover_mempool($valid_mempool, $device, 0, 'netonix', 'Memory', '1024');
+ discover_mempool($valid_mempool, $device, 0, 'netonix', 'Memory', 1024);
}
}
diff --git a/includes/discovery/os/netonix.inc.php b/includes/discovery/os/netonix.inc.php
index 8b40cee9b5..332c41541b 100644
--- a/includes/discovery/os/netonix.inc.php
+++ b/includes/discovery/os/netonix.inc.php
@@ -1,15 +1,27 @@
- *
- * 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.
- */
+/**
+ * netonix.inc.php
+ *
+ * LibreNMS os discovery module for Netonix
+ *
+ * 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.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ *
+ * @package LibreNMS
+ * @link http://librenms.org
+ * @copyright 2016 Tony Murray
+ * @author Tony Murray
+ */
if (starts_with($sysObjectId, '.1.3.6.1.4.1.46242')) {
$os = 'netonix';
diff --git a/includes/discovery/processors/netonix.inc.php b/includes/discovery/processors/netonix.inc.php
index 5a66753c61..277bfea7ec 100644
--- a/includes/discovery/processors/netonix.inc.php
+++ b/includes/discovery/processors/netonix.inc.php
@@ -1,10 +1,32 @@
.
+ *
+ * @package LibreNMS
+ * @link http://librenms.org
+ * @copyright 2016 Tony Murray
+ * @author Tony Murray
+ */
+
if ($device['os'] == 'netonix') {
echo 'NETONIX : ';
-// $system = snmp_get($device, 'ssCpuSystem.0', '-OvQ', 'UCD-SNMP-MIB');
-// $user = snmp_get($device, 'ssCpuUser.0', '-OvQ', 'UCD-SNMP-MIB');
- $idle = snmp_get($device, 'ssCpuIdle.0', '-OvQ', 'UCD-SNMP-MIB');
+ $idle = snmp_get($device, 'UCD-SNMP-MIB::ssCpuIdle.0', '-OvQ');
if (is_numeric($idle)) {
discover_processor($valid['processor'], $device, 0, 0, 'ucd-old', 'CPU', '1', (100 - $idle));
diff --git a/includes/discovery/sensors/current/netonix.inc.php b/includes/discovery/sensors/current/netonix.inc.php
new file mode 100644
index 0000000000..438d4c1f32
--- /dev/null
+++ b/includes/discovery/sensors/current/netonix.inc.php
@@ -0,0 +1,38 @@
+.
+ *
+ * @package LibreNMS
+ * @link http://librenms.org
+ * @copyright 2016 Tony Murray
+ * @author Tony Murray
+ */
+
+
+if ($device['os'] == 'netonix') {
+ echo 'Netonix: ';
+
+ $dcinput_oid = '.1.3.6.1.4.1.46242.7.0'; // NETONIX-SWITCH-MIB::dcdcInputCurrent.0
+ $dcinput_value = snmp_get($device, $dcinput_oid, '-Oqv');
+ $descr = 'DC Power Input';
+ $divisor = 10;
+
+ if (is_numeric($dcinput_value) && $dcinput_value > 0) {
+ discover_sensor($valid['sensor'], 'current', $device, $dcinput_oid, 0, $device['os'], $descr, $divisor, 1, null, null, null, null, $dcinput_value / $divisor);
+ }
+}
diff --git a/includes/discovery/sensors/fanspeeds/netonix.inc.php b/includes/discovery/sensors/fanspeeds/netonix.inc.php
index 7c0016afe8..21edff4f8d 100644
--- a/includes/discovery/sensors/fanspeeds/netonix.inc.php
+++ b/includes/discovery/sensors/fanspeeds/netonix.inc.php
@@ -1,19 +1,32 @@
- *
- * 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.
- */
+/**
+ * netonix.inc.php
+ *
+ * LibreNMS fanspeeds module for Netonix
+ *
+ * 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.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ *
+ * @package LibreNMS
+ * @link http://librenms.org
+ * @copyright 2016 Tony Murray
+ * @author Tony Murray
+ */
// Netonix Fan Speeds
if ($device['os'] == 'netonix') {
echo 'Netonix: ';
+ // NETONIX-SWITCH-MIB::fanTable .1.3.6.1.4.1.46242.2
$oids = snmpwalk_cache_multi_oid($device, 'fanTable', array(), 'NETONIX-SWITCH-MIB', '+'.$config['mibdir'].'/netonix');
if (is_array($oids)) {
foreach ($oids as $index => $entry) {
diff --git a/includes/discovery/sensors/power/netonix.inc.php b/includes/discovery/sensors/power/netonix.inc.php
new file mode 100644
index 0000000000..8ad3a39b08
--- /dev/null
+++ b/includes/discovery/sensors/power/netonix.inc.php
@@ -0,0 +1,38 @@
+.
+ *
+ * @package LibreNMS
+ * @link http://librenms.org
+ * @copyright 2016 Tony Murray
+ * @author Tony Murray
+ */
+
+
+if ($device['os'] == 'netonix') {
+ echo 'Netonix: ';
+
+ $power_oid = '.1.3.6.1.4.1.46242.6.0'; // NETONIX-SWITCH-MIB::totalPowerConsumption
+ $power_value = snmp_get($device, $power_oid, '-Oqv');
+ $descr = 'Total Consumption';
+ $divisor = 10;
+
+ if (is_numeric($power_value) && $power_value > 0) {
+ discover_sensor($valid['sensor'], 'power', $device, $power_oid, 0, $device['os'], $descr, $divisor, 1, null, null, null, null, $power_value / $divisor);
+ }
+}
diff --git a/includes/discovery/sensors/states/netonix.inc.php b/includes/discovery/sensors/states/netonix.inc.php
index 0d721c567e..4c70d1e2e6 100644
--- a/includes/discovery/sensors/states/netonix.inc.php
+++ b/includes/discovery/sensors/states/netonix.inc.php
@@ -1,16 +1,30 @@
- * 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.
+ * LibreNMS states module for Netonix
+ *
+ * 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.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ *
+ * @package LibreNMS
+ * @link http://librenms.org
+ * @copyright 2016 Tony Murray
+ * @author Tony Murray
*/
if ($device['os'] == 'netonix') {
+ // NETONIX-SWITCH-MIB::poeStatus
$temp = snmpwalk_cache_multi_oid($device, '.1.3.6.1.4.1.46242.5.1.2', array());
$cur_oid = '.1.3.6.1.4.1.';
diff --git a/includes/discovery/sensors/temperatures/netonix.inc.php b/includes/discovery/sensors/temperatures/netonix.inc.php
index ad2dd0b07e..ca78443203 100644
--- a/includes/discovery/sensors/temperatures/netonix.inc.php
+++ b/includes/discovery/sensors/temperatures/netonix.inc.php
@@ -1,19 +1,32 @@
- *
- * 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.
- */
+/**
+ * netonix.inc.php
+ *
+ * LibreNMS temperatures module for Netonix
+ *
+ * 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.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ *
+ * @package LibreNMS
+ * @link http://librenms.org
+ * @copyright 2016 Tony Murray
+ * @author Tony Murray
+ */
// Netonix Temperatures
if ($device['os'] == 'netonix') {
echo 'Netonix: ';
+ // NETONIX-SWITCH-MIB::tempTable .1.3.6.1.4.1.46242.3
$oids = snmpwalk_cache_multi_oid($device, 'tempTable', array(), 'NETONIX-SWITCH-MIB', '+'.$config['mibdir'].'/netonix');
if (is_array($oids)) {
foreach ($oids as $index => $entry) {
@@ -25,4 +38,4 @@ if ($device['os'] == 'netonix') {
}
}
}
-}//end if
+}
diff --git a/includes/discovery/sensors/voltages/netonix.inc.php b/includes/discovery/sensors/voltages/netonix.inc.php
index 4b7b1dd1ac..76f0d01ce1 100644
--- a/includes/discovery/sensors/voltages/netonix.inc.php
+++ b/includes/discovery/sensors/voltages/netonix.inc.php
@@ -1,19 +1,32 @@
- *
- * 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.
- */
+/**
+ * netonix.inc.php
+ *
+ * LibreNMS voltages module for Netonix
+ *
+ * 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.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ *
+ * @package LibreNMS
+ * @link http://librenms.org
+ * @copyright 2016 Tony Murray
+ * @author Tony Murray
+ */
// Netonix Voltages
if ($device['os'] == 'netonix') {
echo 'Netonix: ';
+ // NETONIX-SWITCH-MIB::voltageTable .1.3.6.1.4.1.46242.4
$oids = snmpwalk_cache_multi_oid($device, 'voltageTable', array(), 'NETONIX-SWITCH-MIB', '+'.$config['mibdir'].'/netonix');
if (is_array($oids)) {
foreach ($oids as $index => $entry) {
diff --git a/includes/polling/mempools/netonix.inc.php b/includes/polling/mempools/netonix.inc.php
index 31b6d09da9..f64bc174e4 100644
--- a/includes/polling/mempools/netonix.inc.php
+++ b/includes/polling/mempools/netonix.inc.php
@@ -1,15 +1,27 @@
- *
- * 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.
- */
+/**
+ * netonix.inc.php
+ *
+ * LibreNMS mempools module for Netonix
+ *
+ * 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.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ *
+ * @package LibreNMS
+ * @link http://librenms.org
+ * @copyright 2016 Tony Murray
+ * @author Tony Murray
+ */
if ($device['os'] == 'netonix') {
$total = snmp_get($device, "UCD-SNMP-MIB::memTotalReal.0", "-OvQU") * 1024;
diff --git a/includes/polling/os/netonix.inc.php b/includes/polling/os/netonix.inc.php
index 3cdbb3d2c8..5849bfe952 100644
--- a/includes/polling/os/netonix.inc.php
+++ b/includes/polling/os/netonix.inc.php
@@ -1,16 +1,29 @@
- *
- * 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.
- */
+/**
+ * netonix.inc.php
+ *
+ * LibreNMS os poller module for Netonix
+ *
+ * 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.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ *
+ * @package LibreNMS
+ * @link http://librenms.org
+ * @copyright 2016 Tony Murray
+ * @author Tony Murray
+ */
-$version = snmp_get($device, 'firmwareVersion.0', '-OQv', 'NETONIX-SWITCH-MIB', $config['mibdir'].':'.$config['mibdir'].'/netonix');
+//NETONIX-SWITCH-MIB::firmwareVersion.0
+$version = snmp_get($device, '.1.3.6.1.4.1.46242.1.0', '-OQv');
$version = str_replace('.n.........', '', $version); // version display bug in 1.3.9
$hardware = $poll_device['sysDescr'];
diff --git a/mibs/netonix/NETONIX-SWITCH-MIB b/mibs/netonix/NETONIX-SWITCH-MIB
index 2c57e67ca3..d59235b9ee 100644
--- a/mibs/netonix/NETONIX-SWITCH-MIB
+++ b/mibs/netonix/NETONIX-SWITCH-MIB
@@ -7,11 +7,11 @@ IMPORTS
DisplayString,TEXTUAL-CONVENTION FROM SNMPv2-TC;
netonixSwitch MODULE-IDENTITY
- LAST-UPDATED "9803231700Z"
+ LAST-UPDATED "9803231800Z"
ORGANIZATION "Netonix"
CONTACT-INFO "eric@netonix.com"
DESCRIPTION "The MIB Module for Netonix Switches."
- REVISION "9803231700Z"
+ REVISION "9803231800Z"
DESCRIPTION "The MIB Module for Netonix Switches."
::= { enterprises 46242 }
@@ -22,7 +22,10 @@ netonixSwitchGroup OBJECT-GROUP
temp,
voltageDescription,
voltage,
- poeStatus
+ poeStatus,
+ totalPowerConsumption,
+ dcdcInputCurrent,
+ dcdcEfficiency
}
STATUS current
DESCRIPTION "A collection of objects providing basic instrumentation and control of an SNMPv2 entity."
@@ -44,6 +47,18 @@ VoltageTC ::= TEXTUAL-CONVENTION
DESCRIPTION "A voltage with 2 decimal places"
SYNTAX Integer32
+PowerTC ::= TEXTUAL-CONVENTION
+ DISPLAY-HINT "d-1"
+ STATUS current
+ DESCRIPTION "Power consumption in watts with 1 decimal place"
+ SYNTAX Integer32
+
+CurrentTC ::= TEXTUAL-CONVENTION
+ DISPLAY-HINT "d-1"
+ STATUS current
+ DESCRIPTION "Current in amps with 1 decimal place"
+ SYNTAX Integer32
+
firmwareVersion OBJECT-TYPE
SYNTAX DisplayString (SIZE (0..255))
MAX-ACCESS read-only
@@ -51,6 +66,27 @@ firmwareVersion OBJECT-TYPE
DESCRIPTION "The version of the firmware running on the switch"
::= { netonixSwitch 1 }
+totalPowerConsumption OBJECT-TYPE
+ SYNTAX PowerTC
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION "Total power being consumed by the switch, in Watts"
+ ::= { netonixSwitch 6 }
+
+dcdcInputCurrent OBJECT-TYPE
+ SYNTAX CurrentTC
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION "DCDC Input Current in amps"
+ ::= { netonixSwitch 7 }
+
+dcdcEfficiency OBJECT-TYPE
+ SYNTAX Integer32
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION "DCDC power supply efficiency, percentage"
+ ::= { netonixSwitch 8 }
+
fanTable OBJECT-TYPE
SYNTAX SEQUENCE OF FanEntry
MAX-ACCESS not-accessible
@@ -86,14 +122,14 @@ fanSpeed OBJECT-TYPE
::= { fanEntry 2 }
poeStatusTable OBJECT-TYPE
- SYNTAX SEQUENCE OF PoEStatus
+ SYNTAX SEQUENCE OF PoEStatusEntry
MAX-ACCESS not-accessible
STATUS current
DESCRIPTION "PoE Status per port."
::= { netonixSwitch 5 }
poeStatusEntry OBJECT-TYPE
- SYNTAX PoeStatusEntry
+ SYNTAX PoEStatusEntry
MAX-ACCESS not-accessible
STATUS current
DESCRIPTION "An entry containing poe status."