diff options
Diffstat (limited to 'modules/private/monitoring/objects_common.nix')
-rw-r--r-- | modules/private/monitoring/objects_common.nix | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/modules/private/monitoring/objects_common.nix b/modules/private/monitoring/objects_common.nix index c0a17e6..d3a46ce 100644 --- a/modules/private/monitoring/objects_common.nix +++ b/modules/private/monitoring/objects_common.nix | |||
@@ -1,5 +1,6 @@ | |||
1 | { hostFQDN | 1 | { hostFQDN |
2 | , hostName | 2 | , hostName |
3 | , interface ? "eth0" | ||
3 | , processWarn ? "250" | 4 | , processWarn ? "250" |
4 | , processAlert ? "400" | 5 | , processAlert ? "400" |
5 | , loadWarn ? "8.0" | 6 | , loadWarn ? "8.0" |
@@ -51,6 +52,20 @@ in | |||
51 | } | 52 | } |
52 | { | 53 | { |
53 | passiveInfo = defaultPassiveInfo; | 54 | passiveInfo = defaultPassiveInfo; |
55 | service_description = "Network bandwidth"; | ||
56 | use = "local-service"; | ||
57 | check_interval = "2"; | ||
58 | max_check_attempts = "20"; | ||
59 | retry_interval = "2"; | ||
60 | check_command = [ | ||
61 | "check_local_bandwidth" | ||
62 | interface | ||
63 | "20480" # kb/s | ||
64 | "51200" # kb/s | ||
65 | ]; | ||
66 | } | ||
67 | { | ||
68 | passiveInfo = defaultPassiveInfo; | ||
54 | service_description = "Average load"; | 69 | service_description = "Average load"; |
55 | use = "local-service"; | 70 | use = "local-service"; |
56 | check_command = [ | 71 | check_command = [ |
@@ -108,6 +123,7 @@ in | |||
108 | check_local_procs = "$USER1$/check_procs -w $ARG1$ -c $ARG2$ -s $ARG3$"; | 123 | check_local_procs = "$USER1$/check_procs -w $ARG1$ -c $ARG2$ -s $ARG3$"; |
109 | check_local_load = "$USER1$/check_load -w $ARG1$ -c $ARG2$"; | 124 | check_local_load = "$USER1$/check_load -w $ARG1$ -c $ARG2$"; |
110 | check_local_swap = "$USER1$/check_swap -n ok -w $ARG1$ -c $ARG2$"; | 125 | check_local_swap = "$USER1$/check_swap -n ok -w $ARG1$ -c $ARG2$"; |
126 | check_local_bandwidth = "$USER2$/check_bandwidth -i=$ARG1$ -w $ARG2$ -c $ARG3$"; | ||
111 | check_memory = "$USER2$/check_mem.sh -w $ARG1$ -c $ARG2$"; | 127 | check_memory = "$USER2$/check_mem.sh -w $ARG1$ -c $ARG2$"; |
112 | check_command_match = "$USER2$/check_command -c \"$ARG1$\" -C \"$ARG2$\" $ARG3$"; | 128 | check_command_match = "$USER2$/check_command -c \"$ARG1$\" -C \"$ARG2$\" $ARG3$"; |
113 | check_command_output = "$USER2$/check_command -c \"$ARG1$\" -s 0 -o \"$ARG2$\" $ARG3$"; | 129 | check_command_output = "$USER2$/check_command -c \"$ARG1$\" -s 0 -o \"$ARG2$\" $ARG3$"; |