Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
W
Wazuh + VAT Evidence Collector
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
MEDINA
Public
Wazuh + VAT Evidence Collector
Commits
7d66a733
Commit
7d66a733
authored
2 years ago
by
Matevz Erzen
Browse files
Options
Downloads
Patches
Plain Diff
Additional logging
parent
64ce6c53
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
wazuh_evidence_collector/wazuh_evidence_collector.py
+8
-2
8 additions, 2 deletions
wazuh_evidence_collector/wazuh_evidence_collector.py
with
8 additions
and
2 deletions
wazuh_evidence_collector/wazuh_evidence_collector.py
+
8
−
2
View file @
7d66a733
...
...
@@ -68,7 +68,12 @@ def main():
# Wrapper function that runs all the checks (for every manager/agent)
def
run_collector
():
checker
=
Checker
(
wc
,
es
,
LOGGER
)
if
not
DUMMY_WAZUH_MANAGER
else
DemoChecker
()
if
DUMMY_WAZUH_MANAGER
is
False
:
LOGGER
.
debug
(
"
Using Checker to evaluate Wazuh logs.
"
)
checker
=
Checker
(
wc
,
es
,
LOGGER
)
else
:
LOGGER
.
debug
(
"
Simulating evidence generation using Demo Checker.
"
)
checker
=
DemoChecker
()
# Get list of all agent ids (including manager's)
def
get_agents
(
wc
):
...
...
@@ -87,10 +92,11 @@ def run_collector():
ae_req_list
=
[]
LOGGER
.
debug
(
"
Generating evidences for
"
+
str
(
len
(
agent_list
))
+
"
agents...
"
)
for
agent
in
agent_list
:
ae_req_list
.
append
(
generate_evidence
(
agent
,
checker
))
# TODO:
LOGGER
.
debug
(
"
Forwarding
"
+
str
(
len
(
ae_req_list
))
+
"
evidences...
"
)
for
ae_req
in
ae_req_list
:
forwarder
.
send_evidence
(
ae_req
,
oauth_client
.
get_token
())
print_evidence
(
LOGGER
,
ae_req
.
evidence
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment