-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Osquerybeat: Rewrite queries scheduling with extensions for scheduling and logging #25641
Osquerybeat: Rewrite queries scheduling with extensions for scheduling and logging #25641
Conversation
💚 Build Succeeded
Expand to view the summary
Build stats
Test stats 🧪
Trends 🧪💚 Flaky test reportTests succeeded. Expand to view the summary
Test stats 🧪
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎉
/test |
bt *osquerybeat | ||
} | ||
|
||
func (a *actionHandler) Name() string { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
requires pointer? not important, just curious
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it is passed into the agent client as interface so will escape to the heap no matter what, and it's only allocated once
} | ||
|
||
func actionDataFromRequest(req map[string]interface{}) (ad actionData, err error) { | ||
if req == nil { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
len(req) == 0 ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sure
x-pack/osquerybeat/beater/install.go
Outdated
exedir := filepath.Dir(exefp) | ||
|
||
// Install osqueryd if needed | ||
err = installOsqueryWithDir(ctx, exedir) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return installOsqueryWithDir(ctx, exedir) ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated
/test |
…g and logging (#25641) * Osquerybeat: Rewrite queries scheduling with extensions for scheduling and logging * Make check happy * Update notice, to make linter happy * Fix Go 1.16 check failure, when calling t.Fatal from goroutine * Fix windows build * Add configuration plugin tests * Add logger plugin unit tests * Rollback gotest_test change * Address code review comments (cherry picked from commit c1a3a8d) # Conflicts: # go.mod
…xtensions for scheduling and logging (#25722) * Osquerybeat: Rewrite queries scheduling with extensions for scheduling and logging (#25641) * Osquerybeat: Rewrite queries scheduling with extensions for scheduling and logging * Make check happy * Update notice, to make linter happy * Fix windows build * Add configuration plugin tests * Add logger plugin unit tests * Rollback gotest_test change * Address code review comments (cherry picked from commit c1a3a8d) # Conflicts: # go.mod * Resolve conflict Co-authored-by: Aleksandr Maus <[email protected]>
What does this PR do?
Why is it important?
Addresses https://github.com/elastic/security-team/issues/1061
Checklist
Related issues
Screenshots
The
osquery_schedule
is now populated with the scheduled queries statsThe scheduled queries and ad-hoc queries are working as expected