mirror of
https://github.com/SebastianStork/nixos-config.git
synced 2026-03-22 21:19:07 +01:00
prometheus: Add option storageRetentionSize
This commit is contained in:
parent
4529366841
commit
55d5da375a
1 changed files with 8 additions and 1 deletions
|
|
@ -19,6 +19,10 @@ in
|
|||
type = lib.types.port;
|
||||
default = 9090;
|
||||
};
|
||||
storageRetentionSize = lib.mkOption {
|
||||
type = lib.types.nonEmptyStr;
|
||||
default = "2GB";
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
|
|
@ -30,7 +34,10 @@ in
|
|||
inherit (cfg) port;
|
||||
webExternalUrl = "https://${cfg.domain}";
|
||||
|
||||
extraFlags = [ "--web.enable-remote-write-receiver" ];
|
||||
extraFlags = [
|
||||
"--web.enable-remote-write-receiver"
|
||||
"--storage.tsdb.retention.size=${cfg.storageRetentionSize}"
|
||||
];
|
||||
globalConfig = {
|
||||
scrape_interval = "30s";
|
||||
external_labels.monitor = "global";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue