journald, loki: set log retention to 3 days on host,
7 days in loki
This commit is contained in:
parent
34d69445f5
commit
237013c41d
3 changed files with 15 additions and 2 deletions
modules
|
@ -7,6 +7,7 @@
|
|||
}:
|
||||
{
|
||||
imports = [
|
||||
./logging.nix
|
||||
./nix.nix
|
||||
./networking.nix
|
||||
./terminal-tooling.nix
|
||||
|
|
12
modules/core/logging.nix
Normal file
12
modules/core/logging.nix
Normal file
|
@ -0,0 +1,12 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
flake,
|
||||
...
|
||||
}:
|
||||
{
|
||||
services.journald.extraConfig = ''
|
||||
MaxRetentionSec=3day
|
||||
'';
|
||||
}
|
|
@ -57,13 +57,13 @@
|
|||
};
|
||||
};
|
||||
};
|
||||
# Keep logs for 4 weeks
|
||||
# Keep logs for 1 week
|
||||
# https://grafana.com/docs/loki/latest/operations/storage/retention/
|
||||
limits_config = {
|
||||
allow_structured_metadata = true;
|
||||
ingestion_rate_mb = 8;
|
||||
ingestion_burst_size_mb = 12;
|
||||
retention_period = "4w";
|
||||
retention_period = "1w";
|
||||
split_queries_by_interval = "0";
|
||||
volume_enabled = true;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue