Remove broken routeros signal sensor (#9650)

Discovers 2 of 6 found in the test data then updates it to not match.
Setting the wrong oid.
Tracking two specific macs on a single AP that don't match the label.
If they roam it won't change until next discovery.

If this is wanted, it should be written in the wireless section.
This commit is contained in:
Tony Murray
2019-01-11 11:51:23 -06:00
committed by GitHub
parent 1b29acc275
commit d8a751b021
2 changed files with 1 additions and 524 deletions

View File

@@ -1,20 +0,0 @@
<?php
echo 'MIKROTIK-MIB ';
$divisor = 1;
$type = 'routeros';
$oids = snmp_walk($device, 'mtxrWlRtabStrength', '-OsqnU', 'MIKROTIK-MIB');
foreach (explode("\n", $oids) as $data) {
$data = trim($data);
if ($data) {
list($oid,$value) = explode(' ', $data, 2);
$split_oid = explode('.', $oid);
$index = $split_oid[(count($split_oid) - 1)];
$descr = trim(snmp_get($device, '.1.3.6.1.4.1.14988.1.1.14.1.1.2.'.$index, '-Oqv'), '"') . ' Signal';
discover_sensor($valid['sensor'], 'signal', $device, $oid, $index, $type, $descr, $divisor, '1', null, null, null, null, $value);
}
}

View File

@@ -2568,52 +2568,6 @@
"user_func": null,
"state_name": null
},
{
"sensor_deleted": 0,
"sensor_class": "signal",
"poller_type": "snmp",
"sensor_oid": ".1.3.6.1.4.1.14988.1.1.1.2.1.3.244.14.34.43.52.123.1",
"sensor_index": "1",
"sensor_type": "routeros",
"sensor_descr": "wlan1 Signal",
"sensor_divisor": 1,
"sensor_multiplier": 1,
"sensor_current": -82,
"sensor_limit": -30,
"sensor_limit_warn": null,
"sensor_limit_low": -80,
"sensor_limit_low_warn": null,
"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": "signal",
"poller_type": "snmp",
"sensor_oid": ".1.3.6.1.4.1.14988.1.1.1.2.1.3.156.92.142.164.164.119.9",
"sensor_index": "9",
"sensor_type": "routeros",
"sensor_descr": "wlan4 Signal",
"sensor_divisor": 1,
"sensor_multiplier": 1,
"sensor_current": -63,
"sensor_limit": -30,
"sensor_limit_warn": null,
"sensor_limit_low": -80,
"sensor_limit_low_warn": null,
"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": "state",
@@ -2909,464 +2863,7 @@
}
]
},
"poller": {
"sensors": [
{
"sensor_deleted": 0,
"sensor_class": "current",
"poller_type": "snmp",
"sensor_oid": ".1.3.6.1.4.1.14988.1.1.19.1.1.8.25",
"sensor_index": "mtxrOpticalTxBiasCurrent.25",
"sensor_type": "routeros",
"sensor_descr": "sfp1 Tx",
"sensor_divisor": 1000,
"sensor_multiplier": 1,
"sensor_current": 0.007,
"sensor_limit": 0.0105,
"sensor_limit_warn": null,
"sensor_limit_low": null,
"sensor_limit_low_warn": null,
"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": "current",
"poller_type": "snmp",
"sensor_oid": ".1.3.6.1.4.1.14988.1.1.15.1.1.5.7",
"sensor_index": "mtxrPOECurrent.7",
"sensor_type": "routeros",
"sensor_descr": "ether5 POE",
"sensor_divisor": 1000,
"sensor_multiplier": 1,
"sensor_current": 0,
"sensor_limit": 0,
"sensor_limit_warn": null,
"sensor_limit_low": null,
"sensor_limit_low_warn": null,
"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": "dbm",
"poller_type": "snmp",
"sensor_oid": ".1.3.6.1.4.1.14988.1.1.19.1.1.10.25",
"sensor_index": "mtxrOpticalRxPower.25",
"sensor_type": "routeros",
"sensor_descr": "sfp1 Rx",
"sensor_divisor": 1000,
"sensor_multiplier": 1,
"sensor_current": -5.673,
"sensor_limit": -5.38935,
"sensor_limit_warn": null,
"sensor_limit_low": -5.95665,
"sensor_limit_low_warn": null,
"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": "dbm",
"poller_type": "snmp",
"sensor_oid": ".1.3.6.1.4.1.14988.1.1.19.1.1.9.25",
"sensor_index": "mtxrOpticalTxPower.25",
"sensor_type": "routeros",
"sensor_descr": "sfp1 Tx",
"sensor_divisor": 1000,
"sensor_multiplier": 1,
"sensor_current": -4.879,
"sensor_limit": -4.63505,
"sensor_limit_warn": null,
"sensor_limit_low": -5.12295,
"sensor_limit_low_warn": null,
"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": "power",
"poller_type": "snmp",
"sensor_oid": ".1.3.6.1.4.1.14988.1.1.15.1.1.6.7",
"sensor_index": "mtxrPOEPower.7",
"sensor_type": "routeros",
"sensor_descr": "ether5 POE",
"sensor_divisor": 10,
"sensor_multiplier": 1,
"sensor_current": 0,
"sensor_limit": 0,
"sensor_limit_warn": null,
"sensor_limit_low": null,
"sensor_limit_low_warn": null,
"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": "signal",
"poller_type": "snmp",
"sensor_oid": ".1.3.6.1.4.1.14988.1.1.1.2.1.3.244.14.34.43.52.123.1",
"sensor_index": "1",
"sensor_type": "routeros",
"sensor_descr": "wlan1 Signal",
"sensor_divisor": 1,
"sensor_multiplier": 1,
"sensor_current": -82,
"sensor_limit": -30,
"sensor_limit_warn": null,
"sensor_limit_low": -80,
"sensor_limit_low_warn": null,
"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": "signal",
"poller_type": "snmp",
"sensor_oid": ".1.3.6.1.4.1.14988.1.1.1.2.1.3.156.92.142.164.164.119.9",
"sensor_index": "9",
"sensor_type": "routeros",
"sensor_descr": "wlan4 Signal",
"sensor_divisor": 1,
"sensor_multiplier": 1,
"sensor_current": -77,
"sensor_limit": -30,
"sensor_limit_warn": null,
"sensor_limit_low": -80,
"sensor_limit_low_warn": null,
"sensor_alert": 1,
"sensor_custom": "No",
"entPhysicalIndex": null,
"entPhysicalIndex_measured": null,
"sensor_prev": -63,
"user_func": null,
"state_name": null
},
{
"sensor_deleted": 0,
"sensor_class": "state",
"poller_type": "snmp",
"sensor_oid": ".1.3.6.1.4.1.14988.1.1.19.1.1.3.25",
"sensor_index": "mtxrOpticalRxLoss.25",
"sensor_type": "mtxrOpticalRxLoss",
"sensor_descr": "sfp1 Rx",
"sensor_divisor": 1,
"sensor_multiplier": 1,
"sensor_current": 0,
"sensor_limit": null,
"sensor_limit_warn": null,
"sensor_limit_low": null,
"sensor_limit_low_warn": null,
"sensor_alert": 1,
"sensor_custom": "No",
"entPhysicalIndex": null,
"entPhysicalIndex_measured": null,
"sensor_prev": null,
"user_func": null,
"state_name": "mtxrOpticalRxLoss"
},
{
"sensor_deleted": 0,
"sensor_class": "state",
"poller_type": "snmp",
"sensor_oid": ".1.3.6.1.4.1.14988.1.1.19.1.1.4.25",
"sensor_index": "mtxrOpticalTxFault.25",
"sensor_type": "mtxrOpticalTxFault",
"sensor_descr": "sfp1 Tx",
"sensor_divisor": 1,
"sensor_multiplier": 1,
"sensor_current": 0,
"sensor_limit": null,
"sensor_limit_warn": null,
"sensor_limit_low": null,
"sensor_limit_low_warn": null,
"sensor_alert": 1,
"sensor_custom": "No",
"entPhysicalIndex": null,
"entPhysicalIndex_measured": null,
"sensor_prev": null,
"user_func": null,
"state_name": "mtxrOpticalTxFault"
},
{
"sensor_deleted": 0,
"sensor_class": "state",
"poller_type": "snmp",
"sensor_oid": ".1.3.6.1.4.1.14988.1.1.1.8.1.4.1",
"sensor_index": "mtxrWl60GConnected.{{ $index ]]",
"sensor_type": "mtxrWl60GConnected",
"sensor_descr": "Station Connected",
"sensor_divisor": 1,
"sensor_multiplier": 1,
"sensor_current": 1,
"sensor_limit": null,
"sensor_limit_warn": null,
"sensor_limit_low": null,
"sensor_limit_low_warn": null,
"sensor_alert": 1,
"sensor_custom": "No",
"entPhysicalIndex": null,
"entPhysicalIndex_measured": null,
"sensor_prev": null,
"user_func": null,
"state_name": "mtxrWl60GConnected"
},
{
"sensor_deleted": 0,
"sensor_class": "state",
"poller_type": "snmp",
"sensor_oid": ".1.3.6.1.4.1.14988.1.1.1.8.1.2.1",
"sensor_index": "mtxrWl60GMode.1",
"sensor_type": "mtxrWl60GMode",
"sensor_descr": "Mode",
"sensor_divisor": 1,
"sensor_multiplier": 1,
"sensor_current": 1,
"sensor_limit": null,
"sensor_limit_warn": null,
"sensor_limit_low": null,
"sensor_limit_low_warn": null,
"sensor_alert": 1,
"sensor_custom": "No",
"entPhysicalIndex": null,
"entPhysicalIndex_measured": null,
"sensor_prev": null,
"user_func": null,
"state_name": "mtxrWl60GMode"
},
{
"sensor_deleted": 0,
"sensor_class": "temperature",
"poller_type": "snmp",
"sensor_oid": ".1.3.6.1.4.1.14988.1.1.3.10.0",
"sensor_index": "0",
"sensor_type": "routeros",
"sensor_descr": "Temperature 0",
"sensor_divisor": 10,
"sensor_multiplier": 1,
"sensor_current": 33,
"sensor_limit": 70,
"sensor_limit_warn": 65,
"sensor_limit_low": -40,
"sensor_limit_low_warn": -35,
"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.14988.1.1.19.1.1.6.25",
"sensor_index": "mtxrOpticalTemperature.25",
"sensor_type": "routeros",
"sensor_descr": "sfp1",
"sensor_divisor": 1,
"sensor_multiplier": 1,
"sensor_current": 40,
"sensor_limit": 60,
"sensor_limit_warn": null,
"sensor_limit_low": 30,
"sensor_limit_low_warn": null,
"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": "voltage",
"poller_type": "snmp",
"sensor_oid": ".1.3.6.1.4.1.14988.1.1.3.8.0",
"sensor_index": "0",
"sensor_type": "routeros",
"sensor_descr": "Voltage 0",
"sensor_divisor": 10,
"sensor_multiplier": 1,
"sensor_current": 15.4,
"sensor_limit": 17.71,
"sensor_limit_warn": null,
"sensor_limit_low": 13.09,
"sensor_limit_low_warn": null,
"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": "voltage",
"poller_type": "snmp",
"sensor_oid": ".1.3.6.1.4.1.14988.1.1.19.1.1.7.25",
"sensor_index": "mtxrOpticalSupplyVoltage.25",
"sensor_type": "routeros",
"sensor_descr": "sfp1",
"sensor_divisor": 1000,
"sensor_multiplier": 1,
"sensor_current": 3.302,
"sensor_limit": 3.7973,
"sensor_limit_warn": null,
"sensor_limit_low": 2.8067,
"sensor_limit_low_warn": null,
"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": "voltage",
"poller_type": "snmp",
"sensor_oid": ".1.3.6.1.4.1.14988.1.1.15.1.1.4.7",
"sensor_index": "mtxrPOEVoltage.7",
"sensor_type": "routeros",
"sensor_descr": "ether5 POE",
"sensor_divisor": 10,
"sensor_multiplier": 1,
"sensor_current": 0,
"sensor_limit": 0,
"sensor_limit_warn": null,
"sensor_limit_low": 0,
"sensor_limit_low_warn": null,
"sensor_alert": 1,
"sensor_custom": "No",
"entPhysicalIndex": null,
"entPhysicalIndex_measured": null,
"sensor_prev": null,
"user_func": null,
"state_name": null
}
],
"state_indexes": [
{
"state_name": "mtxrOpticalRxLoss",
"state_descr": "no",
"state_draw_graph": 1,
"state_value": 0,
"state_generic_value": 0
},
{
"state_name": "mtxrOpticalRxLoss",
"state_descr": "yes",
"state_draw_graph": 1,
"state_value": 1,
"state_generic_value": 2
},
{
"state_name": "mtxrOpticalRxLoss",
"state_descr": "null",
"state_draw_graph": 1,
"state_value": 2,
"state_generic_value": 3
},
{
"state_name": "mtxrOpticalTxFault",
"state_descr": "no",
"state_draw_graph": 1,
"state_value": 0,
"state_generic_value": 0
},
{
"state_name": "mtxrOpticalTxFault",
"state_descr": "yes",
"state_draw_graph": 1,
"state_value": 1,
"state_generic_value": 2
},
{
"state_name": "mtxrOpticalTxFault",
"state_descr": "null",
"state_draw_graph": 1,
"state_value": 2,
"state_generic_value": 3
},
{
"state_name": "mtxrWl60GConnected",
"state_descr": "disconnected",
"state_draw_graph": 1,
"state_value": 0,
"state_generic_value": 2
},
{
"state_name": "mtxrWl60GConnected",
"state_descr": "connected",
"state_draw_graph": 1,
"state_value": 1,
"state_generic_value": 0
},
{
"state_name": "mtxrWl60GMode",
"state_descr": "AP Bridge",
"state_draw_graph": 1,
"state_value": 0,
"state_generic_value": 0
},
{
"state_name": "mtxrWl60GMode",
"state_descr": "Station Bridge",
"state_draw_graph": 1,
"state_value": 1,
"state_generic_value": 0
},
{
"state_name": "mtxrWl60GMode",
"state_descr": "Sniff",
"state_draw_graph": 1,
"state_value": 2,
"state_generic_value": 0
},
{
"state_name": "mtxrWl60GMode",
"state_descr": "Bridge",
"state_draw_graph": 1,
"state_value": 3,
"state_generic_value": 0
}
]
}
"poller": "matches discovery"
},
"storage": {
"discovery": {