diff --git a/monkey/monkey_island/cc/resources/telemetry.py b/monkey/monkey_island/cc/resources/telemetry.py index 32e8e1a23..106077428 100644 --- a/monkey/monkey_island/cc/resources/telemetry.py +++ b/monkey/monkey_island/cc/resources/telemetry.py @@ -63,7 +63,8 @@ class Telemetry(AbstractResource): monkey = NodeService.get_monkey_by_guid(telemetry_json["monkey_guid"]) NodeService.update_monkey_modify_time(monkey["_id"]) - process_telemetry(telemetry_json) + agent_configuration = self._agent_configuration_repository.get_configuration() + process_telemetry(telemetry_json, agent_configuration) # API Spec: RESTful way is to return an identifier of the updated/newly created resource return {}, 201 diff --git a/monkey/monkey_island/cc/services/telemetry/processing/processing.py b/monkey/monkey_island/cc/services/telemetry/processing/processing.py index 569957c75..a1db59b45 100644 --- a/monkey/monkey_island/cc/services/telemetry/processing/processing.py +++ b/monkey/monkey_island/cc/services/telemetry/processing/processing.py @@ -1,6 +1,7 @@ import logging from common.common_consts.telem_categories import TelemCategoryEnum +from common.configuration import AgentConfiguration from monkey_island.cc.models.telemetries import save_telemetry from monkey_island.cc.services.telemetry.processing.aws_info import process_aws_telemetry from monkey_island.cc.services.telemetry.processing.exploit import process_exploit_telemetry @@ -29,7 +30,7 @@ TELEMETRY_CATEGORY_TO_PROCESSING_FUNC = { UNSAVED_TELEMETRIES = [TelemCategoryEnum.CREDENTIALS] -def process_telemetry(telemetry_json): +def process_telemetry(telemetry_json, agent_configuration: AgentConfiguration): try: telem_category = telemetry_json.get("telem_category") if telem_category in TELEMETRY_CATEGORY_TO_PROCESSING_FUNC: