I have a cluster of legacy windows service. All of this services is installed on several servers, but the service may be down for some reasons, such as memory leak, filesystem exceptions and sql connection exceptions. So we have to remote the server and check the status of the service daily. Although restore action is added. But it is still not robust, controllable.
The solution I want to find is, integrate all of those exist services to one windows service . This host service can run the sub services and scheduled them and monitor them, when errors occurred, my host service can restore , log the error to database and send email to related people. The solution also can make me to schedule the service, such as stop , set periodically. So I want to know is there a way I don't need to modify the assembly of the exist windows service which inherit from servicebase and integrate them to my framework. I thought that the OS can host the sub service , there must a way that my Host service or frame work can also host the sub service and schedule them too.
My final target is there is only one windows service , it is my host service. Other sub service runs under my service without installed to the OS.
I have dug some related thread below, but they can't fit my requirements: