diff options
Diffstat (limited to 'nixos/modules/services/monitoring/sensu/checks.nix')
-rw-r--r-- | nixos/modules/services/monitoring/sensu/checks.nix | 76 |
1 files changed, 76 insertions, 0 deletions
diff --git a/nixos/modules/services/monitoring/sensu/checks.nix b/nixos/modules/services/monitoring/sensu/checks.nix new file mode 100644 index 000000000000..4343286177c4 --- /dev/null +++ b/nixos/modules/services/monitoring/sensu/checks.nix @@ -0,0 +1,76 @@ +{ lib }: + +{ + options = with lib; with types; { + type = mkOption { + type = enum [ "standard" "metric" ]; + default = "standard"; + description = "Type of check."; + }; + + standalone = mkOption { + type = bool; + default = false; + description = "Scheduled by the client instead of the server."; + }; + + command = mkOption { + type = str; + description = "Command to run."; + }; + + subscribers = mkOption { + type = listOf str; + default = []; + description = "Subscribers"; + }; + + handlers = mkOption { + default = []; + description = "Handlers."; + type = listOf str; + }; + + interval = mkOption { + type = int; + default = 60; + description = "Check interval."; + }; + + timeout = mkOption { + type = int; + default = 30; + description = "Check timeout."; + }; + + ttl = mkOption { + type = int; + default = 120; + description = "Check TTL."; + }; + + source = mkOption { + type = str; + default = ""; + description = "Custom source for JIT checks."; + }; + + occurrences = mkOption { + type = int; + default = 1; + description = "The number of occurrences before triggering an alert."; + }; + + subdue = mkOption { + type = attrs; + default = {}; + description = "Subdue check during certain windows."; + }; + + vars = mkOption { + type = attrs; + default = {}; + description = "Custom variables sent with the check."; + }; + }; +} |