Here my config for monitoring multiple logs..
type=Singlewithsuppress
ptype=perlfunc
pattern=sub {if ($_[0] =~ /ORA-(\d+)/) {return $_[1], $1;} else {return 0;}}
desc=$0 error from file $1
window=1800
action=shellcmd /dba/sec/scripts/chk_alert_ora '$1:$2:$0'
$1 is the filename the error occured in.

Can't answer the hostname one but I do all that sort of stuff in the 
chk_alert_ora script


 --
'ooroo

Mike...(:)-)
---------------------------------------------------
Email: [EMAIL PROTECTED]     o
Work:   + 44 (0)1344 392538     o /////
Mob:    + 44 (0)7785 762976      /@   `\  /) ~
Bv:     7-5070                  >  (O)  X<  ~
You need only two tools.         `\___/'  \) ~
A hammer and duct tape.            \|\
If it doesn't move and it should use the hammer.
If it moves and shouldn't, use the tape.
===================================================
For Tektronix legal entity info and registration
details goto http://www.tek.com/entities
---------------------------------------------------



________________________________
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Tejas Patel
Sent: 12 April 2008 08:15
To: [email protected]
Subject: [Simple-evcorr-users] how to obtain & log current hostname

Hello,

First of all I'd like to thank Risto for this wonderful tool. It seems very 
flexible and will help me do the job quiet nicely. I also would like to thank 
the many users of this list who have taken the time to answer many questions 
posted. They have been very helpful.

Now, I'm new to sec.pl and trying to learn the tool and make the best use of 
it. I'd like to monitor multiple log files (about 50 on each box) on multiple 
solaris boxes (about 10). I'm trying to write a monitoring solution that logs 
to one file on a nfs mounted drive. I'm using the same single config file on 
all 10 hosts. Therefore, I'll need to obtain the hostname and log filename and 
write them to the single sec output log.

I'd like my output format to be like this:
<hostname>:<log_filename> | <message>

I've figured out how to get the log_filename and the message and write that. 
I'm not able to figure out how to obtain the current hostname. I've read the 
manpage and searched the archive but I obviously am not searching for the 
correct string. I'm sure this is answered somewhere. It would help if the 
solution is less resource intensive since I expect this to be under heavy load.

Can someone be kind enough to point me in the right direction?

Thanks in advance,

Tejas


-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Simple-evcorr-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/simple-evcorr-users

Reply via email to