The Win32::EventLog doc has an often repeated incorrect EventType table. 
The correct table is below : 

#EVENTLOG_SUCCESS          = 0
#EVENTLOG_ERROR_TYPE       = 1
#EVENTLOG_WARNING_TYPE     = 2
#EVENTLOG_INFORMATION_TYPE = 4
#EVENTLOG_AUDIT_SUCCESS    = 8
#EVENTLOG_AUDIT_FAILURE    = 16

So your hash should really be : 

        my %EventType = 
        (
        0,'Success',
        1,'Error',
        2,'Warning',
        4,'Information',
        8,'Audit success',
        16,'Audit failure'
        ); 


_____________________________________________
Bruno Bellenger
Sr. Network/Systems Administrator 


        -----Original Message-----
        From:   Lewis, Chris [SMTP:[EMAIL PROTECTED]]
        Sent:   Friday, August 02, 2002 9:15 PM
        To:     [EMAIL PROTECTED]
        Subject:        NT Event Log monitoring script

        Attached is a working copy of an NT Event Log monitoring script that
sends
        e-mail notifications whenever an event is added to the log.  

        One question however, what's the best way to only send e-mail
notifications
        upon encountering warnings or errors (and not information, audit
        success/failure events)?  i.e. in the following array, only where
the
        EventType is 0 or 2?

        %EventType = 
        (
        0,'Error',
        2,'Warning',
        4,'Information',
        8,'Audit success',
        16,'Audit failure'
        );


        Thanks,
        Chris

         <<ntevtlog.pl>>  << File: ntevtlog.pl >> 

_______________________________________________
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to