summaryrefslogtreecommitdiff
path: root/modules/nixos/promtail.nix
diff options
context:
space:
mode:
Diffstat (limited to 'modules/nixos/promtail.nix')
-rw-r--r--modules/nixos/promtail.nix24
1 files changed, 16 insertions, 8 deletions
diff --git a/modules/nixos/promtail.nix b/modules/nixos/promtail.nix
index a3a6fe9..d52384a 100644
--- a/modules/nixos/promtail.nix
+++ b/modules/nixos/promtail.nix
@@ -10,12 +10,16 @@ in {
options.nixfiles.modules.promtail = {
enable = mkEnableOption "Promtail";
- loki = {
- url = mkOption {
- description = "Address of a listening Loki service.";
- type = with types; str;
- default = "https://${config.nixfiles.modules.loki.domain}";
- };
+ port = mkOption {
+ description = "Port.";
+ type = with types; port;
+ default = 30181;
+ };
+
+ loki.url = mkOption {
+ description = "Address of a listening Loki service.";
+ type = with types; str;
+ default = "https://${config.nixfiles.modules.loki.domain}";
};
};
@@ -26,7 +30,7 @@ in {
configuration = {
server = rec {
http_listen_address = this.wireguard.ipv4.address;
- http_listen_port = 30181;
+ http_listen_port = cfg.port;
grpc_listen_address = this.wireguard.ipv4.address;
grpc_listen_port = http_listen_port + 1;
@@ -43,7 +47,11 @@ in {
}
];
- positions.filename = "/tmp/positions.yaml";
+ positions = {
+ filename = "/tmp/positions.yaml";
+ sync_period = "15s";
+ ignore_invalid_yaml = true;
+ };
scrape_configs = [
{