Cpanel by default monitors all services installed on a server using chkservd daemon
Chkservd monitors all the services and if for some reason a service goes down it automatically tries to restart it.
In the process it sends email notifications and with time this can result to having thousands of emails in your inbox.
Disabling and/or enabling service monitoring can be done from the WHM interface but if the license is not renewed then this will need to be done via the CLI
Below are the steps involved when enabling and/or disabling services from cPanel monitoring via CLI.
- Log in to your server as root
- Copy the original chkservd configuration file before editing using the command below
cp -p /etc/chkserv.d/chkservd.conf /etc/chkserv.d/chkservd.conf.$(date +%F)
This creates a copy of the config file before editing preserving the last edit information.
It is good practice to always create a copy of a config file before editing just in case you need to revert back to the original settings.
- Open the configuration file using your favorite editor
- The services can be enabled and disabled by using 0 and 1
- Restart chkservd