kar_thik82 has asked for the wisdom of the Perl Monks concerning the following question:
I am developing a log parsing agent in perl to send windows Event logs to Zenoss Monitoring tool. Using Win32::EventLog i can able to get the Event messages but only one Eventype eg Application or System could able to parse at a time. Can you please help to how to open mutiple eventlogs at a time I need to get the total number of events combining all these event types. Below is my code which i tried
my @log_type =("Application", "Security", "Setup", "System", "Forwarde +d Events"); foreach $logs_type (@log_type){ #print "$logs_type\n"; Win32::EventLog::Open($EventLog, $logs_type,'') or die "Could not open System log:$^E\n"; $EventLog->Win32::EventLog::GetNumber($numevents); print "$EventLog->Win32::EventLog::GetNumber($numevents)\n" +; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Perl Script to parse Windows Event Logs
by brap (Pilgrim) on Dec 07, 2012 at 14:19 UTC | |
by kar_thik82 (Novice) on Dec 07, 2012 at 17:33 UTC | |
|
Re: Perl Script to parse Windows Event Logs
by Anonymous Monk on Dec 08, 2012 at 03:38 UTC |