diff options
Diffstat (limited to 'modules/private/monitoring/objects_tiboqorl-fr.nix')
-rw-r--r-- | modules/private/monitoring/objects_tiboqorl-fr.nix | 174 |
1 files changed, 0 insertions, 174 deletions
diff --git a/modules/private/monitoring/objects_tiboqorl-fr.nix b/modules/private/monitoring/objects_tiboqorl-fr.nix deleted file mode 100644 index b49a1d8..0000000 --- a/modules/private/monitoring/objects_tiboqorl-fr.nix +++ /dev/null | |||
@@ -1,174 +0,0 @@ | |||
1 | { lib, ... }: | ||
2 | let | ||
3 | hostFQDN = "tiboqorl.fr"; | ||
4 | defaultPassiveInfo = { | ||
5 | filter = lib.attrsets.filterAttrs | ||
6 | (k: v: builtins.elem k ["service_description"] || builtins.substring 0 1 k == "_"); | ||
7 | use = "external-passive-service"; | ||
8 | contact_groups = "tiboqorl"; | ||
9 | freshness_threshold = "450"; | ||
10 | notification_interval = "240"; | ||
11 | retry_interval = "1"; | ||
12 | servicegroups = "webstatus-resources"; | ||
13 | _webstatus_namespace = "tiboqorl"; | ||
14 | host_name = hostFQDN; | ||
15 | }; | ||
16 | in | ||
17 | { | ||
18 | host = { | ||
19 | "tiboqorl.fr" = { | ||
20 | alias = "tiboqorl.fr"; | ||
21 | address = "tiboqorl.fr"; | ||
22 | use = "linux-server"; | ||
23 | contact_groups = "tiboqorl"; | ||
24 | hostgroups = "webstatus-hosts"; | ||
25 | _webstatus_name = "tiboqorl"; | ||
26 | _webstatus_vhost = "status.immae.eu"; | ||
27 | _webstatus_namespace = "tiboqorl"; | ||
28 | }; | ||
29 | }; | ||
30 | service = [ | ||
31 | { | ||
32 | passiveInfo = defaultPassiveInfo; | ||
33 | service_description = "Size on root partition"; | ||
34 | use = "local-service"; | ||
35 | check_command = ["check_local_disk" "20%" "10%" "/"]; | ||
36 | } | ||
37 | { | ||
38 | passiveInfo = defaultPassiveInfo; | ||
39 | service_description = "Total number of process"; | ||
40 | use = "local-service"; | ||
41 | check_command = [ "check_local_procs" "250" "400" "RSZDT" ]; | ||
42 | } | ||
43 | { | ||
44 | passiveInfo = defaultPassiveInfo; | ||
45 | service_description = "Network bandwidth"; | ||
46 | use = "local-service"; | ||
47 | check_interval = "2"; | ||
48 | max_check_attempts = "20"; | ||
49 | retry_interval = "2"; | ||
50 | check_command = [ | ||
51 | "check_local_bandwidth" | ||
52 | "eth0" | ||
53 | "20480" # kb/s | ||
54 | "51200" # kb/s | ||
55 | ]; | ||
56 | } | ||
57 | { | ||
58 | passiveInfo = defaultPassiveInfo; | ||
59 | service_description = "Average load"; | ||
60 | use = "local-service"; | ||
61 | check_command = [ | ||
62 | "check_local_load" | ||
63 | "0.75,0.75,0.75" # warn | ||
64 | "1.0,1.0,1.0" # alert | ||
65 | ]; | ||
66 | } | ||
67 | { | ||
68 | passiveInfo = defaultPassiveInfo; | ||
69 | service_description = "Swap usage"; | ||
70 | use = "local-service"; | ||
71 | check_command = ["check_local_swap" "20" "10"]; | ||
72 | } | ||
73 | { | ||
74 | passiveInfo = defaultPassiveInfo; | ||
75 | service_description = "Memory usage"; | ||
76 | use = "local-service"; | ||
77 | check_command = ["check_memory" "80" "90"]; | ||
78 | } | ||
79 | { | ||
80 | passiveInfo = defaultPassiveInfo; | ||
81 | service_description = "NTP is activated and working"; | ||
82 | use = "local-service"; | ||
83 | check_command = ["check_ntp"]; | ||
84 | } | ||
85 | ]; | ||
86 | command = { | ||
87 | check_local_disk = "$USER1$/check_disk -w $ARG1$ -c $ARG2$ -p $ARG3$"; | ||
88 | check_local_procs = "$USER1$/check_procs -w $ARG1$ -c $ARG2$ -s $ARG3$"; | ||
89 | check_local_load = "$USER1$/check_load -w $ARG1$ -c $ARG2$"; | ||
90 | check_local_swap = "$USER1$/check_swap -n ok -w $ARG1$ -c $ARG2$"; | ||
91 | check_local_bandwidth = "$USER2$/check_bandwidth -i=$ARG1$ -w $ARG2$ -c $ARG3$"; | ||
92 | check_memory = "$USER2$/check_mem.sh -w $ARG1$ -c $ARG2$"; | ||
93 | check_ntp = "$USER1$/check_ntp_time -t 30 -q -H 0.arch.pool.ntp.org"; | ||
94 | |||
95 | check_host_alive = "$USER1$/check_ping -H $HOSTADDRESS$ -w 3000.0,80% -c 5000.0,100% -p 5"; | ||
96 | |||
97 | notify-master = "$USER2$/send_nrdp.sh -u \"$USER200$\" -t \"$USER201$\" -H \"$HOSTADDRESS$\" -s \"$SERVICEDESC$\" -S \"$SERVICESTATEID$\" -o \"$SERVICEOUTPUT$ | $SERVICEPERFDATA$\""; | ||
98 | }; | ||
99 | timeperiod = { | ||
100 | "24x7" = { | ||
101 | alias = "24 Hours A Day, 7 Days A Week"; | ||
102 | monday = "00:00-24:00"; | ||
103 | tuesday = "00:00-24:00"; | ||
104 | wednesday = "00:00-24:00"; | ||
105 | thursday = "00:00-24:00"; | ||
106 | friday = "00:00-24:00"; | ||
107 | saturday = "00:00-24:00"; | ||
108 | sunday = "00:00-24:00"; | ||
109 | }; | ||
110 | }; | ||
111 | servicegroup = { | ||
112 | webstatus-resources = { alias = "Local resources"; }; | ||
113 | }; | ||
114 | hostgroup = { | ||
115 | webstatus-hosts = { alias = "Hosts"; }; | ||
116 | }; | ||
117 | contactgroup = { | ||
118 | tiboqorl = { alias = "Naemon Administrators"; }; | ||
119 | }; | ||
120 | templates = { | ||
121 | service = { | ||
122 | generic-service = { | ||
123 | active_checks_enabled = "1"; | ||
124 | check_freshness = "0"; | ||
125 | check_interval = "10"; | ||
126 | check_period = "24x7"; | ||
127 | contact_groups = "tiboqorl"; | ||
128 | event_handler_enabled = "1"; | ||
129 | flap_detection_enabled = "1"; | ||
130 | is_volatile = "0"; | ||
131 | max_check_attempts = "3"; | ||
132 | notification_interval = "60"; | ||
133 | notification_options = "w,u,c,r,f,s"; | ||
134 | notification_period = "24x7"; | ||
135 | notifications_enabled = "0"; | ||
136 | obsess_over_service = "1"; | ||
137 | passive_checks_enabled = "1"; | ||
138 | process_perf_data = "1"; | ||
139 | retain_nonstatus_information = "1"; | ||
140 | retain_status_information = "1"; | ||
141 | retry_interval = "2"; | ||
142 | }; | ||
143 | local-service = { | ||
144 | use = "generic-service"; | ||
145 | host_name = hostFQDN; | ||
146 | check_interval = "5"; | ||
147 | max_check_attempts = "4"; | ||
148 | retry_interval = "1"; | ||
149 | servicegroups = "webstatus-resources"; | ||
150 | }; | ||
151 | }; | ||
152 | host = { | ||
153 | generic-host = { | ||
154 | event_handler_enabled = "1"; | ||
155 | flap_detection_enabled = "1"; | ||
156 | notification_period = "24x7"; | ||
157 | notifications_enabled = "1"; | ||
158 | process_perf_data = "1"; | ||
159 | retain_nonstatus_information = "1"; | ||
160 | retain_status_information = "1"; | ||
161 | }; | ||
162 | linux-server = { | ||
163 | check_command = "check_host_alive"; | ||
164 | check_interval = "5"; | ||
165 | check_period = "24x7"; | ||
166 | contact_groups = "tiboqorl"; | ||
167 | max_check_attempts = "10"; | ||
168 | notification_interval = "120"; | ||
169 | notification_options = "d,u,r,f"; | ||
170 | retry_interval = "1"; | ||
171 | }; | ||
172 | }; | ||
173 | }; | ||
174 | } | ||