Changes to fog working in hybrid mode

This commit is contained in:
Ned Wright 2023-03-07 15:02:46 +00:00
parent 6480357fde
commit 61bb2ce4c7
2 changed files with 6 additions and 2 deletions

View File

@ -1343,6 +1343,10 @@ private:
<< LogField("agentVersion", Version::get()); << LogField("agentVersion", Version::get());
auto email = getSettingWithDefault<string>("", "email-address"); auto email = getSettingWithDefault<string>("", "email-address");
if (email == "") {
auto env_email = getenv("user_email");
if (env_email != nullptr) email = env_email;
}
if (email != "") { if (email != "") {
dbgInfo(D_ORCHESTRATOR) << "Sending registration data"; dbgInfo(D_ORCHESTRATOR) << "Sending registration data";
LogGen( LogGen(

View File

@ -256,8 +256,8 @@ private:
} }
auto agent_mode = Singleton::Consume<I_AgentDetails>::by<LoggingComp>()->getOrchestrationMode(); auto agent_mode = Singleton::Consume<I_AgentDetails>::by<LoggingComp>()->getOrchestrationMode();
if (agent_mode == OrchestrationMode::OFFLINE || agent_mode == OrchestrationMode::HYBRID) { if (agent_mode == OrchestrationMode::OFFLINE) {
dbgInfo(D_REPORT) << "Agent not in online mode, fog stream is no supported"; dbgInfo(D_REPORT) << "Agent in offline mode, fog stream is no supported";
} else { } else {
addStream(StreamType::JSON_FOG); addStream(StreamType::JSON_FOG);
} }