Fix monitrc and line endings for monit templates

This commit is contained in:
KemoNine 2020-08-05 00:47:34 +00:00
parent eb08e68432
commit 991ccf76ac
3 changed files with 25 additions and 22 deletions

View file

@ -1,2 +1,2 @@
check filesystem {{ item.name }} with path {{ item.path }} check filesystem {{ item.name }} with path {{ item.path }}
if space usage > {{ item.alert }} then alert if space usage > {{ item.alert }} then alert

View file

@ -1,5 +1,5 @@
check process fim matching /usr/bin/fim check process fim matching /usr/bin/fim
start program = "/usr/bin/systemctl start fim" start program = "/usr/bin/systemctl start fim"
stop program = "/usr/bin/systemctl stop fim" stop program = "/usr/bin/systemctl stop fim"
if does not exist then alert if does not exist then alert
if does not exist for 2 cycles then restart if does not exist for 2 cycles then restart

View file

@ -1,15 +1,18 @@
set log /var/log/monit.log set daemon 120
set idfile /var/lib/monit/id set log /var/log/monit.log
set statefile /var/lib/monit/state set idfile /var/lib/monit/id
set eventqueue set statefile /var/lib/monit/state
set eventqueue
set mailserver {{ monit_smtp_server }} port 587 basedir /var/lib/monit/events # set the base directory where events will be stored
username "{{ monit_smtp_user }}" password "{{ monit_smtp_password }}" slots 100 # optionally limit the queue size
using tls
set mailserver {{ monit_smtp_server }} port 587
set httpd port 2812 and username "{{ monit_smtp_user }}" password "{{ monit_smtp_password }}"
use address 0.0.0.0 using tls
allow {{ monit_web_user }}:{{ monit_web_pasword }}
set httpd port 2812 and
include /etc/monit/conf.d/* use address 0.0.0.0
include /etc/monit/conf-enabled/* allow {{ monit_web_user }}:{{ monit_web_pasword }}
include /etc/monit/conf.d/*
include /etc/monit/conf-enabled/*