Sorry

that I told you is invalid:
here is some valid example

tailDir("/var/log/app")            // all files 
tailDir("/var/log/app",".*\.log")  // all files with names that match the 
".*\.log" regex (in shell this is *.log)
tailDir("/var/log/app",".*\.log", false, 1)  // all files with names that match 
the ".*\.log" regex, starting from beginning of file, with one level of 
recursion depth.
tailDir("/var/log/app", delim="\n\n", delimMode="exclude")  // all files with 
names that match the ".*\.log" regex, starting from beginning of file, with one 
level of recursion depth, that end with double new lines, excluding the double 
new lines
tailDir("/var/log/app",".*\.log", false, 1, delim="\n\n", delimMode="exclude")  
// all files with names that match the ".*\.log" regex, starting from beginning 
of file, with one level of recursion depth, that end with double new lines, 
excluding the double new lines


so in your condition you should try:

tailDir(("/usr/local/current/logs/","omq.log.%m%d%Y",false, 1)


Best wishes

2012-05-18 



  
胡媛聪
软通动力信息技术(集团)有限公司 
地址:深圳市南山区高新区高新南九道9号威新软件科技园8号楼3层
邮编:518057
电话:0755-26719999
手机:13556898820
Email:y...@isoftstone.com



发件人: M@he$h 
发送时间: 2012-05-18  09:59:48 
收件人: flume-user@incubator.apache.org 
抄送: 
主题: Re: tailDir 
 
@Raji :

Firstly , we cannot remove old logs from the directory by running cron job.

and yes , I want flume to ignore previous day logs for the current day as you 
said below.

@Yui :

let me try this and will let you know whether it worked or not.

tailDir("/usr/local/current/logs/",fileregex="omq.log.%m%d%Y",startFromEnd=true,recurseDepth=3)



On Thu, May 17, 2012 at 6:46 PM, Rajalakshmi Ramesh <rrajalaks...@gatech.edu> 
wrote:

you can try it out. I am not really sure. But, I am having trouble seeing your 
reasoning here. Say some external application creates such log files for you 
every night at 12 AM, then basically you want to ignore all the remaining data 
until 11.59 without passing them over to flume?

Thanks & Regards
Rajalakshmi (Raji) Ramesh
-------------------------------------------------------

Graduate Student
Georgia Institute of Technology
Atlanta, GA
-------------------------------------------------------




On Thu, May 17, 2012 at 6:41 PM, M@he$h <mahesh...@gmail.com> wrote:

Hello Raji,

Thanks for the reply.

so using flume's tailDir , we cannot achieve what I want is it?

does something like below will work or not?

tailDir("/usr/local/current/logs/", "rls.log.%M%d%Y" , "true")




On Thu, May 17, 2012 at 6:35 PM, Rajalakshmi Ramesh <rrajalaks...@gatech.edu> 
wrote:

I would suggest moving that intelligence to a cron job by removing log files 
that ypu dont want to be tail at the end of the day. Will make your 
configuration much easier.


alakshmi (Raji) Ramesh
-------------------------------------------------------

Graduate Student
Georgia Institute of Technology
Atlanta, GA
-------------------------------------------------------




On Thu, May 17, 2012 at 6:31 PM, M@he$h <mahesh...@gmail.com> wrote:

Hello,

We have a directory where there will be log files for each day being written. 
for example :

abc.log.05162012
pqr.log.05162012
abc.log.05172012
pqr.log.05172012


I want flume to tail files depending on that day's date. for example : as 
today's date is 05/17/2012 , it should only tail file names which have 05172012 
at the end.

Can we do it using tailDir? or can you suggest the best way to do this in flume?

Look forward for your response.


-- 
Thanks and Regards,

Mahesh
619-816-7011.






-- 
Thanks and Regards,

Mahesh
619-816-7011.






-- 
Thanks and Regards,

Mahesh
619-816-7011.

<<FoxmailIcon2: ychu@isoftstone.com.jpg>>

Reply via email to