Sponsored Content
Top Forums Shell Programming and Scripting Unable to get full message text from Windows Event Logs Post 302769375 by kar_333 on Tuesday 12th of February 2013 04:41:03 AM
Old 02-12-2013
Unable to get full message text from Windows Event Logs

Hi all,

. I am developing a log monitoring solution in perl for Windows I am using the CPAN module Win32 ::EventLog (0.076) version for getting the events from windows. The problem which I am facing now is all the Windows 2008 machines are upgraded with Service pack2 from then I couldn’t able to get the message text even if I set the value 1 to $Win32::EventLog::GetMessageText = 1; for both Windows 2008 sp2 and Windows 2012. I agree this not a bug in the module instead Windows 2008 Sp2 and 2012 event log design might have changed in such a way kindly let me know is there any possibility to modify anything in the .pm file to get the Windows 2008 sp2 message moreover the module cannot pull only the message from the service control manager which has an event ID 7036.
 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Message Logs Error

I'm about 5 months new on an 5 year old unix system. If anyone can help me identify what causing the below errors i'd really appreciate it! unix: WARNING: /pci@1f,0/pci@1,1/ide@3/dad@1,0 (dad1): Uncorrectable data Error: Block 57e10 Unix: WARNING: /pci@1f,0/pci@1,1/ide@3/dad@1,0 (dad1):... (1 Reply)
Discussion started by: ByasB
1 Replies

2. UNIX for Advanced & Expert Users

ppp errror message in logs

I am getting this message in the log file. Apr 29 15:32:02 router ppp: Warning: Label COPYRIGHT rejected -direct connection: Configuration label not found This repeats every so often, the link is up however...Any ideas why i am getting this. Its freebsd 6.1 and pppoE. Frank (1 Reply)
Discussion started by: frankkahle
1 Replies

3. Shell Programming and Scripting

memory full warning message

Hi I wrote a script #!/usr/bin/ksh #set -x for fs in `df -k|awk '{print $1}'|sed -n "3,14 p"` do x=`df -kl | grep $fs | awk '{ print $5 }'` y=50% if then message="File System `df -k |grep $fs |awk '{print $6\", \"$5}'`... (1 Reply)
Discussion started by: namishtiwari
1 Replies

4. UNIX for Dummies Questions & Answers

Send Text message from unix to windows

Hi Buddies, I have a unix client and want to send a message (containg some data) to a windows Database server to query from it and return the result. I shall be so thankfull if you help me out.:b::) Warm Regards, Jessi (1 Reply)
Discussion started by: jessica-adams
1 Replies

5. Shell Programming and Scripting

Rotating logs in Perl without message loss

(I'm aware log rotation is a common subject, but I tried searching and couldn't find an answer) For some time now, I've been using the Logfile::Rotate module to rotate logs in a log-monitoring script. So far, I haven't experienced any problems, and it works great because I can use it in Linux... (1 Reply)
Discussion started by: w1r3d
1 Replies

6. Solaris

ILOM event logs

Hello I have a server Sun Fire X4250. Few days ago I take a look to ILOM -> System Monitoring -> log events. I saw some lines that I don't understand, for example: 5800 Chassis Action major Oct 30 23:58:35 2009 Hot insertion of /SYS/DBP/HDD12 5799 Chassis ... (3 Replies)
Discussion started by: marimontes
3 Replies

7. Shell Programming and Scripting

script to grep outofmemory message in logs

I have prepare script to grep for outofmemory messages in the logs. I need help in modifying script. I have implemented small logic. The outofmemory messages form six logs will store in variables. var1=`grep -i outofmemory $tomcat1logs | sed -n '$p'| sed -n -e "s/.*\(outofmemory\).*/\1/p"`... (6 Replies)
Discussion started by: coolguyamy
6 Replies

8. Shell Programming and Scripting

Perl script to parse multiple windows event logs.

Hi all, 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... (3 Replies)
Discussion started by: kar_333
3 Replies

9. AIX

PowerHA(HACMP) full vg loss - cluster hangs on release_vg_fs event

Hello, AIX 6.1 TL7 SP6 POwerHA 6.1 SP10 I was experimenting with new hacmp build. It's 3-node cluster build on AIX 6.1 lpars. It contains Ethernet and diskhb networks. Shared vg disk is SAN disk. Two nodes see disk using vscsi, third node sees disk using npiv. Application is db2 server. ... (4 Replies)
Discussion started by: vilius
4 Replies
Net::Daemon::Log(3)					User Contributed Perl Documentation				       Net::Daemon::Log(3)

NAME
Net::Daemon::Log - Utility functions for logging SYNOPSIS
# Choose logging method: syslog or Win32::EventLog $self->{'facility'} = 'mail'; # Default: Daemon $self->{'logfile'} = undef; # Default # Choose logging method: stderr $self->{'logfile'} = 1; # Choose logging method: IO handle my $file = IO::File->new("my.log", "a"); $self->{'logfile'} = $file; # Debugging messages (equivalent): $self->Log('debug', "This is a debugging message"); $self->Debug("This is a debugging message"); # Error messages (equivalent): $self->Log('err', "This is an error message"); $self->Error("This is an error message"); # Fatal error messages (implies 'die') $self->Fatal("This is a fatal error message"); WARNING
THIS IS ALPHA SOFTWARE. It is *only* 'Alpha' because the interface (API) is not finalised. The Alpha status does not reflect code quality or stability. DESCRIPTION
Net::Daemon::Log is a utility class for portable logging messages. By default it uses syslog (Unix) or Win32::EventLog (Windows), but logging messages can also be redirected to stderr or a log file. Generic Logging $self->Log($level, $msg, @args); This is the generic interface. The logging level is in syslog style, thus one of the words 'debug', 'info', 'notice', 'err' or 'crit'. You'll rarely need info and notice and I can hardly imagine a reason for crit (critical). In 95% of all cases debug and err will be sufficient. The logging string $msg is a format string similar to printf. Utility methods $self->Debug($msg, @args); $self->Error($msg, @args); $self->Fatal($msg, @args); These are replacements for logging with levels debug and err. The difference between the latter two is that Fatal includes throwing a Perl exception. Chossing a logging target By default logging will happen to syslog (Unix) or EventLog (Windows). However you may choose logging to stderr by setting $self->{'logfile'} = 1; This is required if neither of syslog and EventLog is available. An alternative option is setting $self->{'logfile'} = $handle; where $handle is any object supporting a print method, for example an IO::Handle object. Usually the logging target is choosen as soon as you call $self->Log() the first time. However, you may force choosing the target by doing a $self->OpenLog(); before calling Log the first time. MULTITHREADING
The Multithreading capabitities of this class are depending heavily on the underlying classes Sys::Syslog, Win32::EventLog or IO::Handle. If they are thread safe, you can well assume that this package is too. (The exception being that you should better call $self->OpenLog() before threading.) AUTHOR AND COPYRIGHT
Net::Daemon is Copyright (C) 1998, Jochen Wiedmann Am Eisteich 9 72555 Metzingen Germany Phone: +49 7123 14887 Email: joe@ispsoft.de All rights reserved. You may distribute this package under the terms of either the GNU General Public License or the Artistic License, as specified in the Perl README file. SEE ALSO
Net::Daemon(3), Sys::Syslog(3), Win32::EventLog(3), IO::Handle(3) perl v5.12.1 2007-05-23 Net::Daemon::Log(3)
All times are GMT -4. The time now is 02:52 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy