Event Log Monitoring

S

Scott

I would like to create a program that will monitor up to
15 different servers over a WAN link. Actually, what I am
thinking is that I will develop an application that will
be installed on each of these remote servers. This
application will do one of the following:

1) Write to a SQL Server for every entry written to a
specific log, if it is a warning or an error.

2) Run once per day and write to a SQL Server every
error/warning event since the last time it was run.

I still cannot decide which way I should go. Any
suggestions?!? If I decide to go with the second route, I
am currently using a foreach statement to cycle through
the various events. However, I would like to setup the
foreach statement to only cycle through events since a
particular date, and even then to only cycle through
errors/warnings. Does anybody know how to do this?

Thank you for your help!
 
R

Rami Saad

Well, it depends. The first solution would take much time, and cost more.
But this solution will be the best in case you face a problem in the middle
of a working day, so u need to look at the most recent logs. And i don't
think u'll want to look at yesterday's logs.....As for the second solution,
it's less cotly, and much faster. You can run a process to flush the logs
once per day, after the workers finish their work......But on the other
hand, if you face a problem during working hours, then you won't be able to
know the event logged until next day, or after working hours.
Another solution would be to log the events several times per day....every
hour for example......or trigger an event if the server is unused for 20
minutes for example.
So if you can guess that errors or warnings will not occur often, then use
the first solution. But if you know in advance that there will be many
errors or warnings, multiplied by 15 machines, then i would suggest either
the second option, or one of the extra ones i mentioned.
Good luck.
 
S

Scott

Thank you for your reply. That helps!

As for the last part of my email, do you know how to setup
the foreach statement to only cycle through the records
for, say, the last hour? The only examples I can find are
to cycle through the entire log. I am not sure if it
would be real effective to, every time, cycle through the
entire log just so that I can grab the last couple of
records.

Thank you.
 

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