liveBook · Manning

Service Monitor

As explained in Learn Docker in a Month of Lunches, Second Edition

Service Monitor is a Microsoft console utility that starts and watches a Windows Service as a container entry process.

Service Monitor is a Microsoft console utility used as a Windows container entry point. It starts a selected Windows Service and watches its health. section 13.2

Docker expects to monitor one container process, but applications such as ASP.NET hosted in IIS run through a Windows Service and worker process. Service Monitor bridges that mismatch. section 13.2

Use the monitor to align service behavior with container behavior:

  • Configure Service Monitor to start the required Windows Service. section 13.2
  • Let it watch the service while the container runs. section 13.2
  • Allow the monitor to end when the service fails, so the container exits and reports application failure. section 13.2

IIS-hosted ASP.NET application

An IIS container can use Service Monitor to start and watch the IIS Windows Service. IIS then starts w3wp.exe for web requests, while Docker tracks the monitor and receives a container status that reflects the service. section 13.2

Figure 13.5 Monitor tools run a legacy application the way it was designed while making it behave like an ordinary container.
figure

A figure shows how monitor tools preserve a legacy application's original runtime model while making it behave like an ordinary container. section 13.2

How Learn Docker in a Month of Lunches, Second Edition covers it

How deep it goes
Explains service startup, monitoring, failure propagation, and the process mismatch, but does not provide an invocation command.
Examples
Uses IIS-hosted ASP.NET, svchost.exe, and w3wp.exe to illustrate service and worker-process relationships.
What it assumes
Assumes Docker's single-process container model and Windows Services, while explaining their integration from the application scenario.
What you can do after
Operate/configure Windows application containers whose status reflects the health of a Windows Service.
How it connects
Connects Windows Services, Docker containers, IIS, ASP.NET, worker processes, and Log Monitor.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Learn Docker in a Month of Lunches, Second Edition. The section links point to the parts of the book it draws on.