newdevice: Added Valere system sensors and os detection. (#6981)

* Add Valere system sensors and os detection.

* update yaml data layout
This commit is contained in:
Tony Murray
2017-07-12 01:56:45 -05:00
committed by Neil Lathwood
parent 2bf99c65a0
commit 2ab5962cbb
4 changed files with 2775 additions and 0 deletions

View File

@@ -0,0 +1,49 @@
mib: VALERE-DC-POWER-MIB
modules:
sensors:
voltage:
data:
-
oid: vpwrSystemParameterGroup
value: vpwrSystemVoltage
num_oid: .1.3.6.1.4.1.13858.2.3.2.
descr: System Voltage
divisor: 100
current:
data:
-
oid: vpwrSystemParameterGroup
value: vpwrSystemCurrent
num_oid: .1.3.6.1.4.1.13858.2.3.3.
descr: System Current
temperature:
data:
-
oid: vpwrSystemParameterGroup
value: vpwrSystemInternalTemperature
num_oid: .1.3.6.1.4.1.13858.2.3.5.
descr: Internal Temperature
state:
data:
-
oid: vpwrSystemParameterGroup
value: vpwrSystemControllerState
num_oid: .1.3.6.1.4.1.13858.2.3.4.
descr: Controller State
state_name: vpwrSystemControllerState
states:
- { descr: systemControllerStateUnknown, graph: 0, value: 0, generic: 3 }
- { descr: systemControllerStateNormal, graph: 0, value: 1, generic: 0 }
- { descr: systemControllerStateChange, graph: 0, value: 2, generic: 1 }
- { descr: systemControllerStateAlarm, graph: 0, value: 3, generic: 2 }
- { descr: systemControllerStateMenu, graph: 0, value: 4, generic: 1 }
- { descr: systemControllerStateIrActive, graph: 0, value: 5, generic: 1 }
-
oid: vpwrSystemParameterGroup
value: vpwrSystemTempCompensationState
num_oid: .1.3.6.1.4.1.13858.2.3.4.
descr: Temperature Compensation State
state_name: vpwrSystemTempCompensationState
states:
- { descr: systemTempCompInactive, graph: 0, value: 0, generic: 0 }
- { descr: systemTempCompActive, graph: 0, value: 1, generic: 1 }

View File

@@ -3,6 +3,8 @@ text: 'Eltek Valere'
type: power
icon: eltek
nobulk: 1
mib_dir:
- eltek
over:
- { graph: device_bits, text: 'Device Traffic' }
discovery:

View File

@@ -0,0 +1,28 @@
<?php
/**
* valere.inc.php
*
* -Description-
*
* 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 <http://www.gnu.org/licenses/>.
*
* @package LibreNMS
* @link http://librenms.org
* @copyright 2017 Tony Murray
* @author Tony Murray <murraytony@gmail.com>
*/
$hardware = snmp_get($device, 'vpwrIdentModel.0', '-Ovqa', 'VALERE-DC-POWER-MIB');
$version = snmp_get($device, 'vpwrIdentControllerVersion.0', '-Ovqa', 'VALERE-DC-POWER-MIB');
$features = implode(', ', explode(PHP_EOL, snmp_walk($device, 'vpwrModuleOID', '-Oqvs', 'VALERE-DC-POWER-MIB')));

File diff suppressed because it is too large Load Diff