Dantel WebMon Device Support (#9767)

* Dantel WebMon Support

Webmon tep discovery changes

Fix Code Climate Issues

* WebMon - Move MIB to folder and create json reference

* Minor changes to Webmon polling
This commit is contained in:
network-guy
2019-03-05 00:46:00 -06:00
committed by Tony Murray
parent f4a33c1a34
commit 65fba42306
8 changed files with 13574 additions and 0 deletions

View File

@@ -0,0 +1,12 @@
os: webmon
text: 'Webmon Edge'
type: environment
icon: dantel
mib_dir:
- dantel
over:
- { graph: device_temperature, text: Temperature }
- { graph: device_humidity, text: Humidity }
discovery:
- sysObjectID:
- .1.3.6.1.4.1.994.3.4

View File

@@ -0,0 +1,31 @@
<?php
/*
* LibreNMS Dantel Webmon humidity sensor
*
* 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.
*
* @package LibreNMS
* @link http://librenms.org
* @copyright 2019 Mike Williams
* @author Mike Williams <mike@mgww.net>
*/
$env = snmpwalk_group($device, 'pSlot1Table', 'WEBMON-EDGE-MATRIX-MIB');
if (!empty($env)) {
$oid = '.1.3.6.1.4.1.994.3.4.7.18.1.66.1.0';
$index = '1';
$descr = $env[1]['pSlot1Description'][0];
$value = $env[1]['pSlot1LiveRaw'][0];
$lowlimit = $env[1]['pSlot1Thresh4'][0];
$low_warn_limit = $env[1]['pSlot1Thresh3'][0];
$warnlimit = $env[1]['pSlot1Thresh2'][0];
$high_limit = $env[1]['pSlot1Thresh1'][0];
discover_sensor($valid['sensor'], 'humidity', $device, $oid, $index, 'webmon', $descr, '1', '1', $lowlimit, $low_warn_limit, $warnlimit, $high_limit, $value, 'snmp', null, null, null, null);
}

View File

@@ -0,0 +1,41 @@
<?php
/*
* LibreNMS Dantel Webmon temperature sensor
*
* 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.
*
* @package LibreNMS
* @link http://librenms.org
* @copyright 2019 Mike Williams
* @author Mike Williams <mike@mgww.net>
*/
$env = snmpwalk_group($device, 'pSlot1Table', 'WEBMON-EDGE-MATRIX-MIB');
if (!empty($env)) {
$oid = '.1.3.6.1.4.1.994.3.4.7.18.1.66.2.0';
$index = '2';
$descr = $env[2]['pSlot1Description'][0];
$value = $env[2]['pSlot1LiveRaw'][0];
$lowlimit = $env[2]['pSlot1Thresh4'][0];
$low_warn_limit = $env[2]['pSlot1Thresh3'][0];
$warnlimit = $env[2]['pSlot1Thresh2'][0];
$high_limit = $env[2]['pSlot1Thresh1'][0];
$func = null;
if ($env[2]['pSlot1Units'][0] == 'Fahrenheit') {
$func = 'fahrenheit_to_celsius';
$value = fahrenheit_to_celsius($value);
$lowlimit = fahrenheit_to_celsius($lowlimit);
$low_warn_limit = fahrenheit_to_celsius($low_warn_limit);
$warnlimit = fahrenheit_to_celsius($warnlimit);
$high_limit = fahrenheit_to_celsius($high_limit);
}
discover_sensor($valid['sensor'], 'temperature', $device, $oid, $index, 'webmon', $descr, '1', '1', $lowlimit, $low_warn_limit, $warnlimit, $high_limit, $value, 'snmp', null, null, $func, null);
}

View File

@@ -0,0 +1,17 @@
<?php
/*
* LibreNMS Dantel Webmon poller module
*
* 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.
*
* @package LibreNMS
* @link http://librenms.org
* @copyright 2019 Mike Williams
* @author Mike Williams <mike@mgww.net>
*/
$version = snmp_get($device, '.1.3.6.1.4.1.994.3.4.7.1.82.0.0', '-OQv', 'WEBMON-EDGE-MATRIX-MIB');