mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Dantel Webmon Improvement (#9977)
* Generic polling for webmon * Tests update * clean * tests and count sensor * typo + tests * update user friendly OS * style
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
os: webmon
|
||||
text: 'Webmon Edge'
|
||||
text: 'Dantel Webmon'
|
||||
type: environment
|
||||
icon: dantel
|
||||
mib_dir:
|
||||
|
@@ -229,7 +229,7 @@ function discover_sensor(&$valid, $class, $device, $oid, $index, $type, $descr,
|
||||
$divisor = 1;
|
||||
}
|
||||
|
||||
d_echo("Discover sensor: $oid, $index, $type, $descr, $poller_type, $divisor, $multiplier, $entPhysicalIndex, $current\n");
|
||||
d_echo("Discover sensor: $oid, $index, $type, $descr, $poller_type, $divisor, $multiplier, $entPhysicalIndex, $current, (limits: LL: $low_limit, LW: $low_warn_limit, W: $warn_limit, H: $high_limit)\n");
|
||||
|
||||
if (isset($warn_limit, $low_warn_limit) && $low_warn_limit > $warn_limit) {
|
||||
// Fix high/low thresholds (i.e. on negative numbers)
|
||||
|
48
includes/discovery/sensors/count/webmon.inc.php
Normal file
48
includes/discovery/sensors/count/webmon.inc.php
Normal file
@@ -0,0 +1,48 @@
|
||||
<?php
|
||||
/*
|
||||
* LibreNMS Dantel Webmon generic 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
|
||||
* @copyright 2019 PipoCanaja
|
||||
* @author Mike Williams <mike@mgww.net>
|
||||
* @author PipoCanaja <PipoCanaja@gmail.com>
|
||||
*/
|
||||
|
||||
$prefixes = [
|
||||
'pSlot1' => '.1.3.6.1.4.1.994.3.4.7.18.1.66.',
|
||||
'pSlot2' => '.1.3.6.1.4.1.994.3.4.7.19.1.66.',
|
||||
'pSlot3' => '.1.3.6.1.4.1.994.3.4.7.20.1.66.',
|
||||
'pSlot4' => '.1.3.6.1.4.1.994.3.4.7.21.1.66.',
|
||||
'pSlot5' => '.1.3.6.1.4.1.994.3.4.7.22.1.66.',
|
||||
'pSlot6' => '.1.3.6.1.4.1.994.3.4.7.23.1.66.',
|
||||
'pOnboardSensor' => '.1.3.6.1.4.1.994.3.4.7.6.1.66.',
|
||||
];
|
||||
|
||||
foreach ($prefixes as $prefix => $numOidPrefix) {
|
||||
$walk = snmpwalk_cache_oid($device, $prefix . 'Table', [], 'WEBMON-EDGE-MATRIX-MIB');
|
||||
|
||||
foreach ($walk as $index => $oid) {
|
||||
if ($oid[$prefix . 'Configured'] != '0' && $oid[$prefix . 'SensorType'] != 'humidity' && $oid[$prefix . 'SensorType'] != 'temperature' && $oid[$prefix . 'LiveRaw']) {
|
||||
$num_oid = $numOidPrefix . $index;
|
||||
$descr = $oid[$prefix . 'Description'];
|
||||
$group = $prefix;
|
||||
$value = $oid[$prefix . 'LiveRaw'];
|
||||
$lowLimit = $oid[$prefix . 'Thresh4'];
|
||||
$lowWarnLimit = $oid[$prefix . 'Thresh3'];
|
||||
$highLimit = $oid[$prefix . 'Thresh1'];
|
||||
$highWarnLimit = $oid[$prefix . 'Thresh2'];
|
||||
if ($oid[$prefix . 'Units']) {
|
||||
$descr .= '(' . $oid[$prefix . 'Units'] . ')';
|
||||
}
|
||||
discover_sensor($valid['sensor'], 'count', $device, $num_oid, $prefix . 'LiveRaw.' . $index, 'webmon', $descr, '1', '1', $lowLimit, $lowWarnLimit, $highWarnLimit, $highLimit, $value, 'snmp', null, null, null, $group);
|
||||
}
|
||||
}
|
||||
}
|
@@ -11,21 +11,35 @@
|
||||
* @package LibreNMS
|
||||
* @link http://librenms.org
|
||||
* @copyright 2019 Mike Williams
|
||||
* @copyright 2019 PipoCanaja
|
||||
* @author Mike Williams <mike@mgww.net>
|
||||
* @author PipoCanaja <PipoCanaja@gmail.com>
|
||||
*/
|
||||
|
||||
$env = snmpwalk_group($device, 'pSlot1Table', 'WEBMON-EDGE-MATRIX-MIB');
|
||||
$prefixes = [
|
||||
'pSlot1' => '.1.3.6.1.4.1.994.3.4.7.18.1.66.',
|
||||
'pSlot2' => '.1.3.6.1.4.1.994.3.4.7.19.1.66.',
|
||||
'pSlot3' => '.1.3.6.1.4.1.994.3.4.7.20.1.66.',
|
||||
'pSlot4' => '.1.3.6.1.4.1.994.3.4.7.21.1.66.',
|
||||
'pSlot5' => '.1.3.6.1.4.1.994.3.4.7.22.1.66.',
|
||||
'pSlot6' => '.1.3.6.1.4.1.994.3.4.7.23.1.66.',
|
||||
'pOnboardSensor' => '.1.3.6.1.4.1.994.3.4.7.6.1.66.',
|
||||
];
|
||||
|
||||
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];
|
||||
foreach ($prefixes as $prefix => $numOidPrefix) {
|
||||
$walk = snmpwalk_cache_oid($device, $prefix . 'Table', [], 'WEBMON-EDGE-MATRIX-MIB');
|
||||
|
||||
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);
|
||||
foreach ($walk as $index => $oid) {
|
||||
if ($oid[$prefix . 'Configured'] != '0' && ($oid[$prefix . 'SensorType'] == '2' || $oid[$prefix . 'SensorType'] == 'humidity') && $oid[$prefix . 'LiveRaw']) {
|
||||
$num_oid = $numOidPrefix . $index;
|
||||
$descr = $oid[$prefix . 'Description'];
|
||||
$group = $prefix;
|
||||
$value = $oid[$prefix . 'LiveRaw'];
|
||||
$lowLimit = $oid[$prefix . 'Thresh4'];
|
||||
$lowWarnLimit = $oid[$prefix . 'Thresh3'];
|
||||
$highLimit = $oid[$prefix . 'Thresh1'];
|
||||
$highWarnLimit = $oid[$prefix . 'Thresh2'];
|
||||
discover_sensor($valid['sensor'], 'humidity', $device, $num_oid, $prefix . 'LiveRaw.' . $index, 'webmon', $descr, '1', '1', $lowLimit, $lowWarnLimit, $highWarnLimit, $highLimit, $value, 'snmp', null, null, null, $group);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -1,5 +1,4 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* LibreNMS Dantel Webmon temperature sensor
|
||||
*
|
||||
@@ -12,30 +11,44 @@
|
||||
* @package LibreNMS
|
||||
* @link http://librenms.org
|
||||
* @copyright 2019 Mike Williams
|
||||
* @copyright 2019 PipoCanaja
|
||||
* @author Mike Williams <mike@mgww.net>
|
||||
* @author PipoCanaja <PipoCanaja@gmail.com>
|
||||
*/
|
||||
|
||||
$env = snmpwalk_group($device, 'pSlot1Table', 'WEBMON-EDGE-MATRIX-MIB');
|
||||
$prefixes = [
|
||||
'pSlot1' => '.1.3.6.1.4.1.994.3.4.7.18.1.66.',
|
||||
'pSlot2' => '.1.3.6.1.4.1.994.3.4.7.19.1.66.',
|
||||
'pSlot3' => '.1.3.6.1.4.1.994.3.4.7.20.1.66.',
|
||||
'pSlot4' => '.1.3.6.1.4.1.994.3.4.7.21.1.66.',
|
||||
'pSlot5' => '.1.3.6.1.4.1.994.3.4.7.22.1.66.',
|
||||
'pSlot6' => '.1.3.6.1.4.1.994.3.4.7.23.1.66.',
|
||||
'pOnboardSensor' => '.1.3.6.1.4.1.994.3.4.7.6.1.66.',
|
||||
];
|
||||
|
||||
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);
|
||||
foreach ($prefixes as $prefix => $numOidPrefix) {
|
||||
$walk = snmpwalk_cache_oid($device, $prefix . 'Table', [], 'WEBMON-EDGE-MATRIX-MIB');
|
||||
|
||||
foreach ($walk as $index => $oid) {
|
||||
$user_function = null;
|
||||
if ($oid[$prefix . 'Configured'] != '0' && ($oid[$prefix . 'SensorType'] == '1' || $oid[$prefix . 'SensorType'] == 'temperature') && $oid[$prefix . 'LiveRaw']) {
|
||||
$num_oid = $numOidPrefix . $index;
|
||||
$descr = $oid[$prefix . 'Description'];
|
||||
$group = $prefix;
|
||||
$value = $oid[$prefix . 'LiveRaw'];
|
||||
$lowLimit = $oid[$prefix . 'Thresh4'];
|
||||
$lowWarnLimit = $oid[$prefix . 'Thresh3'];
|
||||
$highLimit = $oid[$prefix . 'Thresh1'];
|
||||
$highWarnLimit = $oid[$prefix . 'Thresh2'];
|
||||
if ($oid[$prefix . 'Units'] == "Fahrenheit") {
|
||||
$user_function = 'fahrenheit_to_celsius';
|
||||
$value = fahrenheit_to_celsius($value);
|
||||
$lowLimit = fahrenheit_to_celsius($lowLimit);
|
||||
$lowWarnLimit = fahrenheit_to_celsius($lowWarnLimit);
|
||||
$highLimit = fahrenheit_to_celsius($highLimit);
|
||||
$highWarnLimit = fahrenheit_to_celsius($highWarnLimit);
|
||||
}
|
||||
discover_sensor($valid['sensor'], 'temperature', $device, $num_oid, $prefix . 'LiveRaw.' . $index, 'webmon', $descr, '1', '1', $lowLimit, $lowWarnLimit, $highWarnLimit, $highLimit, $value, 'snmp', null, null, $user_function, $group);
|
||||
}
|
||||
}
|
||||
|
||||
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);
|
||||
}
|
||||
|
@@ -475,13 +475,13 @@
|
||||
"sensor_class": "humidity",
|
||||
"poller_type": "snmp",
|
||||
"sensor_oid": ".1.3.6.1.4.1.994.3.4.7.18.1.66.1.0",
|
||||
"sensor_index": "1",
|
||||
"sensor_index": "pSlot1LiveRaw.1.0",
|
||||
"sensor_type": "webmon",
|
||||
"sensor_descr": "Humidity",
|
||||
"group": null,
|
||||
"group": "pSlot1",
|
||||
"sensor_divisor": 1,
|
||||
"sensor_multiplier": 1,
|
||||
"sensor_current": 8.47,
|
||||
"sensor_current": 8.4700000000000006,
|
||||
"sensor_limit": 75,
|
||||
"sensor_limit_warn": 65,
|
||||
"sensor_limit_low": 5,
|
||||
@@ -499,16 +499,16 @@
|
||||
"sensor_class": "temperature",
|
||||
"poller_type": "snmp",
|
||||
"sensor_oid": ".1.3.6.1.4.1.994.3.4.7.18.1.66.2.0",
|
||||
"sensor_index": "2",
|
||||
"sensor_index": "pSlot1LiveRaw.2.0",
|
||||
"sensor_type": "webmon",
|
||||
"sensor_descr": "Temperature",
|
||||
"group": null,
|
||||
"group": "pSlot1",
|
||||
"sensor_divisor": 1,
|
||||
"sensor_multiplier": 1,
|
||||
"sensor_current": 20.06,
|
||||
"sensor_limit": 32.22,
|
||||
"sensor_limit_warn": 26.67,
|
||||
"sensor_limit_low": 1.67,
|
||||
"sensor_current": 20.059999999999999,
|
||||
"sensor_limit": 32.219999999999999,
|
||||
"sensor_limit_warn": 26.670000000000002,
|
||||
"sensor_limit_low": 1.6699999999999999,
|
||||
"sensor_limit_low_warn": 10,
|
||||
"sensor_alert": 1,
|
||||
"sensor_custom": "No",
|
574
tests/data/webmon_matrix.json
Normal file
574
tests/data/webmon_matrix.json
Normal file
@@ -0,0 +1,574 @@
|
||||
{
|
||||
"os": {
|
||||
"discovery": {
|
||||
"devices": [
|
||||
{
|
||||
"sysName": "<private>",
|
||||
"sysObjectID": ".1.3.6.1.4.1.994.3.4",
|
||||
"sysDescr": "WebMon Matrix",
|
||||
"sysContact": null,
|
||||
"version": null,
|
||||
"hardware": null,
|
||||
"features": null,
|
||||
"os": "webmon",
|
||||
"type": "environment",
|
||||
"serial": null,
|
||||
"icon": "dantel.png",
|
||||
"location": null
|
||||
}
|
||||
]
|
||||
},
|
||||
"poller": {
|
||||
"devices": [
|
||||
{
|
||||
"sysName": "<private>",
|
||||
"sysObjectID": ".1.3.6.1.4.1.994.3.4",
|
||||
"sysDescr": "WebMon Matrix",
|
||||
"sysContact": "<private>",
|
||||
"version": null,
|
||||
"hardware": null,
|
||||
"features": null,
|
||||
"os": "webmon",
|
||||
"type": "environment",
|
||||
"serial": null,
|
||||
"icon": "dantel.png",
|
||||
"location": "<private>"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"ports": {
|
||||
"discovery": {
|
||||
"ports": [
|
||||
{
|
||||
"port_descr_type": null,
|
||||
"port_descr_descr": null,
|
||||
"port_descr_circuit": null,
|
||||
"port_descr_speed": null,
|
||||
"port_descr_notes": null,
|
||||
"ifDescr": "Nucleus NET Software Loopback Interface",
|
||||
"ifName": "Nucleus NET Software Loopback Interface",
|
||||
"portName": null,
|
||||
"ifIndex": 1,
|
||||
"ifSpeed": null,
|
||||
"ifConnectorPresent": null,
|
||||
"ifPromiscuousMode": null,
|
||||
"ifHighSpeed": null,
|
||||
"ifOperStatus": null,
|
||||
"ifOperStatus_prev": null,
|
||||
"ifAdminStatus": null,
|
||||
"ifAdminStatus_prev": null,
|
||||
"ifDuplex": null,
|
||||
"ifMtu": null,
|
||||
"ifType": "softwareLoopback",
|
||||
"ifAlias": "Nucleus NET Software Loopback Interface",
|
||||
"ifPhysAddress": null,
|
||||
"ifHardType": null,
|
||||
"ifLastChange": 0,
|
||||
"ifVlan": "",
|
||||
"ifTrunk": null,
|
||||
"counter_in": null,
|
||||
"counter_out": null,
|
||||
"ignore": 0,
|
||||
"disabled": 0,
|
||||
"detailed": 0,
|
||||
"deleted": 0,
|
||||
"pagpOperationMode": null,
|
||||
"pagpPortState": null,
|
||||
"pagpPartnerDeviceId": null,
|
||||
"pagpPartnerLearnMethod": null,
|
||||
"pagpPartnerIfIndex": null,
|
||||
"pagpPartnerGroupIfIndex": null,
|
||||
"pagpPartnerDeviceName": null,
|
||||
"pagpEthcOperationMode": null,
|
||||
"pagpDeviceId": null,
|
||||
"pagpGroupIfIndex": null,
|
||||
"ifInUcastPkts": null,
|
||||
"ifInUcastPkts_prev": null,
|
||||
"ifInUcastPkts_delta": null,
|
||||
"ifInUcastPkts_rate": null,
|
||||
"ifOutUcastPkts": null,
|
||||
"ifOutUcastPkts_prev": null,
|
||||
"ifOutUcastPkts_delta": null,
|
||||
"ifOutUcastPkts_rate": null,
|
||||
"ifInErrors": null,
|
||||
"ifInErrors_prev": null,
|
||||
"ifInErrors_delta": null,
|
||||
"ifInErrors_rate": null,
|
||||
"ifOutErrors": null,
|
||||
"ifOutErrors_prev": null,
|
||||
"ifOutErrors_delta": null,
|
||||
"ifOutErrors_rate": null,
|
||||
"ifInOctets": null,
|
||||
"ifInOctets_prev": null,
|
||||
"ifInOctets_delta": null,
|
||||
"ifInOctets_rate": null,
|
||||
"ifOutOctets": null,
|
||||
"ifOutOctets_prev": null,
|
||||
"ifOutOctets_delta": null,
|
||||
"ifOutOctets_rate": null,
|
||||
"poll_prev": null,
|
||||
"ifInNUcastPkts": null,
|
||||
"ifInNUcastPkts_prev": null,
|
||||
"ifInNUcastPkts_delta": null,
|
||||
"ifInNUcastPkts_rate": null,
|
||||
"ifOutNUcastPkts": null,
|
||||
"ifOutNUcastPkts_prev": null,
|
||||
"ifOutNUcastPkts_delta": null,
|
||||
"ifOutNUcastPkts_rate": null,
|
||||
"ifInDiscards": null,
|
||||
"ifInDiscards_prev": null,
|
||||
"ifInDiscards_delta": null,
|
||||
"ifInDiscards_rate": null,
|
||||
"ifOutDiscards": null,
|
||||
"ifOutDiscards_prev": null,
|
||||
"ifOutDiscards_delta": null,
|
||||
"ifOutDiscards_rate": null,
|
||||
"ifInUnknownProtos": null,
|
||||
"ifInUnknownProtos_prev": null,
|
||||
"ifInUnknownProtos_delta": null,
|
||||
"ifInUnknownProtos_rate": null,
|
||||
"ifInBroadcastPkts": null,
|
||||
"ifInBroadcastPkts_prev": null,
|
||||
"ifInBroadcastPkts_delta": null,
|
||||
"ifInBroadcastPkts_rate": null,
|
||||
"ifOutBroadcastPkts": null,
|
||||
"ifOutBroadcastPkts_prev": null,
|
||||
"ifOutBroadcastPkts_delta": null,
|
||||
"ifOutBroadcastPkts_rate": null,
|
||||
"ifInMulticastPkts": null,
|
||||
"ifInMulticastPkts_prev": null,
|
||||
"ifInMulticastPkts_delta": null,
|
||||
"ifInMulticastPkts_rate": null,
|
||||
"ifOutMulticastPkts": null,
|
||||
"ifOutMulticastPkts_prev": null,
|
||||
"ifOutMulticastPkts_delta": null,
|
||||
"ifOutMulticastPkts_rate": null
|
||||
},
|
||||
{
|
||||
"port_descr_type": null,
|
||||
"port_descr_descr": null,
|
||||
"port_descr_circuit": null,
|
||||
"port_descr_speed": null,
|
||||
"port_descr_notes": null,
|
||||
"ifDescr": "MFC5272 Ethernet: Software revision 1.0",
|
||||
"ifName": "MFC5272 Ethernet: Software revision 1.0",
|
||||
"portName": null,
|
||||
"ifIndex": 2,
|
||||
"ifSpeed": null,
|
||||
"ifConnectorPresent": null,
|
||||
"ifPromiscuousMode": null,
|
||||
"ifHighSpeed": null,
|
||||
"ifOperStatus": null,
|
||||
"ifOperStatus_prev": null,
|
||||
"ifAdminStatus": null,
|
||||
"ifAdminStatus_prev": null,
|
||||
"ifDuplex": null,
|
||||
"ifMtu": null,
|
||||
"ifType": "ethernetCsmacd",
|
||||
"ifAlias": "MFC5272 Ethernet: Software revision 1.0",
|
||||
"ifPhysAddress": null,
|
||||
"ifHardType": null,
|
||||
"ifLastChange": 0,
|
||||
"ifVlan": "",
|
||||
"ifTrunk": null,
|
||||
"counter_in": null,
|
||||
"counter_out": null,
|
||||
"ignore": 0,
|
||||
"disabled": 0,
|
||||
"detailed": 0,
|
||||
"deleted": 0,
|
||||
"pagpOperationMode": null,
|
||||
"pagpPortState": null,
|
||||
"pagpPartnerDeviceId": null,
|
||||
"pagpPartnerLearnMethod": null,
|
||||
"pagpPartnerIfIndex": null,
|
||||
"pagpPartnerGroupIfIndex": null,
|
||||
"pagpPartnerDeviceName": null,
|
||||
"pagpEthcOperationMode": null,
|
||||
"pagpDeviceId": null,
|
||||
"pagpGroupIfIndex": null,
|
||||
"ifInUcastPkts": null,
|
||||
"ifInUcastPkts_prev": null,
|
||||
"ifInUcastPkts_delta": null,
|
||||
"ifInUcastPkts_rate": null,
|
||||
"ifOutUcastPkts": null,
|
||||
"ifOutUcastPkts_prev": null,
|
||||
"ifOutUcastPkts_delta": null,
|
||||
"ifOutUcastPkts_rate": null,
|
||||
"ifInErrors": null,
|
||||
"ifInErrors_prev": null,
|
||||
"ifInErrors_delta": null,
|
||||
"ifInErrors_rate": null,
|
||||
"ifOutErrors": null,
|
||||
"ifOutErrors_prev": null,
|
||||
"ifOutErrors_delta": null,
|
||||
"ifOutErrors_rate": null,
|
||||
"ifInOctets": null,
|
||||
"ifInOctets_prev": null,
|
||||
"ifInOctets_delta": null,
|
||||
"ifInOctets_rate": null,
|
||||
"ifOutOctets": null,
|
||||
"ifOutOctets_prev": null,
|
||||
"ifOutOctets_delta": null,
|
||||
"ifOutOctets_rate": null,
|
||||
"poll_prev": null,
|
||||
"ifInNUcastPkts": null,
|
||||
"ifInNUcastPkts_prev": null,
|
||||
"ifInNUcastPkts_delta": null,
|
||||
"ifInNUcastPkts_rate": null,
|
||||
"ifOutNUcastPkts": null,
|
||||
"ifOutNUcastPkts_prev": null,
|
||||
"ifOutNUcastPkts_delta": null,
|
||||
"ifOutNUcastPkts_rate": null,
|
||||
"ifInDiscards": null,
|
||||
"ifInDiscards_prev": null,
|
||||
"ifInDiscards_delta": null,
|
||||
"ifInDiscards_rate": null,
|
||||
"ifOutDiscards": null,
|
||||
"ifOutDiscards_prev": null,
|
||||
"ifOutDiscards_delta": null,
|
||||
"ifOutDiscards_rate": null,
|
||||
"ifInUnknownProtos": null,
|
||||
"ifInUnknownProtos_prev": null,
|
||||
"ifInUnknownProtos_delta": null,
|
||||
"ifInUnknownProtos_rate": null,
|
||||
"ifInBroadcastPkts": null,
|
||||
"ifInBroadcastPkts_prev": null,
|
||||
"ifInBroadcastPkts_delta": null,
|
||||
"ifInBroadcastPkts_rate": null,
|
||||
"ifOutBroadcastPkts": null,
|
||||
"ifOutBroadcastPkts_prev": null,
|
||||
"ifOutBroadcastPkts_delta": null,
|
||||
"ifOutBroadcastPkts_rate": null,
|
||||
"ifInMulticastPkts": null,
|
||||
"ifInMulticastPkts_prev": null,
|
||||
"ifInMulticastPkts_delta": null,
|
||||
"ifInMulticastPkts_rate": null,
|
||||
"ifOutMulticastPkts": null,
|
||||
"ifOutMulticastPkts_prev": null,
|
||||
"ifOutMulticastPkts_delta": null,
|
||||
"ifOutMulticastPkts_rate": null
|
||||
}
|
||||
]
|
||||
},
|
||||
"poller": {
|
||||
"ports": [
|
||||
{
|
||||
"port_descr_type": null,
|
||||
"port_descr_descr": null,
|
||||
"port_descr_circuit": null,
|
||||
"port_descr_speed": null,
|
||||
"port_descr_notes": null,
|
||||
"ifDescr": "Nucleus NET Software Loopback Interface",
|
||||
"ifName": "Nucleus NET Software Loopback Interface",
|
||||
"portName": null,
|
||||
"ifIndex": 1,
|
||||
"ifSpeed": 10000000,
|
||||
"ifConnectorPresent": null,
|
||||
"ifPromiscuousMode": null,
|
||||
"ifHighSpeed": null,
|
||||
"ifOperStatus": "up",
|
||||
"ifOperStatus_prev": null,
|
||||
"ifAdminStatus": "up",
|
||||
"ifAdminStatus_prev": null,
|
||||
"ifDuplex": null,
|
||||
"ifMtu": 1500,
|
||||
"ifType": "softwareLoopback",
|
||||
"ifAlias": "Nucleus NET Software Loopback Interface",
|
||||
"ifPhysAddress": "303a303a303a",
|
||||
"ifHardType": null,
|
||||
"ifLastChange": 0,
|
||||
"ifVlan": "",
|
||||
"ifTrunk": null,
|
||||
"counter_in": null,
|
||||
"counter_out": null,
|
||||
"ignore": 0,
|
||||
"disabled": 0,
|
||||
"detailed": 0,
|
||||
"deleted": 0,
|
||||
"pagpOperationMode": null,
|
||||
"pagpPortState": null,
|
||||
"pagpPartnerDeviceId": null,
|
||||
"pagpPartnerLearnMethod": null,
|
||||
"pagpPartnerIfIndex": null,
|
||||
"pagpPartnerGroupIfIndex": null,
|
||||
"pagpPartnerDeviceName": null,
|
||||
"pagpEthcOperationMode": null,
|
||||
"pagpDeviceId": null,
|
||||
"pagpGroupIfIndex": null,
|
||||
"ifInUcastPkts": 61964211,
|
||||
"ifInUcastPkts_prev": 0,
|
||||
"ifInUcastPkts_delta": null,
|
||||
"ifInUcastPkts_rate": null,
|
||||
"ifOutUcastPkts": 61964350,
|
||||
"ifOutUcastPkts_prev": 0,
|
||||
"ifOutUcastPkts_delta": null,
|
||||
"ifOutUcastPkts_rate": null,
|
||||
"ifInErrors": 0,
|
||||
"ifInErrors_prev": 0,
|
||||
"ifInErrors_delta": null,
|
||||
"ifInErrors_rate": null,
|
||||
"ifOutErrors": 0,
|
||||
"ifOutErrors_prev": 0,
|
||||
"ifOutErrors_delta": null,
|
||||
"ifOutErrors_rate": null,
|
||||
"ifInOctets": 290403706,
|
||||
"ifInOctets_prev": 0,
|
||||
"ifInOctets_delta": null,
|
||||
"ifInOctets_rate": null,
|
||||
"ifOutOctets": 290402596,
|
||||
"ifOutOctets_prev": 0,
|
||||
"ifOutOctets_delta": null,
|
||||
"ifOutOctets_rate": null,
|
||||
"poll_prev": null,
|
||||
"ifInNUcastPkts": 0,
|
||||
"ifInNUcastPkts_prev": 0,
|
||||
"ifInNUcastPkts_delta": null,
|
||||
"ifInNUcastPkts_rate": null,
|
||||
"ifOutNUcastPkts": 0,
|
||||
"ifOutNUcastPkts_prev": 0,
|
||||
"ifOutNUcastPkts_delta": null,
|
||||
"ifOutNUcastPkts_rate": null,
|
||||
"ifInDiscards": 0,
|
||||
"ifInDiscards_prev": 0,
|
||||
"ifInDiscards_delta": null,
|
||||
"ifInDiscards_rate": null,
|
||||
"ifOutDiscards": 0,
|
||||
"ifOutDiscards_prev": 0,
|
||||
"ifOutDiscards_delta": null,
|
||||
"ifOutDiscards_rate": null,
|
||||
"ifInUnknownProtos": 0,
|
||||
"ifInUnknownProtos_prev": 0,
|
||||
"ifInUnknownProtos_delta": null,
|
||||
"ifInUnknownProtos_rate": null,
|
||||
"ifInBroadcastPkts": 0,
|
||||
"ifInBroadcastPkts_prev": 0,
|
||||
"ifInBroadcastPkts_delta": null,
|
||||
"ifInBroadcastPkts_rate": null,
|
||||
"ifOutBroadcastPkts": 0,
|
||||
"ifOutBroadcastPkts_prev": 0,
|
||||
"ifOutBroadcastPkts_delta": null,
|
||||
"ifOutBroadcastPkts_rate": null,
|
||||
"ifInMulticastPkts": 0,
|
||||
"ifInMulticastPkts_prev": 0,
|
||||
"ifInMulticastPkts_delta": null,
|
||||
"ifInMulticastPkts_rate": null,
|
||||
"ifOutMulticastPkts": 0,
|
||||
"ifOutMulticastPkts_prev": 0,
|
||||
"ifOutMulticastPkts_delta": null,
|
||||
"ifOutMulticastPkts_rate": null
|
||||
},
|
||||
{
|
||||
"port_descr_type": "mfc5272 ethernet",
|
||||
"port_descr_descr": "Software revision 1.0",
|
||||
"port_descr_circuit": null,
|
||||
"port_descr_speed": null,
|
||||
"port_descr_notes": null,
|
||||
"ifDescr": "MFC5272 Ethernet: Software revision 1.0",
|
||||
"ifName": "MFC5272 Ethernet: Software revision 1.0",
|
||||
"portName": null,
|
||||
"ifIndex": 2,
|
||||
"ifSpeed": 100000000,
|
||||
"ifConnectorPresent": null,
|
||||
"ifPromiscuousMode": null,
|
||||
"ifHighSpeed": null,
|
||||
"ifOperStatus": "up",
|
||||
"ifOperStatus_prev": null,
|
||||
"ifAdminStatus": "up",
|
||||
"ifAdminStatus_prev": null,
|
||||
"ifDuplex": null,
|
||||
"ifMtu": 1500,
|
||||
"ifType": "ethernetCsmacd",
|
||||
"ifAlias": "MFC5272 Ethernet: Software revision 1.0",
|
||||
"ifPhysAddress": "303a32303a65",
|
||||
"ifHardType": null,
|
||||
"ifLastChange": 0,
|
||||
"ifVlan": "",
|
||||
"ifTrunk": null,
|
||||
"counter_in": null,
|
||||
"counter_out": null,
|
||||
"ignore": 0,
|
||||
"disabled": 0,
|
||||
"detailed": 0,
|
||||
"deleted": 0,
|
||||
"pagpOperationMode": null,
|
||||
"pagpPortState": null,
|
||||
"pagpPartnerDeviceId": null,
|
||||
"pagpPartnerLearnMethod": null,
|
||||
"pagpPartnerIfIndex": null,
|
||||
"pagpPartnerGroupIfIndex": null,
|
||||
"pagpPartnerDeviceName": null,
|
||||
"pagpEthcOperationMode": null,
|
||||
"pagpDeviceId": null,
|
||||
"pagpGroupIfIndex": null,
|
||||
"ifInUcastPkts": 3644200,
|
||||
"ifInUcastPkts_prev": 0,
|
||||
"ifInUcastPkts_delta": null,
|
||||
"ifInUcastPkts_rate": null,
|
||||
"ifOutUcastPkts": 6464470,
|
||||
"ifOutUcastPkts_prev": 0,
|
||||
"ifOutUcastPkts_delta": null,
|
||||
"ifOutUcastPkts_rate": null,
|
||||
"ifInErrors": 0,
|
||||
"ifInErrors_prev": 0,
|
||||
"ifInErrors_delta": null,
|
||||
"ifInErrors_rate": null,
|
||||
"ifOutErrors": 0,
|
||||
"ifOutErrors_prev": 0,
|
||||
"ifOutErrors_delta": null,
|
||||
"ifOutErrors_rate": null,
|
||||
"ifInOctets": 338959252,
|
||||
"ifInOctets_prev": 0,
|
||||
"ifInOctets_delta": null,
|
||||
"ifInOctets_rate": null,
|
||||
"ifOutOctets": 311959356,
|
||||
"ifOutOctets_prev": 0,
|
||||
"ifOutOctets_delta": null,
|
||||
"ifOutOctets_rate": null,
|
||||
"poll_prev": null,
|
||||
"ifInNUcastPkts": 48448,
|
||||
"ifInNUcastPkts_prev": 0,
|
||||
"ifInNUcastPkts_delta": null,
|
||||
"ifInNUcastPkts_rate": null,
|
||||
"ifOutNUcastPkts": 4,
|
||||
"ifOutNUcastPkts_prev": 0,
|
||||
"ifOutNUcastPkts_delta": null,
|
||||
"ifOutNUcastPkts_rate": null,
|
||||
"ifInDiscards": 0,
|
||||
"ifInDiscards_prev": 0,
|
||||
"ifInDiscards_delta": null,
|
||||
"ifInDiscards_rate": null,
|
||||
"ifOutDiscards": 0,
|
||||
"ifOutDiscards_prev": 0,
|
||||
"ifOutDiscards_delta": null,
|
||||
"ifOutDiscards_rate": null,
|
||||
"ifInUnknownProtos": 167,
|
||||
"ifInUnknownProtos_prev": 0,
|
||||
"ifInUnknownProtos_delta": null,
|
||||
"ifInUnknownProtos_rate": null,
|
||||
"ifInBroadcastPkts": 0,
|
||||
"ifInBroadcastPkts_prev": 0,
|
||||
"ifInBroadcastPkts_delta": null,
|
||||
"ifInBroadcastPkts_rate": null,
|
||||
"ifOutBroadcastPkts": 0,
|
||||
"ifOutBroadcastPkts_prev": 0,
|
||||
"ifOutBroadcastPkts_delta": null,
|
||||
"ifOutBroadcastPkts_rate": null,
|
||||
"ifInMulticastPkts": 0,
|
||||
"ifInMulticastPkts_prev": 0,
|
||||
"ifInMulticastPkts_delta": null,
|
||||
"ifInMulticastPkts_rate": null,
|
||||
"ifOutMulticastPkts": 0,
|
||||
"ifOutMulticastPkts_prev": 0,
|
||||
"ifOutMulticastPkts_delta": null,
|
||||
"ifOutMulticastPkts_rate": null
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"sensors": {
|
||||
"discovery": {
|
||||
"sensors": [
|
||||
{
|
||||
"sensor_deleted": 0,
|
||||
"sensor_class": "count",
|
||||
"poller_type": "snmp",
|
||||
"sensor_oid": ".1.3.6.1.4.1.994.3.4.7.18.1.66.1",
|
||||
"sensor_index": "pSlot1LiveRaw.1",
|
||||
"sensor_type": "webmon",
|
||||
"sensor_descr": "Propane Sensor",
|
||||
"group": "pSlot1",
|
||||
"sensor_divisor": 1,
|
||||
"sensor_multiplier": 1,
|
||||
"sensor_current": 36,
|
||||
"sensor_limit": 80,
|
||||
"sensor_limit_warn": 40,
|
||||
"sensor_limit_low": 10,
|
||||
"sensor_limit_low_warn": 20,
|
||||
"sensor_alert": 1,
|
||||
"sensor_custom": "No",
|
||||
"entPhysicalIndex": null,
|
||||
"entPhysicalIndex_measured": null,
|
||||
"sensor_prev": null,
|
||||
"user_func": null,
|
||||
"state_name": null
|
||||
},
|
||||
{
|
||||
"sensor_deleted": 0,
|
||||
"sensor_class": "humidity",
|
||||
"poller_type": "snmp",
|
||||
"sensor_oid": ".1.3.6.1.4.1.994.3.4.7.6.1.66.1",
|
||||
"sensor_index": "pOnboardSensorLiveRaw.1",
|
||||
"sensor_type": "webmon",
|
||||
"sensor_descr": "Humidity",
|
||||
"group": "pOnboardSensor",
|
||||
"sensor_divisor": 1,
|
||||
"sensor_multiplier": 1,
|
||||
"sensor_current": 15.4,
|
||||
"sensor_limit": 80,
|
||||
"sensor_limit_warn": 50,
|
||||
"sensor_limit_low": 20,
|
||||
"sensor_limit_low_warn": 25,
|
||||
"sensor_alert": 1,
|
||||
"sensor_custom": "No",
|
||||
"entPhysicalIndex": null,
|
||||
"entPhysicalIndex_measured": null,
|
||||
"sensor_prev": null,
|
||||
"user_func": null,
|
||||
"state_name": null
|
||||
},
|
||||
{
|
||||
"sensor_deleted": 0,
|
||||
"sensor_class": "temperature",
|
||||
"poller_type": "snmp",
|
||||
"sensor_oid": ".1.3.6.1.4.1.994.3.4.7.6.1.66.2",
|
||||
"sensor_index": "pOnboardSensorLiveRaw.2",
|
||||
"sensor_type": "webmon",
|
||||
"sensor_descr": "Temperature",
|
||||
"group": "pOnboardSensor",
|
||||
"sensor_divisor": 1,
|
||||
"sensor_multiplier": 1,
|
||||
"sensor_current": 21.609999999999999,
|
||||
"sensor_limit": 26.670000000000002,
|
||||
"sensor_limit_warn": 23.890000000000001,
|
||||
"sensor_limit_low": -6.6699999999999999,
|
||||
"sensor_limit_low_warn": 4.4400000000000004,
|
||||
"sensor_alert": 1,
|
||||
"sensor_custom": "No",
|
||||
"entPhysicalIndex": null,
|
||||
"entPhysicalIndex_measured": null,
|
||||
"sensor_prev": null,
|
||||
"user_func": "fahrenheit_to_celsius",
|
||||
"state_name": null
|
||||
},
|
||||
{
|
||||
"sensor_deleted": 0,
|
||||
"sensor_class": "temperature",
|
||||
"poller_type": "snmp",
|
||||
"sensor_oid": ".1.3.6.1.4.1.994.3.4.7.18.1.66.2",
|
||||
"sensor_index": "pSlot1LiveRaw.2",
|
||||
"sensor_type": "webmon",
|
||||
"sensor_descr": "Temp",
|
||||
"group": "pSlot1",
|
||||
"sensor_divisor": 1,
|
||||
"sensor_multiplier": 1,
|
||||
"sensor_current": 67.5,
|
||||
"sensor_limit": 80,
|
||||
"sensor_limit_warn": 70,
|
||||
"sensor_limit_low": 35,
|
||||
"sensor_limit_low_warn": 40,
|
||||
"sensor_alert": 1,
|
||||
"sensor_custom": "No",
|
||||
"entPhysicalIndex": null,
|
||||
"entPhysicalIndex_measured": null,
|
||||
"sensor_prev": null,
|
||||
"user_func": null,
|
||||
"state_name": null
|
||||
}
|
||||
],
|
||||
"state_indexes": []
|
||||
},
|
||||
"poller": "matches discovery"
|
||||
}
|
||||
}
|
1205
tests/snmpsim/webmon_matrix.snmprec
Normal file
1205
tests/snmpsim/webmon_matrix.snmprec
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user