mirror of
https://github.com/SebastianStork/nixos-config.git
synced 2026-03-22 17:49: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;
|
type = lib.types.port;
|
||||||
default = 9090;
|
default = 9090;
|
||||||
};
|
};
|
||||||
|
storageRetentionSize = lib.mkOption {
|
||||||
|
type = lib.types.nonEmptyStr;
|
||||||
|
default = "2GB";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
config = lib.mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
|
|
@ -30,7 +34,10 @@ in
|
||||||
inherit (cfg) port;
|
inherit (cfg) port;
|
||||||
webExternalUrl = "https://${cfg.domain}";
|
webExternalUrl = "https://${cfg.domain}";
|
||||||
|
|
||||||
extraFlags = [ "--web.enable-remote-write-receiver" ];
|
extraFlags = [
|
||||||
|
"--web.enable-remote-write-receiver"
|
||||||
|
"--storage.tsdb.retention.size=${cfg.storageRetentionSize}"
|
||||||
|
];
|
||||||
globalConfig = {
|
globalConfig = {
|
||||||
scrape_interval = "30s";
|
scrape_interval = "30s";
|
||||||
external_labels.monitor = "global";
|
external_labels.monitor = "global";
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue