diff --git a/LibreNMS/Modules/Ospf.php b/LibreNMS/Modules/Ospf.php index 587f112b8e..605b7791f3 100644 --- a/LibreNMS/Modules/Ospf.php +++ b/LibreNMS/Modules/Ospf.php @@ -87,6 +87,11 @@ class Ospf implements Module if (empty($ospf_entry['ospfRouterId'])) { continue; // skip invalid data } + foreach (['ospfRxNewLsas', 'ospfOriginateNewLsas', 'ospfAreaBdrRtrStatus', 'ospfTOSSupport', 'ospfExternLsaCksumSum', 'ospfExternLsaCount', 'ospfASBdrRtrStatus', 'ospfVersionNumber', 'ospfAdminStat'] as $column) { + if (! array_key_exists($column, $ospf_entry) || is_null($ospf_entry[$column])) { + continue 2; // This column must exist and not be null + } + } $instance = OspfInstance::updateOrCreate([ 'device_id' => $os->getDeviceId(),