473,324 Members | 2,239 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,324 software developers and data experts.

Event Log Collector - for the Event Viewer - to collect events into a database - How to?

Hi I am perplexed, I feel hopeless, I hope that someone can help me
with a problem. I have Visual Basic .NET

I want to develop an Event Collector. That will collect all events
from the Local computer or maybe 2 computers; (1 local and 1 remote) -

Collecting the Event Viewers Logs but only the system and application
logs and then put them into a Access database as a table, so that I
can run Querys on the events, such as:

Assuming both computers had several Event Id 2003's with Event Source
Perflib.

I want 2 input boxes that I can input the Event Id, and the Source and
then run querys to see what times they occured and on what computers
they occured on.

I want to expand on this concept later by adding more computers and
more tables, and different types of queries, but for right now I just
need to know how to do this small scale
(just for the local computer and maybe one remote computer.)

This will get me started and I think I can figure out the rest.

Please help me get out of this rut. Thanks for any advice or help no
matter what it is I am sure it will help and I can get something out
of it.

Thanks again! ~N.
Jul 17 '05 #1
1 8125
I'm trying to do the same at the moment with a .vbs Script, however it
fails once i try to collect logfiles from a remote machine. A Computer
name instead the "." in strComputer seems to connect to the computer,
however the proceedure only works for my own hostname. I guess this
might be a permission problem.

strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate,(Backup)}!\\" & _
strComputer & "\root\cimv2")
Set colLogFiles = objWMIService.ExecQuery _
("Select * from Win32_NTEventLogFile where LogFileName='System'")
For Each objLogfile in colLogFiles
errBackupLog = objLogFile.BackupEventLog("c:\scripts\System.evt")
If errBackupLog <> 0 Then
Wscript.Echo "The System event log could not be backed up."
End If
Next

Thomas
Jul 17 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Avinash P. | last post by:
Hi All, My mmc snapin application written in c# logs all its events in custom event source that we have created for this application. When any error occurs the application also displays a...
9
by: Mike | last post by:
How do I prevent SQL Server 2000 from posting successful backup completion messages to the Windows 2000 Application Event Log? I have scheduled jobs which backup my transaction logs on 50+...
4
by: IcedCrow | last post by:
I know I read everywhere that you "can't" force the garbage collector to run, and that you really have no control when it runs. However as a programmer I know that there is always a way around...
1
by: Virgo_guy | last post by:
Hi I feel hopeless, I'm so perplexed. I hope that someone can help me with a problem: ideas, resources, source code if you feel really benevolent. I use Visual Basic .NET I want to develop an...
6
by: Joseph Geretz | last post by:
I'm porting a C# Outlook Addin originally engineered as a COM Addin over to use VSTO. I've gotten this to the point where my VSTO Addin installs its Menu items and Toolbar buttons when Outlook...
4
by: Raj | last post by:
Can we create an event monitor for statements in a partitioned environment? CREATE EVENT MONITOR stmt_event FOR STATEMENTS WRITE TO FILE '/home/rajm/event' ON PARTITION 0 GLOBAL DB21034E ...
7
by: sergio-p | last post by:
I had no luck in my google search for this answer. Does anyone know if it's possible to read the entries in the Windows Event Log of the server running my PHP page? I'm trying to create an itranet...
1
by: dotyet | last post by:
Hi Everyone, I am looking at a lot of entries similar to the following in my Windows 'Audit' Event viewer. They are all success events and not failures. The environment is: DB2 8.2 FP 14...
3
by: =?Utf-8?B?QmFycnkgR2lsYmVydA==?= | last post by:
I have a class that raises events that downstream objects subscribe to. In one case, after destroying the object, the event seems to still get handled in a subscriber object. So I instantiate an...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.