Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cardano-tracer-service: more configuration control #4510

Merged
merged 1 commit into from
Oct 6, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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