Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
1,243 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
{ 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; | ||
}; | ||
|
||
dependencies = mkOption { | ||
default = []; | ||
description = "Dependencies."; | ||
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."; | ||
}; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
{ lib }: | ||
|
||
{ | ||
options = with lib; with types; { | ||
name = mkOption { | ||
type = str; | ||
default = ""; | ||
description = "Name of the client."; | ||
}; | ||
|
||
address = mkOption { | ||
type = str; | ||
default = ""; | ||
description = "IP address"; | ||
}; | ||
|
||
subscriptions = mkOption { | ||
type = listOf str; | ||
default = [ ]; | ||
description = "Subscriptions"; | ||
}; | ||
|
||
socket = mkOption { | ||
description = "The socket configuration."; | ||
default = {}; | ||
type = submodule { | ||
options = { | ||
bind = mkOption { | ||
type = str; | ||
default = "127.0.0.1"; | ||
description = "The IP address on which the client listens."; | ||
}; | ||
|
||
port = mkOption { | ||
type = int; | ||
default = 3030; | ||
description = "The port on which the client listens."; | ||
}; | ||
}; | ||
}; | ||
}; | ||
|
||
vars = mkOption { | ||
type = attrs; | ||
default = {}; | ||
description = "Custom attributes/variables."; | ||
}; | ||
|
||
execEnv = mkOption { | ||
type = package; | ||
description = "The execution environment for all checks."; | ||
}; | ||
|
||
wrapper = mkOption { | ||
type = nullOr path; | ||
description = "The wrapper script used for executing all the checks."; | ||
default = null; | ||
}; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,112 @@ | ||
{ config, lib, cfg }: | ||
|
||
{ | ||
options = with lib; with types; { | ||
enable = mkOption { | ||
type = bool; | ||
default = (cfg.role == "server"); | ||
description = "Enable the dashboard"; | ||
}; | ||
|
||
host = mkOption { | ||
type = str; | ||
default = "127.0.0.1"; | ||
description = "The IP address on which Uchiwa will listen."; | ||
}; | ||
|
||
port = mkOption { | ||
type = int; | ||
default = 3000; | ||
description = "The port on which Uchiwa will listen."; | ||
}; | ||
|
||
refresh = mkOption { | ||
type = int; | ||
default = 5; | ||
description = "UI refresh interval."; | ||
}; | ||
|
||
proxy = mkOption { | ||
description = "Proxy traffic to/from the sensu dashboard."; | ||
default = {}; | ||
type = submodule { | ||
options = { | ||
enable = mkOption { | ||
type = bool; | ||
default = false; | ||
description = "Enable proxy."; | ||
}; | ||
|
||
path = mkOption { | ||
type = str; | ||
default = "/"; | ||
description = "The path to the dashboard if behind a proxy."; | ||
}; | ||
|
||
name = mkOption { | ||
type = str; | ||
default = config.networking.hostName; | ||
description = "Hostname on which to repond."; | ||
}; | ||
|
||
enableSSL = mkOption { | ||
type = bool; | ||
default = false; | ||
description = "Force SSL."; | ||
}; | ||
}; | ||
}; | ||
}; | ||
|
||
users = mkOption { | ||
description = "Users"; | ||
default = {}; | ||
type = listOf(submodule { | ||
options = { | ||
username = mkOption { | ||
description = "User name."; | ||
type = str; | ||
}; | ||
|
||
password = mkOption { | ||
description = "Password."; | ||
type = str; | ||
}; | ||
|
||
accessToken = mkOption { | ||
default = ""; | ||
description = "Access token."; | ||
type = str; | ||
}; | ||
|
||
readonly = mkOption { | ||
default = false; | ||
description = "Read only."; | ||
type = bool; | ||
}; | ||
}; | ||
}); | ||
}; | ||
|
||
usersOptions = mkOption { | ||
description = "Options relevant to all users"; | ||
default = {}; | ||
type = submodule { | ||
options = { | ||
|
||
defaultTheme = mkOption { | ||
type = enum [ "uchiwa-default" "uchiwa-dark" ]; | ||
default = "uchiwa-dark"; | ||
description = "The theme to use."; | ||
}; | ||
|
||
logoUrl = mkOption { | ||
type = str; | ||
default = ""; | ||
description = "The logo to use."; | ||
}; | ||
}; | ||
}; | ||
}; | ||
}; | ||
} |
Oops, something went wrong.