Parcourir la source

Merge pull request #102 from cji/master

Add logwatch to the monitoring role to email daily log summaries
Alex Payne il y a 10 ans
Parent
révision
122fc668e3
2 fichiers modifiés avec 7 ajouts et 1 suppressions
  1. 5
    0
      roles/monitoring/tasks/logwatch.yml
  2. 2
    1
      roles/monitoring/tasks/main.yml

+ 5
- 0
roles/monitoring/tasks/logwatch.yml Voir le fichier

@@ -0,0 +1,5 @@
1
+- name: Install logwatch
2
+  apt: pkg=logwatch state=installed
3
+
4
+- name: Configure logwatch to email {{ main_user_name }}@{{ domain }} daily
5
+  action: lineinfile dest=/etc/cron.daily/00logwatch regexp="^/usr/sbin/logwatch" line="/usr/sbin/logwatch --output mail --mailto {{ main_user_name }}@{{ domain }} --detail high" state=present create=yes

+ 2
- 1
roles/monitoring/tasks/main.yml Voir le fichier

@@ -1 +1,2 @@
1
-- include: monit.yml tags=monit
1
+- include: monit.yml tags=monit
2
+- include: logwatch.yml tags=logwatch

Chargement…
Annuler
Enregistrer