-
Download and install Service Protector.
-
Start Service Protector.
-
Select Protector > Add to open the Add Protector window:
-
On the General tab, in the Service to protect field, select your Consul Windows Service.
If you followed the "Installing Consul as a Service" guide, the service will be called Consul:
-
If you want to prevent Consul from consuming too much RAM, switch to the Monitor tab and activate the memory threshold feature.
Enter the maximum number of megabytes that Consul should use before it is stopped and restarted.
-
We're done with the basic setup so click the Save button to record your settings. In a few seconds, an entry for Consul will show up in the Service Protector window.
The shield icon in the Protected column will be green — indicating that Consul is being monitored by Service Protector:
You can click the green "Running" circle to see how the Consul service is doing:
Similarly, clicking the shield icon will show the status of protection.
-
And that's it! Next time your computer boots, Consul will start up automatically and Service Protector will start monitoring the service to restart it quickly it if it crashes for any reason.
We encourage you to edit the Consul entry in Service Protector and check out the many other settings that may be helpful in your environment.
For example, restart the service if it hogs the CPU, send an email notification if the service stops, and much more.