MoniRestartAgent
From ISPMan
Add to your monit config:
check process ispman-agent with pidfile "/opt/ispman/var/%%%INSERTYOURHOSTNAME%%%.ispman-agent.pid" start program = "/opt/ispman/bin/ispman-agent start" stop program = "/opt/ispman/bin/ispman-agent stop" alert %%%ALERTEMAIL%%% { nonexist } with the mail-format { from: %%%FROMEMAILADDRESS%%% subject: $SERVICE $EVENT at $DATE message: Monit $ACTION $SERVICE at $DATE on $HOST: $DESCRIPTION. Sadly this happens sometimes with ispman-agent. Basically there is no real need to worry. Regards, monit, your monitoring system. }
(on Debian it is located at /etc/monit/monitrc)
[edit]
Monitor Slapd
(untested yet ...) #Monitoring slapd process. check process slapd with pidfile /var/ldap/var/run/slapd.pid start program = "/etc/init.d/slapd start" stop program = "/etc/init.d/slapd stop" if failed port 389 then restart if 2 restarts within 3 cycles then timeout group server # monit will only monit/give alert in this mode. mode passive # Check Database file, size,permission etc... check file slapd-database with path /var/ldap/var/openldap-data/mydata.db if failed permission 700 then alert if failed uid data then alert if failed gid data then alert if timestamp > 15 minutes then alert if size > 100 MB then alert #Check directory for permission. check directory bin with path /bin if failed permission 755 then unmonitor if failed uid 0 then unmonitor if failed gid 0 then unmonitor