You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@flume.apache.org by "Roshan Naik (JIRA)" <ji...@apache.org> on 2014/09/30 21:52:34 UTC

[jira] [Commented] (FLUME-2473) Flume exec tail -f date on apache log - unix date formatting

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

Roshan Naik commented on FLUME-2473:
------------------------------------

you should be able to accomplish that if you also use the 'shell' option  in exec source. take a look at the example in the user guide. 

> Flume exec tail -f date on apache log - unix date formatting
> ------------------------------------------------------------
>
>                 Key: FLUME-2473
>                 URL: https://issues.apache.org/jira/browse/FLUME-2473
>             Project: Flume
>          Issue Type: Question
>          Components: Configuration
>    Affects Versions: v1.5.0.1
>         Environment: CentOS 6.5
>            Reporter: Guyle Taber
>            Priority: Minor
>
> I'm trying to setup a flume source using the exec type and using tail -F on a log file that will be date stamped. The docs indicate typical unix commands would work, but date formatting for a file that's name changes each day doesn't seem to work.
> agent.sources.apache.command = tail -F /usr/local/apache/localhost/logs/access_log.`date +%Y%m%d`
> If I use "tail -F /usr/local/apache/localhost/logs/access_log.`date +%Y%m%d`" at the shell it works perfectly, but used inside the flume.conf for this source, I get nothing.
> Is there a way to use the unix date formatting in the source definition in flume.conf?



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