You know the saying that if you have a hammer, suddenly everything starts
looking like a nail?  Well, I'm a web developer, so keep that in mind when I
talk about how our company solves that problem, hahaha.

We have several groups that run custom software continuously on a ton of
machines.  For example, we have a report generation program that runs on two
workstations, processing reports continuously out of a queue, and that
program is managed by - well, we'll call it Group A for simplicity.  They've
got several different programs running on a bunch of machines, and we have
that multiplied across a few different groups in-house.  

We have a SQL database table like this:

 - GroupID (char field with A, B, or C)
 - Program (varchar field with the program name they're monitoring, like
"FTP System", "Email Broadcast System", etc.)
 - MachineName (varchar field with the computer system's name that's running
the program, because we could have multiple machines running the same
program)
 - LastUpdatedDate (datetime field)

All of our in-house programs know to hit that table every minute or so - or
basically, every time they make a pass through their routines, regardless of
whether they're under heavy load or whether they're just waiting for more
work.  They update the table with the GroupID, the program name, the machine
name, and the current date/time (populated by the database server, because
the local machine's time could be inaccurate.)

If the programs lock up, they stop writing to the SQL table.

So, we monitor that with a web page.  The web page queries that table for
all records that have not been updated in the last, say, 15 minutes.  If
there are no matching records, it returns the word "ALIVE".  Otherwise, it
lists the records.

ServersAlive hits that page as a URL monitor every few minutes.  The URL
looks like this:

http://myservername/status.asp?GroupID=A

That way I reuse the same page, but have 3 different URL checks in SA, each
passing a different group ID, and each alerting a different group of users.

When the users get an alert, they hit the status page, and they see a list
of which machines are down, and they can go take a look at why the machines
are locked up.

We've had incredibly great success with this: it's survived several network
admins.  Each new network admin that comes in thinks they can do it better,
but this keeps sticking around.  The bottom line is that it's usually easier
to build an external monitoring framework, like the database table I
described, and that way you can monitor it with different tools, and anybody
can update that table regardless of the programming language they're using.
(We have Delphi, ASP, Clarion, and C# apps in-house, and all of them use
this monitoring system since everybody can update SQL pretty easily.)

The problem with trying to control SA directly is that SA is not necessarily
a constant.  For example, network admins may move SA to different boxes with
different permissions, or they may decide to split SA up into multiple boxes
to ease load, or they may just upgrade SA and the new version might break
your integrated monitoring.  Rather than controlling the alerting mechanism,
build a unified alerting table, and that way you can monitor it any way you
want.

If you've got questions on it, I'd be glad to elaborate.

--------------------------------
Brent Ozar - UniFocus
--------------------------------
"I am an island.  I am bloody Ibiza!"
       Will (Hugh Grant), About A Boy
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf
Of Chris Taylor
Sent: Tuesday, September 09, 2003 7:43 AM
To: [EMAIL PROTECTED]
Subject: [SA-list] .NET Development

Hey Everyone,

I'm new to this list and couldn't find anything in the archives for what
I was looking for (nor in documentation).

Anyways, just signed onto a company about 6 weeks ago, they are using
Server Alive, and want the additional software we write to notify server
alive if there is a problem.

So my question is, is there a way to raise an event via programming in
server alive?  I file to place, a COM server to attach to, anything like
that?

If so it would be most appreciated.

Thanks again,
CJ Taylor

To unsubscribe from a list, send a mail message to [EMAIL PROTECTED]
With the following in the body of the message:
   unsubscribe SAlive


To unsubscribe from a list, send a mail message to [EMAIL PROTECTED]
With the following in the body of the message:
   unsubscribe SAlive

Reply via email to