diff --git a/CHANGELOG.md b/CHANGELOG.md index 834af147b..1a5ab229f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ ### Fixed - empty profile name when MIB family name and a polled varbind differs +- stop mib search on vendor if oid is for enterprise tree ## [1.9.2] diff --git a/splunk_connect_for_snmp/snmp/manager.py b/splunk_connect_for_snmp/snmp/manager.py index 22058d870..433507d9c 100644 --- a/splunk_connect_for_snmp/snmp/manager.py +++ b/splunk_connect_for_snmp/snmp/manager.py @@ -390,10 +390,9 @@ def load_mibs(self, mibs: List[str]) -> None: logger.warning(f"Error loading mib for {mib}, {e}") def is_mib_known(self, id: str, oid: str, target: str) -> Tuple[bool, str]: - oid_list = tuple(oid.split(".")) - - start = 5 + # if oid match enterprise, then search should stop if there is no match to vendor + start = 6 if oid.startswith("1.3.6.1.4.1") else 5 for i in range(len(oid_list), start, -1): oid_to_check = ".".join(oid_list[:i]) if oid_to_check in self.mib_map: