mirror of
https://forgejo.altau.su/lego/lego-monitoring.git
synced 2026-03-09 20:31:10 +00:00
add ups periodic checks
This commit is contained in:
parent
09eabcc6b2
commit
da480a7c4e
13 changed files with 533 additions and 403 deletions
|
|
@ -76,6 +76,10 @@ package:
|
|||
warning_threshold_comb_bytes = interfaceCfg.warningThresholdCombBytes;
|
||||
critical_threshold_comb_bytes = interfaceCfg.criticalThresholdCombBytes;
|
||||
}) cfg.checks.net.interfaces;
|
||||
|
||||
ups = with cfg.checks.ups; {
|
||||
ups_to_check = upsToCheck;
|
||||
};
|
||||
};
|
||||
};
|
||||
in lib.mkIf cfg.enable {
|
||||
|
|
|
|||
|
|
@ -33,6 +33,7 @@ in
|
|||
"ram"
|
||||
"temp"
|
||||
"net"
|
||||
"ups"
|
||||
|
||||
"vulnix"
|
||||
]);
|
||||
|
|
@ -45,6 +46,7 @@ in
|
|||
* ram -- alerts when RAM usage is above threshold
|
||||
* temp -- alerts when temperature readings are above thresholds
|
||||
* net -- alerts when network usage is above threshold
|
||||
* ups -- alerts on UPS events
|
||||
* vulnix -- periodically scans system for known CVEs, alerts if any are found (NixOS only)'';
|
||||
};
|
||||
|
||||
|
|
@ -170,6 +172,14 @@ in
|
|||
}'';
|
||||
};
|
||||
};
|
||||
|
||||
ups = {
|
||||
upsToCheck = lib.mkOption {
|
||||
type = with lib.types; nullOr (listOf str);
|
||||
default = null;
|
||||
description = "List of UPS's to monitor, in `upsc`-compatible format. If null, all UPS's connected to localhost are checked.";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue