Skip to content

Commit 148238e

Browse files
Merge #4510
4510: cardano-tracer-service: more configuration control r=deepfire a=deepfire 1. allow finer details of `cardano-tracer-service` to be configure as NixOS module options. Co-authored-by: Kosyrev Serge <[email protected]>
2 parents 8ced4de + 60e8620 commit 148238e

File tree

1 file changed

+11
-10
lines changed

1 file changed

+11
-10
lines changed

nix/nixos/cardano-tracer-service.nix

+11-10
Original file line numberDiff line numberDiff line change
@@ -24,27 +24,23 @@ let serviceConfigToJSON =
2424
rotation = {
2525
rpFrequencySecs = 15;
2626
rpKeepFilesNum = 10;
27-
rpLogLimitBytes = 500000000;
27+
rpLogLimitBytes = 1000000000;
2828
rpMaxAgeHours = 24;
29-
};
29+
} // (cfg.rotation or {});
3030

3131
hasRTView = {
3232
epHost = "127.0.0.1";
3333
epPort = 3300;
34-
};
34+
} // (cfg.RTView or {});
3535
hasEKG = [
36-
{ epHost = "127.0.0.1";
37-
epPort = 3100; ## supervisord.portShiftPrometheus
38-
}
39-
{ epHost = "127.0.0.1";
40-
epPort = 3101; ## supervisord.portShiftPrometheus
41-
}
36+
{ epHost = "127.0.0.1"; epPort = cfg.ekgPortBase; }
37+
{ epHost = "127.0.0.1"; epPort = cfg.ekgPortBase + 1; }
4238
];
4339
ekgRequestFreq = 1;
4440
hasPrometheus = {
4541
epHost = "127.0.0.1";
4642
epPort = 3200; ## supervisord.portShiftPrometheus
47-
};
43+
} // (cfg.prometheus or {});
4844
};
4945
in pkgs.commonLib.defServiceModule
5046
(lib: with lib;
@@ -66,6 +62,11 @@ in pkgs.commonLib.defServiceModule
6662
acceptingSocket = mayOpt str "Socket path: as acceptor.";
6763
connectToSocket = mayOpt str "Socket path: connect to.";
6864
logRoot = opt str null "Log storage root directory.";
65+
rotation = opt attrs {} "Log rotation overrides: see cardano-tracer documentation.";
66+
RTView = opt attrs {} "RTView config overrides: see cardano-tracer documentation.";
67+
ekgPortBase = opt int 3100 "EKG port base.";
68+
ekgRequestFreq = opt int 1 "EKG request frequency";
69+
prometheus = opt attrs {} "Prometheus overrides: see cardano-tracer documentation.";
6970

7071
### Here be dragons, on the other hand..
7172
configFile = mayOpt str

0 commit comments

Comments
 (0)