LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (http://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   SWATCH::not able to get the correct match count when i use regular expression (http://www.linuxquestions.org/questions/linux-newbie-8/swatch-not-able-to-get-the-correct-match-count-when-i-use-regular-expression-714761/)

vjayraghavan 03-27-2009 01:16 AM

SWATCH::not able to get the correct match count when i use regular expression
 
This post regarding Swatch alerts... Currently i have a requirement which should count the number of "Matched string" occured in a perticular time frame and send me a mail with the count when the given time frame gets over... Below is my file which my configuration looks for

Code:

watchfor /CRON END Job:.*CRON_EXEC_STATUS_FAILED|ORA-\d{5}|ERROR:CORE.*java.lang.OutOfMemoryError/
mail addresses=vijay\@gmail.com, subject=[ALERTS\ Failure list ]\ ERRORS\ in\ vijay.log,mailer=/usr/sbin/sendmail -oi -t
throttle 00:20:00,key=$1



It works perfectly fine except for "ORA-\d{5}" alerts...The problem i am facing here is, It is not giving me a proper match count.. if this error has occured once or twice, i get a mail stating it has occured 10 times, 12 times and more... I am not sure how to fix it...
Can any one help me...


All times are GMT -5. The time now is 07:25 AM.