Przeglądaj źródła

some monit fixes. add fail2ban monit dist conf file and rootfs check. dont generate invalid password.

Thomas Buck 5 lat temu
rodzic
commit
21f6ac8d7e

+ 1
- 1
roles/monitoring/defaults/main.yml Wyświetl plik

4
 
4
 
5
 # must match values in roles/common
5
 # must match values in roles/common
6
 monit_admin_username: "{{ main_user_name }}"
6
 monit_admin_username: "{{ main_user_name }}"
7
-monit_admin_password: "{{ lookup('password', secret + '/' + 'monit_admin_password length=16') }}"
7
+monit_admin_password: "{{ lookup('password', secret + '/' + 'monit_admin_password length=16 chars=hexdigits') }}"
8
 
8
 
9
 monit_page_public: 1
9
 monit_page_public: 1
10
 monit_subdomain: status
10
 monit_subdomain: status

+ 10
- 1
roles/monitoring/templates/etc_monit_monitrc.j2 Wyświetl plik

224
 #    if inode usage > 99% then stop
224
 #    if inode usage > 99% then stop
225
 #    group server
225
 #    group server
226
 #
226
 #
227
+
228
+check filesystem rootfs with path /
229
+    if space usage > 80% for 5 times within 15 cycles then alert
230
+    if space usage > 99% then alert
231
+    if inode usage > 80% for 5 times within 15 cycles then alert
232
+    if inode usage > 99% then alert
233
+    group server
234
+
227
 #
235
 #
228
 ## Check a file's timestamp. In this example, we test if a file is older
236
 ## Check a file's timestamp. In this example, we test if a file is older
229
 ## than 15 minutes and assume something is wrong if its not updated. Also,
237
 ## than 15 minutes and assume something is wrong if its not updated. Also,
266
 ## It is possible to include additional configuration parts from other files or
274
 ## It is possible to include additional configuration parts from other files or
267
 ## directories.
275
 ## directories.
268
 #
276
 #
269
-   include /etc/monit/conf.d/*
270
 
277
 
278
+include /etc/monit/conf.d/*
279
+include /etc/monit/monitrc.d/*

Ładowanie…
Anuluj
Zapisz