2020-07-26T11:15:38 monit: /usr/local/etc/monitrc:14: syntax error 'mail-format'2020-07-26T11:15:30 root: /usr/local/etc/rc.d/monit: WARNING: failed to start monit
set alert ferd@mydomain.com not on mail-format { From: bart@mydomain.com } reminder on 10 cycles
# DO NOT EDIT THIS FILE -- OPNsense auto-generated fileset httpd unixsocket /var/run/monit.sock allow localhostset daemon 120 with start delay 120set logfile syslog facility log_daemonset mailserver 192.168.1.10 port 25 set alert ferd@mydomain.com not on mail-format { From: bart@mydomain.com } reminder on 10 cyclescheck system bart.mydomain.com if changed status then alert if cpu usage is greater than 75% then alert if loadavg (1min) is greater than 8 then alert if loadavg (5min) is greater than 6 then alert if loadavg (15min) is greater than 4 then alert if memory usage is greater than 75% then alert if failed link then alert if space usage is greater than 75% then alert check filesystem RootFs with path "/" if space usage is greater than 75% then alert check program carp_status_change with path "/usr/local/opnsense/scripts/OPNsense/Monit/carp_status" timeout 300 seconds if changed status then alert check program gateway_alert with path "/usr/local/opnsense/scripts/OPNsense/Monit/gateway_alert" timeout 300 seconds if status != 0 then alert
set alert ferd@mydomain.com not on { uptime } mail-format { From: bart@mydomain.com } reminder on 10 cycles
monit: /usr/local/etc/monitrc:17: syntax error 'changed'
O.K., so now Line 14 is working. But there is now an error on Line 17, Monit doesn't like the 'change' syntax. Should there be another term here - what status changed? I've learnt that Monit is very picky about syntax and constructs and I have found this a struggle. I think you need to study the Monit Manual.
You need to post your config, otherwise not possible to help
2020-08-06T15:14:20 monit[76762]: /usr/local/etc/monitrc:17: syntax error 'changed'
# DO NOT EDIT THIS FILE -- OPNsense auto-generated fileset httpd unixsocket /var/run/monit.sock allow localhostset daemon 120 with start delay 120set logfile syslog facility log_daemonset mailserver 192.168.1.10 port 25 set alert ferd@mydomain.com reminder on 10 cyclescheck system bart.mydomain.com if changed status then alert check filesystem RootFs with path "/" if space usage is greater than 75% then alert check program carp_status_change with path "/usr/local/opnsense/scripts/OPNsense/Monit/carp_status" timeout 300 seconds if changed status then alert check program gateway_alert with path "/usr/local/opnsense/scripts/OPNsense/Monit/gateway_alert" timeout 300 seconds if status != 0 then alert
# DO NOT EDIT THIS FILE -- OPNsense auto-generated fileset httpd unixsocket /var/run/monit.sock allow localhostset daemon 120 with start delay 120set logfile syslog facility log_daemonset mailserver 192.168.1.10 port 25 set alert ferd@mydomain.com reminder on 10 cyclescheck system bart.mydomain.comcheck filesystem RootFs with path "/" if space usage is greater than 75% then alert check program carp_status_change with path "/usr/local/opnsense/scripts/OPNsense/Monit/carp_status" timeout 300 seconds if changed status then alert check program gateway_alert with path "/usr/local/opnsense/scripts/OPNsense/Monit/gateway_alert" timeout 300 seconds if status != 0 then alert
check system $HOST if memory usage is greater than 75% then alert if cpu usage is greater than 75% then alert if loadavg (1min) is greater than 8 then alert if loadavg (5min) is greater than 6 then alert