Skip to content
This repository has been archived by the owner on Dec 17, 2021. It is now read-only.

fix: missing profiles check #174

Merged
merged 2 commits into from
Oct 28, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions splunk_connect_for_snmp_poller/manager/poller.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,10 +131,6 @@ def __check_inventory(self):
self.add_device_for_profile_matching(ir)
self.check_if_new_host_was_added(entry_key, ir, new_enricher)
else:
logger.debug(
"[-] server_config['profiles']: %s",
self._server_config["profiles"],
)
if entry_key not in self._jobs_map:
self.process_new_job(entry_key, ir, profiles)
self.check_if_new_host_was_added(entry_key, ir, new_enricher)
Expand Down
3 changes: 2 additions & 1 deletion splunk_connect_for_snmp_poller/manager/profile_matching.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,8 @@ def get_profiles(server_config):
merged_profiles = {}
if "profiles" in mib_profiles:
merged_profiles.update(mib_profiles["profiles"])
merged_profiles.update(server_config["profiles"])
if "profiles" in server_config:
merged_profiles.update(server_config["profiles"])

result["profiles"] = merged_profiles
return result