From 61bb2ce4c78cb8d5d5080ebee5696965d15e26fc Mon Sep 17 00:00:00 2001 From: Ned Wright Date: Tue, 7 Mar 2023 15:02:46 +0000 Subject: [PATCH] Changes to fog working in hybrid mode --- components/security_apps/orchestration/orchestration_comp.cc | 4 ++++ core/logging/logging.cc | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/components/security_apps/orchestration/orchestration_comp.cc b/components/security_apps/orchestration/orchestration_comp.cc index 10df2f4..f02a17a 100755 --- a/components/security_apps/orchestration/orchestration_comp.cc +++ b/components/security_apps/orchestration/orchestration_comp.cc @@ -1343,6 +1343,10 @@ private: << LogField("agentVersion", Version::get()); auto email = getSettingWithDefault("", "email-address"); + if (email == "") { + auto env_email = getenv("user_email"); + if (env_email != nullptr) email = env_email; + } if (email != "") { dbgInfo(D_ORCHESTRATOR) << "Sending registration data"; LogGen( diff --git a/core/logging/logging.cc b/core/logging/logging.cc index 68d6fd9..a4eac16 100755 --- a/core/logging/logging.cc +++ b/core/logging/logging.cc @@ -256,8 +256,8 @@ private: } auto agent_mode = Singleton::Consume::by()->getOrchestrationMode(); - if (agent_mode == OrchestrationMode::OFFLINE || agent_mode == OrchestrationMode::HYBRID) { - dbgInfo(D_REPORT) << "Agent not in online mode, fog stream is no supported"; + if (agent_mode == OrchestrationMode::OFFLINE) { + dbgInfo(D_REPORT) << "Agent in offline mode, fog stream is no supported"; } else { addStream(StreamType::JSON_FOG); }