diff --git a/roles/monit/tasks/main.yml b/roles/monit/tasks/main.yml index 7224934..9406c77 100644 --- a/roles/monit/tasks/main.yml +++ b/roles/monit/tasks/main.yml @@ -1,20 +1,25 @@ --- - name: Install monit - package: name=monit state=present update_cache=yes + package: + name: monit + state: present + update_cache: yes + - name: Enable and start monit service systemd: name: monit.service state: started enabled: True + - name: Create fullBackup.sh copy: src: checkBackupStatus.sh dest: /usr/local/bin/checkBackupStatus.sh mode: 0700 + - name: Copy monit config template: src: monitrc dest: /etc/monit/monitrc mode: 0600 - notify: - - reload monit + notify: reload monit diff --git a/roles/monit/templates/monitrc b/roles/monit/templates/monitrc index 30f7ac8..b787bb1 100755 --- a/roles/monit/templates/monitrc +++ b/roles/monit/templates/monitrc @@ -299,7 +299,7 @@ check filesystem root with path / ## Check a network link status (up/down), link capacity changes, saturation ## and bandwidth usage. # -check network public with interface enp4s0 +check network public with interface enp3s0 if failed link then alert # if changed link then alert # if saturation > 90% then alert