Skip to content

Commit

Permalink
Merge #4510
Browse files Browse the repository at this point in the history
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 <serge.kosyrev@iohk.io>
  • Loading branch information
iohk-bors[bot] and deepfire authored Oct 6, 2022
2 parents 8ced4de + 60e8620 commit 148238e
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions nix/nixos/cardano-tracer-service.nix
Original file line number Diff line number Diff line change
Expand Up @@ -24,27 +24,23 @@ let serviceConfigToJSON =
rotation = {
rpFrequencySecs = 15;
rpKeepFilesNum = 10;
rpLogLimitBytes = 500000000;
rpLogLimitBytes = 1000000000;
rpMaxAgeHours = 24;
};
} // (cfg.rotation or {});

hasRTView = {
epHost = "127.0.0.1";
epPort = 3300;
};
} // (cfg.RTView or {});
hasEKG = [
{ epHost = "127.0.0.1";
epPort = 3100; ## supervisord.portShiftPrometheus
}
{ epHost = "127.0.0.1";
epPort = 3101; ## supervisord.portShiftPrometheus
}
{ epHost = "127.0.0.1"; epPort = cfg.ekgPortBase; }
{ epHost = "127.0.0.1"; epPort = cfg.ekgPortBase + 1; }
];
ekgRequestFreq = 1;
hasPrometheus = {
epHost = "127.0.0.1";
epPort = 3200; ## supervisord.portShiftPrometheus
};
} // (cfg.prometheus or {});
};
in pkgs.commonLib.defServiceModule
(lib: with lib;
Expand All @@ -66,6 +62,11 @@ in pkgs.commonLib.defServiceModule
acceptingSocket = mayOpt str "Socket path: as acceptor.";
connectToSocket = mayOpt str "Socket path: connect to.";
logRoot = opt str null "Log storage root directory.";
rotation = opt attrs {} "Log rotation overrides: see cardano-tracer documentation.";
RTView = opt attrs {} "RTView config overrides: see cardano-tracer documentation.";
ekgPortBase = opt int 3100 "EKG port base.";
ekgRequestFreq = opt int 1 "EKG request frequency";
prometheus = opt attrs {} "Prometheus overrides: see cardano-tracer documentation.";

### Here be dragons, on the other hand..
configFile = mayOpt str
Expand Down

0 comments on commit 148238e

Please sign in to comment.