[TNM] (.*) regex doesn't match
Gabi Am
gabi.am86 at gmail.com
Sat Oct 13 20:46:49 UTC 2012
Hi guys,
I want to monitor a* log file* that contains lines like this one:
> 2012-10-13/17:51:02.299/EEST [MyClass] ERROR Failed deleting config file.
My *config file* "tnm.config.txt" contains the following lines:
EMAIL: gabi.am86 at gmail.com
> MAILSUBJECT: Errors
>
INCLUDE: (.*)
> INCLUDE: .*ERROR.*
>
FILE1: /opt/myproject/var/log/general.log
> LASTFILE1: /opt/myproject/var/log/general.log
No spaces after the regex but I also tried it with spaces, as the example.
And I would like to match those lines in the log file that contain "ERROR"
(because that didn't work I also tried to match everything with *(.*)*regex).
Command line:
> perl tail_n_mail tnm.config.txt --mailmode=smtp --mailserver=ssl://
> smtp.gmail.com --mailuser=myuser at gmail.com --mailpass=pass --mailport=465
> --debug
Question:
Is this mail server correct: "ssl://smtp.gmail.com"? It would be very
useful to have an example on the wiki page.
Displays the following information:
> ...
> Log line prefix regex: (?^:^((\d\d\d\d-\d\d-\d\d \d\d:\d\d:\d\d
> \w\w\w\w?) \[(\d+)\])(.*))
> Log line prefix regex2: (?^:^\d\d\d\d-\d\d-\d\d \d\d:\d\d:\d\d \w\w\w\w?
> \[\d+\])
> Log line prefix regex3: (?^:^\d\d\d\d-\d\d-\d\d \d\d:\d\d:\d\d \w\w\w\w?)
> Parsing file: /opt/myproject/var/log/general.log
> File: /opt/myproject/var/log/general.log Offset: 0 Size: 12,414 Maxsize:
> 80,000,000
> Adding inclusion: (.*)
> Adding inclusion: .*ERROR.*
> Inclusion: (?^:(.*))|(?^:.*ERROR.*)
> No new lines found in file /opt/myproject/var/log/general.log
> Performing final cleanup
> Saving new config file
Any help would be appreciated.
Gaby
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.endcrypt.com/pipermail/tnm/attachments/20121013/6a1a3da8/attachment.html>
More information about the TNM
mailing list