(Feb 20, 2016, 09:33 AM)Mike Wrote: Great @lostprophet
Hi Mike,
It seems I have a setup problem with Monit. Upon switching from a Pi2 to a Pi3, I re-installed, configured the HTPC again from the ground up based on the original Minibian image (not yours).
I am almost done, I installed Monit again, set it to monitor all the services (Couchpotato, SickRage, Transmission, and so on), and it works ok - if I kill once process (ex: miniDLNA ) it reports it and restarts it ok.
However, I do not get any email notification. My config file is:
set daemon 60 #check services every 60 seconds
set logfile /var/log/monit.log
set idfile /var/lib/monit/id
set statefile /var/lib/monit/state
#Event queue
set eventqueue
basedir /var/lib/monit/events # set the base directory where events will be stored
slots 100 # optionally limit the queue size
#Mail settings
# set mail-format {
# from: monit@$HOST
# subject: monit alert -- $EVENT $SERVICE
# message: $EVENT Service $SERVICE
# Date: $DATE
# Action: $ACTION
# Host: $HOST
# Description: $DESCRIPTION
#
# Your faithful employee,
# Monit }
# set mailserver smtp.gmail.com port 587
# username "user@gmail.com" password "*********"
# using TLSV1 with timeout 30 seconds
# set alert user@gmail.com #email address which will receive monit alerts
#http settings
set httpd port 2812 address 0.0.0.0 # allow port 2812 connections on all network adapters
ssl enable
pemfile /var/certs/monit.pem
allow 0.0.0.0/0.0.0.0 # allow all IPs, can use local subnet too
# allow **** # allow dynamicdns address to connect
allow ****:"*****" # require user htpc with password guides
#allow modular structure
include /etc/monit/conf.d/*
For password I use a unic code to by-pass the 2 factor authentication for gmail.
Edit: - I am dumb - I solved it - I had to uncomment the lines after #Mail settings - and it works perfectly.