Monitor OpenLiteSpeed with monit

OpenLiteSpeed Monit

To monitor OpenLiteSpeed with monit on Ubuntu Server, create file

vi /etc/monit/conf-enabled/openlitespeed

Add following content

check process OpenLiteSpeed with pidfile /tmp/lshttpd/lshttpd.pid
    start program = "/usr/bin/systemctl start lshttpd"
    stop program = "/usr/bin/systemctl stop lshttpd"

Reload monit with

monit reload

Now monit will monitor OpenLiteSpeed, restart if required. You can check status with

monit status

monit status openlitespeed

If you want to monitor if web server is responding to request, you can use

check process OpenLiteSpeed with pidfile /tmp/lshttpd/lshttpd.pid
    start program = "/usr/bin/systemctl start lshttpd"
    stop program = "/usr/bin/systemctl stop lshttpd"
    if failed host localhost port 80 protocol http then restart
Need help with Linux Server or WordPress? We can help!

Leave a Reply

Your email address will not be published. Required fields are marked *