views:

88

answers:

2

I have to write a service to monitor a complex system. I searched Google for some articles, but didn't find exactly what I was looking for. Does anyone have any good resources for writing a service to monitor a complex system?

A: 

I think you're asking about health monitoring. Here's the online documentation from MSDN on the built-in health monitoring capabilities in .Net. Among other things, this lets you define rules for auditing specific events such as errors in the application or failed log-in attempts.

Paul Morie
A: 

My favorite method consists of sending WM_COPYDATA messages from an application that watches the application you want to monitor. Send the message (with a timeout) and see how long it takes to get a response. When that respose goes out-of-band, then terminate the process.

I have used this block of code as a base for doing this for a long time. I don't know where it got started, but kudos to whoever first wrote it.

JasonRShaver