• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

Add new service to WatchDog module

B

Barry Hunter

Guest
Hi,

We've installed SphinxSearch ( http://www.sphinxsearch.com/ ) on our server, it works great.

I'm now trying to get the WatchDog module (ala monit) to maintain it.


Plesk doesn't seem to include a way to define new services, so (probably not recommended) I inserted a new row in the psa.module_watchdog_service table.

This how shows in the list of serves on the Watchdog page, but its inactive because "Service monitoring is turned off because it shuts down frequently"

- I think the reason is havent told it how to check its alive. Looking at the monit config file, it mostly uses a pidfile to identify if the service is alive. Alas I can't find an option to tell it where the pid file is for the searchd deamon.

(I've called the monitor 'searchd' which matches the name of the sphinx deamon, in case it could simply look at the processlist)

Alas nothing for searchd is added to the monit config file.

Any ideas? Thanks!
 
i have the same question, has anyone a solution or work a round?
 
Hi,

Figured this out just a minute ago, it wasn't too hard.

After adding the row in the psa database, you also have to add a file in the service template directory at /opt/psa/etc/modules/watchdog/service.tpl.d (or wherever the psa dir is on your distribution)

Here is what I used for monitoring clamd. Using what's in the monitrc file as an example, I just typed this in a file named 'clamd' which I then dropped in service.tpl.d/
Code:
check process clamd
        with pidfile "/var/run/clamav/clamd.pid"
        start = "/etc/init.d/clamav-daemon start"
        stop = "/etc/init.d/clamav-daemon stop"
        if failed host localhost port 3310 type tcp with timeout 30 seconds then restart
        every 1 cycles
        mode active

Then disabling-enabling the Watchdog in Plesk will activate it by copying your file in the service template directory to the live directory. Don't mess with the files in service/ or the monitrc files, just drop your customizations in service.tpl.d/ and make sure that the 'check process <name>' matches the name you put in the name field of your newly added row in the psa.module_watchdog_service table
 
Last edited:
Back
Top