How to search "error." pattern with LOG
Hello,
I am trying to monitor a log file in order to be alerted when the string "error." appears.
For instance :
error.grammar error.noressource
... should send an alert
but "error " (with a space after) should not.
I tried to put in hobbit-clients.cfg :
LOG /tmp/log error. COLOR=yellow ==> does not work
LOG /tmp/log %(?-i)error. COLOR=yellow ==> works but match with error (without the .)
Does anyone can help me to find the correct regexp please ?
Thank you,
Vincent
On Fri, Dec 19, 2008 at 10:17 AM, Vincent Schultz <vschultz at cvf.fr> wrote:
Hello,
I am trying to monitor a log file in order to be alerted when the string "error." appears.
For instance :
error.grammar error.noressource
... should send an alert
but "error " (with a space after) should not.
I tried to put in hobbit-clients.cfg :
LOG /tmp/log error. COLOR=yellow ==> does not work
LOG /tmp/log %(?-i)error. COLOR=yellow ==> works but match with error (without the .)
`.' includes space as well. Try something like %error\.. (untested)
Does anyone can help me to find the correct regexp please ?
Thank you,
Vincent
To unsubscribe from the hobbit list, send an e-mail to hobbit-unsubscribe at hswn.dk
-- Asif Iqbal PGP Key: 0xE62693C5 KeyServer: pgp.mit.edu
I am trying to monitor a log file in order to be alerted when the string "error." appears.
For instance :
error.grammar error.noressource
... should send an alert
but "error " (with a space after) should not.
The '.' in your expression matches 'any character', not the characteter '.' You need to 'escape' (precede it with a '\' it to force it to mean the actual character '.'
Try using LOG /tmp/log "%error\." COLOR=yellow
In <494BBB23.4000801 at cvf.fr> Vincent Schultz <vschultz at cvf.fr> writes:
I am trying to monitor a log file in order to be alerted when the string "error." appears.
LOG /tmp/log error. COLOR=yellow ==> does not work
Does anyone can help me to find the correct regexp please ?
How about LOG /var/log/YOURLOGFILENAME error\.
Regards, Henrik
participants (4)
-
henrik@hswn.dk
-
TRBrand@cvs.com
-
vadud3@gmail.com
-
vschultz@cvf.fr