Hello,
This is a request for a "generic" equivalent to IIS Service Monitor : https://github.com/microsoft/IIS.ServiceMonitor
Within my organisation, we have containerized a WCF service application.
This application is runned as a self-hosted Windows NT service.
We do not need IIS (we want to stay in this self-hosted mode and maintain our image as small as possible).
In this context, we would like to use some "NT Service Monitor" tool as Docker ENTRYPOINT.
The important point here is that we want to benefit of the full capacities of the existing "IIS Service Monitor" tool (see above link), but not only with IIS/w3svc services...
By "full capacities", I mean passing the environments variables to the monitored service.
Also, we would like to monitor multiples services (in some mode, our container has to run -and monitor- 2 NT Services in a single docker instance).
By now, our entry point is a PS script.
Here is an overview of the script content :
- copy entrypoint "Process" env vars to the "Machine" level (so that future services can "inherit" them)
- start service(s)
- monitor service(s)
We use IIS ServiceMonitor.exe only for the third step (even if it can only monitor our "main" service, even if we run multiple.).
We had to code the whole process on own, whereas ServiceMonor.exe can handle step "1)" for IIS App pools...
(Note: For that first step, we had no choice to copy env variables globally (machine scope), an alternative to pass it only to the our monitored services/processes scope would be appreciate...)
To sum up, we think a unique tool should exists to :
- Start and monitor one (or mutiple) windows services (or process) (not only IIS Apps)
- Pass the "Dockerfile" env vars to monitored processes and services.
- Define and optional "exitpoint command" that would be run if some monitored process exits, before the container instance fail (a timeout would be necessary, as this extra command should not hang the failed instance forever).
(This last point is not mandatory, but it would be appreciate for diagnostic purpose. When our docker instance fail for an obscure reason, we would like to collect some "diagnostic report" (windows events, log files, etc.) and send it to a persistent repository).
All of this should be define as a single ENTYPOINT command on that tool.
A single tool would avoid some custom scripting for folks like us who have windows application containerized, but not using IIS...
Thank you for that opportunity to send this request,
Geoffrey