Search code examples
c#.netwindows-services

Monitoring a custom windows service


I've built a windows service application using Visual Studio .NET and C#. This service will be deployed on a few hundred machines and I'm looking for a solid way to monitor the application. By monitor, I mean, I just want to check to make sure that it's running, and check the status of a few settings on each client.

Is there a common method of doing this?


Solution

  • The easiest thing to do is have each application "call home". Create a single central application, preferably a web app, and have the remote applications make a small call to the central app on whatever interval you feel is necessary. They can include the extra information you want to monitor.

    Keep a list of where the application is deployed and if you don't get a call from any on the list within the expected timeframe, then you know it's offline.

    If you can't change the actual application that you're monitoring, then write a small companion application that can run as a scheduled tasks and perform the same local checks and call back to the central application.

    We do this with thousands of client machines worldwide and it works well.