From 991ccf76ac80aca61b46804322d7a3598130fa58 Mon Sep 17 00:00:00 2001 From: KemoNine Date: Wed, 5 Aug 2020 00:47:34 +0000 Subject: [PATCH] Fix monitrc and line endings for monit templates --- roles/monit/templates/filesystem | 4 ++-- roles/monit/templates/fim | 10 +++++----- roles/monit/templates/monitrc | 33 +++++++++++++++++--------------- 3 files changed, 25 insertions(+), 22 deletions(-) diff --git a/roles/monit/templates/filesystem b/roles/monit/templates/filesystem index 5e7a678..70e053f 100644 --- a/roles/monit/templates/filesystem +++ b/roles/monit/templates/filesystem @@ -1,2 +1,2 @@ -check filesystem {{ item.name }} with path {{ item.path }} - if space usage > {{ item.alert }} then alert +check filesystem {{ item.name }} with path {{ item.path }} + if space usage > {{ item.alert }} then alert diff --git a/roles/monit/templates/fim b/roles/monit/templates/fim index 87f2ef8..d81bc2c 100644 --- a/roles/monit/templates/fim +++ b/roles/monit/templates/fim @@ -1,5 +1,5 @@ -check process fim matching /usr/bin/fim - start program = "/usr/bin/systemctl start fim" - stop program = "/usr/bin/systemctl stop fim" - if does not exist then alert - if does not exist for 2 cycles then restart +check process fim matching /usr/bin/fim + start program = "/usr/bin/systemctl start fim" + stop program = "/usr/bin/systemctl stop fim" + if does not exist then alert + if does not exist for 2 cycles then restart diff --git a/roles/monit/templates/monitrc b/roles/monit/templates/monitrc index 7efc272..2caf7c0 100644 --- a/roles/monit/templates/monitrc +++ b/roles/monit/templates/monitrc @@ -1,15 +1,18 @@ -set log /var/log/monit.log -set idfile /var/lib/monit/id -set statefile /var/lib/monit/state -set eventqueue - -set mailserver {{ monit_smtp_server }} port 587 - username "{{ monit_smtp_user }}" password "{{ monit_smtp_password }}" - using tls - -set httpd port 2812 and - use address 0.0.0.0 - allow {{ monit_web_user }}:{{ monit_web_pasword }} - -include /etc/monit/conf.d/* -include /etc/monit/conf-enabled/* +set daemon 120 +set log /var/log/monit.log +set idfile /var/lib/monit/id +set statefile /var/lib/monit/state +set eventqueue + basedir /var/lib/monit/events # set the base directory where events will be stored + slots 100 # optionally limit the queue size + +set mailserver {{ monit_smtp_server }} port 587 + username "{{ monit_smtp_user }}" password "{{ monit_smtp_password }}" + using tls + +set httpd port 2812 and + use address 0.0.0.0 + allow {{ monit_web_user }}:{{ monit_web_pasword }} + +include /etc/monit/conf.d/* +include /etc/monit/conf-enabled/*