Application monitoring, how?

B

Bob

I've got dot net Winform apps that are running in a backroom server with no
user interaction. They are supposed to run unattended 24 7 365. They are IVR
apps taking orders via telephony. Problem is nobody is looking at them to
know if they are OK. They have err trapping built in and there's logging and
tracing to log files, but nobody there looks at that. What I need is to find
a way to advise one or more managers immediately when an app is hanging or
if an unhandled exception occurred. Handled exceptions are easy, I could
just send them an e-mail. Unhandled execptions are a problem, app hangs, so
you can't execute code that sends en e-mail, its hung. So no one sees it and
no one knows.They only realise after a few hours of info not coming in, then
its easy to fix and restart app. But this is far from ideal. Want to find a
way to alarm admins immediately as problem occurs. Could be things like bad
network connection causing it, stuff unforeseen. Anyone have any ideas on
how to do this? Any help would be greatly appreciated.

Bob
 
M

Markis Taylor

Try something like this:

'Variable to hold individual Process
Dim objProcess As New Process
'Collection of Processes
Dim objProcesses() As Process
'Put all the processes by a specific name in the collection
objProcesses = Process.GetProcesses()

'Cycle through all the processes
For Each objProcess In objProcesses
If Not objProcess.Responding Then
'Go notify administrators.
End If
Next
 
T

ThunderMusic

www.logicielsjupiter.com

The company just started, but their product is just fantastic and
expandable... They have a module just for what you need... monitoring
processes... and with it you can send e-mail, start another application or
even send a SMS message and there are more to come...

I hope it helps
 
N

Nick Malik [Microsoft]

two ways to do this:
External monitoring of response
and
External monitoring of messages

If you app is locked up, all of the techniques that would live within your
app will fail.

External monitoring of response requires that you provide an interface for
your app that another app will call. When I've done this, I've called it
"healthcheck" but others have called it "ping" or even "verifysanity". The
point is that you provide an interface. I would suggest that .Net Remoting
is an excellent technique for exposing this interface. Then you need to
have a small, external app that hits this interface once a minute or so to
see if there is a response. If not, that external app can send warnings or
even reset the app itself.

External monitoring of messages requires that you log messages to a log
location that another process watches. That other process looks for
messages that indicate failure and raises an alarm. SMS is very good at
doing this, and if your organization uses Microsoft Operations Manager, you
can wire up a solution with no code, as long as you are already throwing
messages to the event log.

Hope this helps,

--
--- Nick Malik [Microsoft]
MCSD, CFPS, Certified Scrummaster
http://blogs.msdn.com/nickmalik

Disclaimer: Opinions expressed in this forum are my own, and not
representative of my employer.
I do not answer questions on behalf of my employer. I'm just a
programmer helping programmers.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top