SourceForge Logo My thanks to the sf team...and the opensource concept ...
other site for my perl win32 stuff ..yehh cheezzee

PC ADMINISTRATION

NET ADMIN

i toyed with starting yet another sf site project...but due to the current response i guess i'll just make it a subdirectory in the CVS tree under the name pcadmin where you will find pcadmin/pcadmin and pcadmin/netadmin. Note that i will keep the same directory ordering ... asp/php pages in the root of the cvs tree, then a scripts directory with the various utility scripts that build/schedule/process etc.
netadminsql.sql contains lots of tables, some current, some just test scratch tables. i've been testing various indexes because the first real database app ... gathering all the eventlogs on 100 servers resulted in 800,000 rows and fairly long interactive queries in the perl asp pages.

EVENTLOGS
Evtlogaudit.asp displays the eventlogs gathered by the evtlog2mysql.pl script which does dbi/dbd to a mysql database (windows version of course). So 1) setup your mysql, 2) run the script to create the table in a mysql console, grant permissions to the netadmin login... note i use localhost in all the scripts because they run all over the place. 3) define the web directory whatever... /netadmin for me to separate it from /pcadmin...and this is perlscript so must have ActiveState Perl w/ iis extensions, and a few win32 perl modules. Your choice on permissions, but normally it should be NT permissions for DomainAdmins on the ntfs file level. This sort of data is sensitive, and only admin's should be viewing it. By the way, the other site has a long example of using the perl eventlog.pm, and ole object calls to excel to create excel spreadsheets to display the eventlogs. Since i'm the only one to ever read the things...i've dropped the excel style of presentation and now this example is using sysinternals' psloglist to dump the eventlogs CVS into a perl loop which then parses and does the sql insert into the mysql database. I will note that the old excel script frequently failed in large eventlogs...this version has created 100M databases w/o a peep.

note there are several commerical products that do this already, TNG is free like, although the database of a local repository would probably choke on 500M databases and force you to go to MSSQL2k. Do not waste your time implementing this if your not "perl/sql" inclined...buy a package, pick a major vendor ... argent,hpopenview, trivia, tng or indeed a mountain of other SF projects.
I wrote this because it was the first real database example for pcadmin...most of the other app's were toy size compared to crunching 1 million rows of eventlogs...