

Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name This is the output from my test home media server, you will want to note down or copy/paste the ports and processes Active Internet connections (only servers) The easiest way is to find out which services are running and their respective ports is to use netstat netstat -plnt var/lib/plexmediaserver/Library/Application Support/Plex Media Server/plexmediaserver.pid

home/htpcguides/.config/NzbDrone/nzbdrone.pid If you find things not working out restart your server and look again. Note that sometimes they are really in /var/run and not /run. See this output and identify the services. Some developers do not follow this convention and there is a workaround further below using ‘matching'. Generally you use the pid files for Monit to look for, this will find any pid files on your system with the correct extension. This reloads the Monit service and activates the new configurations you have added sudo service monit reload Choose Media Server Services to Monitor This tests the Monit syntax and throws an error if something is wrong sudo monit -t I use /usr/bin/service instead of /etc/init.d/servicename because the former method should provide compability across all Debian and Ubuntu distros regardless of whether they use init.d, systemd or upstart.Īfter adding each service I recommend testing the Monit configuration syntax and reloading the Monit service to see if it's working as you expect. Then go back to the SSH terminal or use WinSCP to create the files. Go to your local IP: and enter your credentials to make sure the base install of Monit is working. If either the pid file or port is not responding the service is restarted.Tests if service's port is open on the loopback address.Monitors the existence of the service's pid file.Here is what the Monit configurations essentially do for each media server service Use Monit to Monitor Linux Home Media Server
