mirror of
https://github.com/openappsec/openappsec.git
synced 2025-06-28 16:41:02 +03:00
Replace LogGen with direct send of report to fog
This commit is contained in:
parent
61bb2ce4c7
commit
03f4d6bf39
@ -1349,13 +1349,41 @@ private:
|
|||||||
}
|
}
|
||||||
if (email != "") {
|
if (email != "") {
|
||||||
dbgInfo(D_ORCHESTRATOR) << "Sending registration data";
|
dbgInfo(D_ORCHESTRATOR) << "Sending registration data";
|
||||||
LogGen(
|
Singleton::Consume<I_MainLoop>::by<OrchestrationComp>()->addOneTimeRoutine(
|
||||||
"Local Agent Data",
|
I_MainLoop::RoutineType::Offline,
|
||||||
Audience::INTERNAL,
|
[email] ()
|
||||||
Severity::INFO,
|
{
|
||||||
Priority::LOW,
|
chrono::microseconds curr_time = Singleton::Consume<I_TimeGet>::by<OrchestrationComp>()->getWalltime();
|
||||||
Tags::ORCHESTRATOR
|
|
||||||
) << LogField("userDefinedId", email);
|
Report registration_report(
|
||||||
|
"Local Agent Data",
|
||||||
|
Singleton::Consume<I_TimeGet>::by<OrchestrationComp>()->getWalltime(),
|
||||||
|
Type::EVENT,
|
||||||
|
Level::LOG,
|
||||||
|
LogLevel::INFO,
|
||||||
|
Audience::INTERNAL,
|
||||||
|
AudienceTeam::NONE,
|
||||||
|
Severity::INFO,
|
||||||
|
Priority::LOW,
|
||||||
|
chrono::seconds(0),
|
||||||
|
LogField("agentId", Singleton::Consume<I_AgentDetails>::by<OrchestrationComp>()->getAgentId()),
|
||||||
|
Tags::ORCHESTRATOR
|
||||||
|
);
|
||||||
|
registration_report << LogField("userDefinedId", email);
|
||||||
|
|
||||||
|
LogRest registration_report_rest(registration_report);
|
||||||
|
|
||||||
|
Singleton::Consume<I_Messaging>::by<OrchestrationComp>()->sendObjectWithPersistence(
|
||||||
|
registration_report_rest,
|
||||||
|
I_Messaging::Method::POST,
|
||||||
|
"/api/v1/agents/events",
|
||||||
|
"",
|
||||||
|
true,
|
||||||
|
MessageTypeTag::REPORT
|
||||||
|
);
|
||||||
|
},
|
||||||
|
"Send registration data"
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
reportAgentDetailsMetaData();
|
reportAgentDetailsMetaData();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user