Skip to content
This repository has been archived by the owner on Nov 14, 2020. It is now read-only.

Flock Agent tells the server when twig settings change, or server is enabled/disabled #59

Merged
merged 13 commits into from
Oct 18, 2019

Conversation

micahflee
Copy link
Contributor

Resolves #38.

This introduces a new type of "flock logs", a log message that's just about Flock and not an osquery log. There are four types of flock logs so far: server_enabled, server_disabled, twigs_enabled, and twigs_disabled. They get logged to disk, and once a minute when the daemon tries submitting osquery logs to the server, it also tries submitting flock logs. (It works this way so that the server ends up getting flock logs even if they were generated when the daemon can't reach the server, like if wifi is disabled.)

This also does a bit of refactoring between the GUI and the daemon, removing unnecessary routes and making it so the GUI can send a single request to update the status of all twigs instead of having to send a separate request per twig.

flock_agent/daemon/flock_logs.py Outdated Show resolved Hide resolved
flock_agent/daemon/flock_logs.py Outdated Show resolved Hide resolved
flock_agent/daemon/flock_logs.py Outdated Show resolved Hide resolved
flock_agent/daemon/flock_logs.py Outdated Show resolved Hide resolved
flock_agent/daemon/flock_logs.py Outdated Show resolved Hide resolved
flock_agent/daemon/flock_logs.py Show resolved Hide resolved
flock_agent/daemon/daemon.py Show resolved Hide resolved
flock_agent/daemon/daemon.py Outdated Show resolved Hide resolved
flock_agent/daemon/daemon.py Show resolved Hide resolved
flock_agent/daemon/daemon.py Show resolved Hide resolved
@micahflee
Copy link
Contributor Author

Ok @simonft I think I've addressed everything in your review now

@micahflee micahflee merged commit 8520fe8 into master Oct 18, 2019
@micahflee micahflee deleted the 38_flock_logs branch October 18, 2019 19:31
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Flock Agent should tell the server its twig settings
2 participants