mirror of
https://forgejo.altau.su/lego/lego-monitoring.git
synced 2026-03-10 04:41:10 +00:00
ram check, configurable loglevel
This commit is contained in:
parent
5095057a13
commit
da85a566c4
10 changed files with 180 additions and 18 deletions
|
|
@ -11,12 +11,27 @@ in
|
|||
options.services.lego-monitoring = {
|
||||
enable = lib.mkEnableOption "lego-monitoring service";
|
||||
|
||||
logLevel = lib.mkOption {
|
||||
type = lib.types.enum [
|
||||
"CRITICAL"
|
||||
"ERROR"
|
||||
"WARNING"
|
||||
"INFO"
|
||||
"DEBUG"
|
||||
];
|
||||
default = "INFO";
|
||||
description = "Level of logging. INFO generates a log message with every check.";
|
||||
};
|
||||
|
||||
enabledCheckSets = lib.mkOption {
|
||||
type = lib.types.listOf (lib.types.enum [
|
||||
"start"
|
||||
"stop"
|
||||
"temp"
|
||||
|
||||
"cpu"
|
||||
"ram"
|
||||
"temp"
|
||||
|
||||
"vulnix"
|
||||
]);
|
||||
default = [ ];
|
||||
|
|
@ -82,7 +97,7 @@ in
|
|||
warningPercentage = lib.mkOption {
|
||||
type = lib.types.nullOr lib.types.float;
|
||||
default = 80.0;
|
||||
description = "CPU load percentage for a warning alert is sent. Null means never generate a CPU warning alert.";
|
||||
description = "CPU load percentage for a warning alert to be sent. Null means never generate a CPU warning alert.";
|
||||
};
|
||||
criticalPercentage = lib.mkOption {
|
||||
type = lib.types.nullOr lib.types.float;
|
||||
|
|
@ -90,6 +105,19 @@ in
|
|||
description = "CPU load percentage for a critical alert to be sent. Null means never generate a CPU critical alert.";
|
||||
};
|
||||
};
|
||||
|
||||
ram = {
|
||||
warningPercentage = lib.mkOption {
|
||||
type = lib.types.nullOr lib.types.float;
|
||||
default = 80.0;
|
||||
description = "RAM usage percentage for a warning alert to be sent. Null means never generate a RAM warning alert.";
|
||||
};
|
||||
criticalPercentage = lib.mkOption {
|
||||
type = lib.types.nullOr lib.types.float;
|
||||
default = 90.0;
|
||||
description = "RAM usage percentage for a critical alert to be sent. Null means never generate a RAM critical alert.";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue