[ 
https://issues.apache.org/jira/browse/NIFI-1170?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15453484#comment-15453484
 ] 

ASF GitHub Bot commented on NIFI-1170:
--------------------------------------

GitHub user pvillard31 opened a pull request:

    https://github.com/apache/nifi/pull/980

    NIFI-1170 - Improved TailFile processor to support multiple files tailing

    Modifications should not break backward compatibility.
    
    Two modes: single file (default) or multi files.
    In case of multi files mode, a base directory property is required.
    This will be the base directory to recursively look for the files to
    tail. Since this lookup can be consuming, I assumed that files to tail
    must exist when starting the processor.
    
    The rolling file pattern now accepts the ‘${filename}’ keyword to reference
    the original filename (without the extension). This is useful when
    defining the rolling file pattern for multiple files in the same
    directory. It obviously supposes that all the files to tail have a
    similar rolling pattern. Besides the rolling file must be plain text
    (no compression supported so far, this is wip).
    
    This PR includes the modifications proposed in PR #490.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/pvillard31/nifi tailfile-regex

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/nifi/pull/980.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #980
    
----
commit c7e4ba609697727c188e1f7db1658d6d9c75abc1
Author: Pierre Villard <[email protected]>
Date:   2016-08-31T16:53:26Z

    NIFI-1170 - Improved TailFile processor to support multiple files tailing
    
    Modifications should not break backward compatibility.
    
    Two modes: single file (default) or multi files.
    In case of multi files mode, a base directory property is required.
    This will be the base directory to recursively look for the files to
    tail. Since this lookup can be consuming, I assumed that files to tail
    must exist when starting the processor.
    
    The rolling file pattern accepts the ‘${filename}’ keyword to reference
    the original filename (without the extension). This is useful when
    defining the rolling file pattern for multiple files in the same
    directory. It obviously supposes that all the files to tail have a
    similar rolling pattern. Besides the rolling file must be plain text
    (no compression supported so far).
    
    This PR includes the modifications proposed in PR #490.

----


> TailFile "File to Tail" property should support Wildcards
> ---------------------------------------------------------
>
>                 Key: NIFI-1170
>                 URL: https://issues.apache.org/jira/browse/NIFI-1170
>             Project: Apache NiFi
>          Issue Type: Improvement
>          Components: Core Framework
>    Affects Versions: 0.4.0
>            Reporter: Andre
>
> Because of challenges around log rotation of high volume syslog and app 
> producers, it is customary to logging platform developers to promote file 
> variables based file names such as DynaFiles (rsyslog), Macros(syslog-ng)as 
> alternatives to getting SIGHUPs being sent to the syslog daemon upon every 
> file rotation.
> (To certain extent, used even NiFi's has similar patterns, like for example, 
> when one uses Expression Language to set PutHDFS destination file).
> The current TailFile strategy suggests rotation patterns like:
> {code}
> log_folder/app.log
> log_folder/app.log.1
> log_folder/app.log.2
> log_folder/app.log.3
> {code}
> It is possible to fool the system to accept wildcards by simply using a 
> strategy like:
> {code}
> log_folder/test1
> log_folder/server1
> log_folder/server2
> log_folder/server3
> {code}
> And configure *Rolling Filename Pattern* to * but it feels like a hack, 
> rather than catering for an ever increasingly prevalent use case 
> (DynaFile/macros/etc).
> It would be great if instead, TailFile had the ability to use wildcards on 
> File to Tail property



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to