-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #465 from wazuh/feat/206-implement-logcollector-ev…
…entchannel-reader-for-windows Implement Logcollector EventChannel Reader for Windows
- Loading branch information
Showing
20 changed files
with
667 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#include <config.h> | ||
|
||
#include <logcollector.hpp> | ||
|
||
namespace logcollector | ||
{ | ||
|
||
void Logcollector::AddPlatformSpecificReader([[maybe_unused]] std::shared_ptr<const configuration::ConfigurationParser> configurationParser) | ||
{ | ||
|
||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#include "event_reader_win.hpp" | ||
|
||
#include <config.h> | ||
#include <timeHelper.h> | ||
|
||
#include <chrono> | ||
#include <map> | ||
|
||
#include "logcollector.hpp" | ||
|
||
namespace logcollector | ||
{ | ||
|
||
void Logcollector::AddPlatformSpecificReader(std::shared_ptr<const configuration::ConfigurationParser> configurationParser) | ||
{ | ||
const auto refreshInterval = configurationParser->GetConfig<time_t>("logcollector", "channel_refresh").value_or(config::logcollector::DEFAULT_CHANNEL_REFRESH_INTERVAL); | ||
|
||
auto windowsConfig = configurationParser->GetConfig<std::vector<std::map<std::string, std::string>>>("logcollector", "windows").value_or( | ||
std::vector<std::map<std::string, std::string>> {}); | ||
|
||
for (auto& entry : windowsConfig) | ||
{ | ||
const auto channel = entry["channel"]; | ||
const auto query = entry["query"]; | ||
AddReader(std::make_shared<winevt::WindowsEventTracerReader>(*this, channel, query, refreshInterval)); | ||
} | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
#pragma once | ||
|
||
#include <boost/asio/awaitable.hpp> | ||
#include <logcollector.hpp> | ||
|
||
namespace logcollector { | ||
|
||
|
Oops, something went wrong.