mirror of
https://github.com/SebastianStork/nixos-config.git
synced 2026-01-21 22:11:33 +01:00
alloy: Add assertions for log/metric collection dependencies
This commit is contained in:
parent
45d6b5ee7c
commit
9bc7a2e737
1 changed files with 11 additions and 0 deletions
|
|
@ -29,6 +29,17 @@ in
|
||||||
};
|
};
|
||||||
|
|
||||||
config = lib.mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
|
assertions = [
|
||||||
|
{
|
||||||
|
assertion = cfg.collect.victorialogsMetrics -> config.services.victorialogs.enable;
|
||||||
|
message = "Collecting VictoriaLogs metrics requires the VictoriaLogs service to be enabled.";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
assertion = cfg.collect.sshdLogs -> config.services.openssh.enable;
|
||||||
|
message = "Collecting OpenSSH logs requires the OpenSSH service to be enabled.";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
domains.list = [ cfg.domain ];
|
domains.list = [ cfg.domain ];
|
||||||
ports.tcp.list = [ cfg.port ];
|
ports.tcp.list = [ cfg.port ];
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue