mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Fix port module wrong null (#15431)
* Fix port module wrong null * Update test data * revert incidental data changes
This commit is contained in:
@@ -684,7 +684,7 @@ foreach ($ports as $port) {
|
||||
}
|
||||
|
||||
if ($port[$oid] != $current_oid && ! isset($current_oid)) {
|
||||
$port['update'][$oid] = ['NULL'];
|
||||
$port['update'][$oid] = null;
|
||||
log_event($oid . ': ' . $port[$oid] . ' -> NULL', $device, 'interface', 4, $port['port_id']);
|
||||
d_echo($oid . ': ' . $port[$oid] . ' -> NULL ', $oid . ' ');
|
||||
} elseif ($port[$oid] != $current_oid) {
|
||||
|
||||
@@ -548,7 +548,7 @@
|
||||
"group": null,
|
||||
"sensor_divisor": 1,
|
||||
"sensor_multiplier": 1,
|
||||
"sensor_current": 14.0,
|
||||
"sensor_current": 14,
|
||||
"sensor_limit": null,
|
||||
"sensor_limit_warn": null,
|
||||
"sensor_limit_low": null,
|
||||
@@ -573,7 +573,7 @@
|
||||
"group": null,
|
||||
"sensor_divisor": 1,
|
||||
"sensor_multiplier": 1,
|
||||
"sensor_current": 14.0,
|
||||
"sensor_current": 14,
|
||||
"sensor_limit": null,
|
||||
"sensor_limit_warn": null,
|
||||
"sensor_limit_low": null,
|
||||
|
||||
@@ -340,7 +340,7 @@
|
||||
"ifSpeed": null,
|
||||
"ifSpeed_prev": 0,
|
||||
"ifConnectorPresent": null,
|
||||
"ifOperStatus": null,
|
||||
"ifOperStatus": "up",
|
||||
"ifOperStatus_prev": null,
|
||||
"ifAdminStatus": null,
|
||||
"ifAdminStatus_prev": null,
|
||||
@@ -440,7 +440,7 @@
|
||||
"ifSpeed": null,
|
||||
"ifSpeed_prev": 0,
|
||||
"ifConnectorPresent": null,
|
||||
"ifOperStatus": null,
|
||||
"ifOperStatus": "up",
|
||||
"ifOperStatus_prev": null,
|
||||
"ifAdminStatus": null,
|
||||
"ifAdminStatus_prev": null,
|
||||
@@ -540,7 +540,7 @@
|
||||
"ifSpeed": null,
|
||||
"ifSpeed_prev": 0,
|
||||
"ifConnectorPresent": null,
|
||||
"ifOperStatus": null,
|
||||
"ifOperStatus": "up",
|
||||
"ifOperStatus_prev": null,
|
||||
"ifAdminStatus": null,
|
||||
"ifAdminStatus_prev": null,
|
||||
|
||||
@@ -3523,7 +3523,7 @@
|
||||
"sensor_limit": 47,
|
||||
"sensor_limit_warn": 42,
|
||||
"sensor_limit_low": -7,
|
||||
"sensor_limit_low_warn": 3.0,
|
||||
"sensor_limit_low_warn": 3,
|
||||
"sensor_alert": 1,
|
||||
"sensor_custom": "No",
|
||||
"entPhysicalIndex": null,
|
||||
@@ -3548,7 +3548,7 @@
|
||||
"sensor_limit": 85,
|
||||
"sensor_limit_warn": 80,
|
||||
"sensor_limit_low": 3,
|
||||
"sensor_limit_low_warn": 8.0,
|
||||
"sensor_limit_low_warn": 8,
|
||||
"sensor_alert": 1,
|
||||
"sensor_custom": "No",
|
||||
"entPhysicalIndex": null,
|
||||
@@ -3573,7 +3573,7 @@
|
||||
"sensor_limit": 85,
|
||||
"sensor_limit_warn": 80,
|
||||
"sensor_limit_low": 3,
|
||||
"sensor_limit_low_warn": 8.0,
|
||||
"sensor_limit_low_warn": 8,
|
||||
"sensor_alert": 1,
|
||||
"sensor_custom": "No",
|
||||
"entPhysicalIndex": null,
|
||||
@@ -3598,7 +3598,7 @@
|
||||
"sensor_limit": 84,
|
||||
"sensor_limit_warn": 79,
|
||||
"sensor_limit_low": 3,
|
||||
"sensor_limit_low_warn": 8.0,
|
||||
"sensor_limit_low_warn": 8,
|
||||
"sensor_alert": 1,
|
||||
"sensor_custom": "No",
|
||||
"entPhysicalIndex": null,
|
||||
@@ -7773,7 +7773,7 @@
|
||||
"sensor_limit": 47,
|
||||
"sensor_limit_warn": 42,
|
||||
"sensor_limit_low": -7,
|
||||
"sensor_limit_low_warn": 3.0,
|
||||
"sensor_limit_low_warn": 3,
|
||||
"sensor_alert": 1,
|
||||
"sensor_custom": "No",
|
||||
"entPhysicalIndex": null,
|
||||
@@ -7798,7 +7798,7 @@
|
||||
"sensor_limit": 85,
|
||||
"sensor_limit_warn": 80,
|
||||
"sensor_limit_low": 3,
|
||||
"sensor_limit_low_warn": 8.0,
|
||||
"sensor_limit_low_warn": 8,
|
||||
"sensor_alert": 1,
|
||||
"sensor_custom": "No",
|
||||
"entPhysicalIndex": null,
|
||||
@@ -7823,7 +7823,7 @@
|
||||
"sensor_limit": 85,
|
||||
"sensor_limit_warn": 80,
|
||||
"sensor_limit_low": 3,
|
||||
"sensor_limit_low_warn": 8.0,
|
||||
"sensor_limit_low_warn": 8,
|
||||
"sensor_alert": 1,
|
||||
"sensor_custom": "No",
|
||||
"entPhysicalIndex": null,
|
||||
@@ -7848,7 +7848,7 @@
|
||||
"sensor_limit": 84,
|
||||
"sensor_limit_warn": 79,
|
||||
"sensor_limit_low": 3,
|
||||
"sensor_limit_low_warn": 8.0,
|
||||
"sensor_limit_low_warn": 8,
|
||||
"sensor_alert": 1,
|
||||
"sensor_custom": "No",
|
||||
"entPhysicalIndex": null,
|
||||
|
||||
@@ -4748,7 +4748,7 @@
|
||||
"sensor_limit": 47,
|
||||
"sensor_limit_warn": 43,
|
||||
"sensor_limit_low": -7,
|
||||
"sensor_limit_low_warn": 3.0,
|
||||
"sensor_limit_low_warn": 3,
|
||||
"sensor_alert": 1,
|
||||
"sensor_custom": "No",
|
||||
"entPhysicalIndex": null,
|
||||
@@ -4773,7 +4773,7 @@
|
||||
"sensor_limit": 80,
|
||||
"sensor_limit_warn": 75,
|
||||
"sensor_limit_low": 3,
|
||||
"sensor_limit_low_warn": 8.0,
|
||||
"sensor_limit_low_warn": 8,
|
||||
"sensor_alert": 1,
|
||||
"sensor_custom": "No",
|
||||
"entPhysicalIndex": null,
|
||||
|
||||
@@ -2848,7 +2848,7 @@
|
||||
"sensor_limit": 47,
|
||||
"sensor_limit_warn": 42,
|
||||
"sensor_limit_low": -7,
|
||||
"sensor_limit_low_warn": 3.0,
|
||||
"sensor_limit_low_warn": 3,
|
||||
"sensor_alert": 1,
|
||||
"sensor_custom": "No",
|
||||
"entPhysicalIndex": null,
|
||||
@@ -2873,7 +2873,7 @@
|
||||
"sensor_limit": 75,
|
||||
"sensor_limit_warn": 70,
|
||||
"sensor_limit_low": 3,
|
||||
"sensor_limit_low_warn": 8.0,
|
||||
"sensor_limit_low_warn": 8,
|
||||
"sensor_alert": 1,
|
||||
"sensor_custom": "No",
|
||||
"entPhysicalIndex": null,
|
||||
@@ -2898,7 +2898,7 @@
|
||||
"sensor_limit": 91,
|
||||
"sensor_limit_warn": 86,
|
||||
"sensor_limit_low": 3,
|
||||
"sensor_limit_low_warn": 8.0,
|
||||
"sensor_limit_low_warn": 8,
|
||||
"sensor_alert": 1,
|
||||
"sensor_custom": "No",
|
||||
"entPhysicalIndex": null,
|
||||
@@ -2923,7 +2923,7 @@
|
||||
"sensor_limit": 91,
|
||||
"sensor_limit_warn": 86,
|
||||
"sensor_limit_low": 3,
|
||||
"sensor_limit_low_warn": 8.0,
|
||||
"sensor_limit_low_warn": 8,
|
||||
"sensor_alert": 1,
|
||||
"sensor_custom": "No",
|
||||
"entPhysicalIndex": null,
|
||||
|
||||
@@ -440,7 +440,7 @@
|
||||
"ifSpeed": 1048576000,
|
||||
"ifSpeed_prev": null,
|
||||
"ifConnectorPresent": null,
|
||||
"ifOperStatus": null,
|
||||
"ifOperStatus": "up",
|
||||
"ifOperStatus_prev": null,
|
||||
"ifAdminStatus": null,
|
||||
"ifAdminStatus_prev": null,
|
||||
@@ -540,7 +540,7 @@
|
||||
"ifSpeed": 1048576000,
|
||||
"ifSpeed_prev": null,
|
||||
"ifConnectorPresent": null,
|
||||
"ifOperStatus": null,
|
||||
"ifOperStatus": "up",
|
||||
"ifOperStatus_prev": null,
|
||||
"ifAdminStatus": null,
|
||||
"ifAdminStatus_prev": null,
|
||||
@@ -640,7 +640,7 @@
|
||||
"ifSpeed": 1048576000,
|
||||
"ifSpeed_prev": null,
|
||||
"ifConnectorPresent": null,
|
||||
"ifOperStatus": null,
|
||||
"ifOperStatus": "up",
|
||||
"ifOperStatus_prev": null,
|
||||
"ifAdminStatus": null,
|
||||
"ifAdminStatus_prev": null,
|
||||
@@ -740,7 +740,7 @@
|
||||
"ifSpeed": 1048576000,
|
||||
"ifSpeed_prev": null,
|
||||
"ifConnectorPresent": null,
|
||||
"ifOperStatus": null,
|
||||
"ifOperStatus": "up",
|
||||
"ifOperStatus_prev": null,
|
||||
"ifAdminStatus": null,
|
||||
"ifAdminStatus_prev": null,
|
||||
|
||||
@@ -1552,7 +1552,7 @@
|
||||
"group": null,
|
||||
"sensor_divisor": 1,
|
||||
"sensor_multiplier": 1,
|
||||
"sensor_current": 224.0,
|
||||
"sensor_current": 224,
|
||||
"sensor_limit": 257.6,
|
||||
"sensor_limit_warn": null,
|
||||
"sensor_limit_low": 190.4,
|
||||
|
||||
@@ -240,7 +240,7 @@
|
||||
"ifSpeed": 100000000,
|
||||
"ifSpeed_prev": null,
|
||||
"ifConnectorPresent": null,
|
||||
"ifOperStatus": null,
|
||||
"ifOperStatus": "up",
|
||||
"ifOperStatus_prev": null,
|
||||
"ifAdminStatus": null,
|
||||
"ifAdminStatus_prev": null,
|
||||
@@ -340,7 +340,7 @@
|
||||
"ifSpeed": 0,
|
||||
"ifSpeed_prev": null,
|
||||
"ifConnectorPresent": null,
|
||||
"ifOperStatus": null,
|
||||
"ifOperStatus": "down",
|
||||
"ifOperStatus_prev": null,
|
||||
"ifAdminStatus": null,
|
||||
"ifAdminStatus_prev": null,
|
||||
|
||||
@@ -940,7 +940,7 @@
|
||||
"ifSpeed": 0,
|
||||
"ifSpeed_prev": null,
|
||||
"ifConnectorPresent": null,
|
||||
"ifOperStatus": null,
|
||||
"ifOperStatus": "down",
|
||||
"ifOperStatus_prev": null,
|
||||
"ifAdminStatus": null,
|
||||
"ifAdminStatus_prev": null,
|
||||
@@ -1040,7 +1040,7 @@
|
||||
"ifSpeed": 0,
|
||||
"ifSpeed_prev": null,
|
||||
"ifConnectorPresent": null,
|
||||
"ifOperStatus": null,
|
||||
"ifOperStatus": "down",
|
||||
"ifOperStatus_prev": null,
|
||||
"ifAdminStatus": null,
|
||||
"ifAdminStatus_prev": null,
|
||||
@@ -1140,7 +1140,7 @@
|
||||
"ifSpeed": 0,
|
||||
"ifSpeed_prev": null,
|
||||
"ifConnectorPresent": null,
|
||||
"ifOperStatus": null,
|
||||
"ifOperStatus": "down",
|
||||
"ifOperStatus_prev": null,
|
||||
"ifAdminStatus": null,
|
||||
"ifAdminStatus_prev": null,
|
||||
@@ -1240,7 +1240,7 @@
|
||||
"ifSpeed": 0,
|
||||
"ifSpeed_prev": null,
|
||||
"ifConnectorPresent": null,
|
||||
"ifOperStatus": null,
|
||||
"ifOperStatus": "down",
|
||||
"ifOperStatus_prev": null,
|
||||
"ifAdminStatus": null,
|
||||
"ifAdminStatus_prev": null,
|
||||
@@ -1340,7 +1340,7 @@
|
||||
"ifSpeed": 10000000,
|
||||
"ifSpeed_prev": null,
|
||||
"ifConnectorPresent": null,
|
||||
"ifOperStatus": null,
|
||||
"ifOperStatus": "up",
|
||||
"ifOperStatus_prev": null,
|
||||
"ifAdminStatus": null,
|
||||
"ifAdminStatus_prev": null,
|
||||
@@ -1440,7 +1440,7 @@
|
||||
"ifSpeed": 0,
|
||||
"ifSpeed_prev": null,
|
||||
"ifConnectorPresent": null,
|
||||
"ifOperStatus": null,
|
||||
"ifOperStatus": "down",
|
||||
"ifOperStatus_prev": null,
|
||||
"ifAdminStatus": null,
|
||||
"ifAdminStatus_prev": null,
|
||||
@@ -1540,7 +1540,7 @@
|
||||
"ifSpeed": 0,
|
||||
"ifSpeed_prev": null,
|
||||
"ifConnectorPresent": null,
|
||||
"ifOperStatus": null,
|
||||
"ifOperStatus": "down",
|
||||
"ifOperStatus_prev": null,
|
||||
"ifAdminStatus": null,
|
||||
"ifAdminStatus_prev": null,
|
||||
@@ -1640,7 +1640,7 @@
|
||||
"ifSpeed": 100000000,
|
||||
"ifSpeed_prev": null,
|
||||
"ifConnectorPresent": null,
|
||||
"ifOperStatus": null,
|
||||
"ifOperStatus": "up",
|
||||
"ifOperStatus_prev": null,
|
||||
"ifAdminStatus": null,
|
||||
"ifAdminStatus_prev": null,
|
||||
@@ -1740,7 +1740,7 @@
|
||||
"ifSpeed": 100000000,
|
||||
"ifSpeed_prev": null,
|
||||
"ifConnectorPresent": null,
|
||||
"ifOperStatus": null,
|
||||
"ifOperStatus": "up",
|
||||
"ifOperStatus_prev": null,
|
||||
"ifAdminStatus": null,
|
||||
"ifAdminStatus_prev": null,
|
||||
|
||||
@@ -28230,7 +28230,7 @@
|
||||
{
|
||||
"port_descr_type": "cust",
|
||||
"port_descr_descr": "ACME-building-1er",
|
||||
"port_descr_circuit": "",
|
||||
"port_descr_circuit": null,
|
||||
"port_descr_speed": "Access;PortDot1X",
|
||||
"port_descr_notes": null,
|
||||
"ifDescr": "GigabitEthernet1/0/11",
|
||||
@@ -28830,7 +28830,7 @@
|
||||
{
|
||||
"port_descr_type": "cust",
|
||||
"port_descr_descr": "ACME-building-1er",
|
||||
"port_descr_circuit": "",
|
||||
"port_descr_circuit": null,
|
||||
"port_descr_speed": "Access;PortDot1X",
|
||||
"port_descr_notes": null,
|
||||
"ifDescr": "GigabitEthernet1/0/17",
|
||||
@@ -34530,9 +34530,9 @@
|
||||
{
|
||||
"port_descr_type": "cust",
|
||||
"port_descr_descr": "ACME-building-1er",
|
||||
"port_descr_circuit": "",
|
||||
"port_descr_circuit": null,
|
||||
"port_descr_speed": "Access;ADSL",
|
||||
"port_descr_notes": "",
|
||||
"port_descr_notes": null,
|
||||
"ifDescr": "GigabitEthernet2/0/22",
|
||||
"ifName": "GigabitEthernet2/0/22",
|
||||
"portName": null,
|
||||
@@ -41230,7 +41230,7 @@
|
||||
{
|
||||
"port_descr_type": "cust",
|
||||
"port_descr_descr": "ACME-building-1er",
|
||||
"port_descr_circuit": "",
|
||||
"port_descr_circuit": null,
|
||||
"port_descr_speed": "Access;PortDot1X",
|
||||
"port_descr_notes": null,
|
||||
"ifDescr": "GigabitEthernet3/0/36",
|
||||
@@ -42130,7 +42130,7 @@
|
||||
{
|
||||
"port_descr_type": "cust",
|
||||
"port_descr_descr": "ACME-building-1er",
|
||||
"port_descr_circuit": "",
|
||||
"port_descr_circuit": null,
|
||||
"port_descr_speed": "Access;ADSL",
|
||||
"port_descr_notes": null,
|
||||
"ifDescr": "GigabitEthernet3/0/45",
|
||||
|
||||
Reference in New Issue
Block a user