In message <c8b29d582dbc8d458758e7d5c2b2a354011fd...@harpo.murex.com>, "ZERIBI Moufid" writes:
>I implemented what suggested John and it works pretty well. Merci! You're welcome. >Regarding Risto's solution, I guess I have to combine 2 kinds of rules one >with a perlfunc (to get the input source) and another with a regexp (to >catch ORA-XXXXX errors) ptype. Actually you need just one rule to capture the ORA-XXXX errors: Something like: type = single ptype=perlfunc pattern=sub { if ($_[0] =~ /ORA-/) \ { return defined($_[1]) ? $_[1] : "SEC"; } \ return 0; \ } desc = capture ORA-XXXX errors. action = shellcmd sendMailParam.bat "$1" "$0" should work where $1 will be the file name and $0 will be the input line. By replacing $_[1] with some more perl code, you can change the filename, perhaps returning just the hostname from the filename. What this perlfunc does (and is taken from the man page) is create a subroutine that is called with 2 arguments: input line ( accessed as $_[0]) source of input line (accessed as $_[1]) it then checks to see if the first argument matches ORA- (just like your regexp rule) and if so returns the first argument (the filename) if defined, or the word "SEC" (indicating the event came from a source internal to sec via spawn, event ...). >This would have sense for me if the number of envs to check will >considerably increase and the conf file will be excessively huge. Yup something to keep in the tool box. -- -- rouilj John Rouillard =========================================================================== My employers don't acknowledge my existence much less my opinions. ------------------------------------------------------------------------------ ThinkGeek and WIRED's GeekDad team up for the Ultimate GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the lucky parental unit. See the prize list and enter to win: http://p.sf.net/sfu/thinkgeek-promo _______________________________________________ Simple-evcorr-users mailing list Simple-evcorr-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/simple-evcorr-users