Skip to content

Instantly share code, notes, and snippets.

@fduran
Created February 20, 2012 18:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fduran/1870548 to your computer and use it in GitHub Desktop.
Save fduran/1870548 to your computer and use it in GitHub Desktop.
Monitoring Plesk with Monit
www.fduran.com
Monitoring Plesk with Monit
Plesk is not mentioned anywhere in monit's site http://www.google.com/search?sourceid=chrome&ie=UTF-8&q=plesk+site%3Ammonit.com and I couldn't find any article or tutorial about how to monitor Plesk using Monit, so I'm writing one myself in the hopes other people with the same problem find it.
Plesk 8.3 on Centos5
etc/init.d/psa status
psa dead but subsys locked
I check plesk's logs but there's nothing there that sheds light on this issue and server utilization has been low.
the "solution" given by the vendor is to restart plesk http://kb.parallels.com/6566 (duh! but why is Plesk dying?)
so I looked into adding Plesk as a monitored service in monit.
upgraded monit to Monit 5.2.5
add to monit config file:
check process https with pidfile /usr/local/psa/admin/logs/httpsd.pid
start program = "/etc/init.d/psa start"
stop program = "/etc/init.d/psa stop"
if failed host localhost port 8443 type tcpSSL protocol http
then restart
after restarting monit
Error: ssl check cannot be activated. SSL is not supported
apt-get install libssl-dev (dind't work)
apt-get install openssl-devel (Centos5)
apt-cache search ssl-dev
this fixed the ssl support issue.
If that monit configuraiton is not working check that the pid file exists at that location when Plesk is running, test plesk (psa) start/stop commands and check monit errors in its log.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment