Skip to content

Commit

Permalink
sqlite: file size based retention
Browse files Browse the repository at this point in the history
Allow a max file size on the SQLite database. Events will be
aggressively purged from the database to maintain this size.

Closes #256
  • Loading branch information
jasonish committed Mar 13, 2023
1 parent 879ab87 commit efa9b9e
Show file tree
Hide file tree
Showing 15 changed files with 399 additions and 149 deletions.
128 changes: 59 additions & 69 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ webbrowser = "0.8.7"
yaml-rust = "0.4.5"
futures = "0.3.21"
regex = "1.5.5"
libc = { version = "0.2.140", default_features = false }

[patch.crates-io]
# Patch Rusqlite for now. 0.28.0 uses SQLite 3.39, but 3.40 is much
Expand Down
14 changes: 11 additions & 3 deletions examples/evebox.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,17 @@ database:
#username: username
#password: password

# Retention period in days. Default 7 days.
# - Set to 0 to disable.
retention-period: 7
retention:
# Only keep events for the past 7 days.
# - SQLite only
# - Default 7 days
# - Set to 0 to disable
days: 7

# Maximum database size.
# - SQLite only
# - No default
#size: "20 GB"

authentication:

Expand Down
Loading

0 comments on commit efa9b9e

Please sign in to comment.