treasure-data / omnibus-td-agent

td-agent (Fluentd) Packaging Scripts
https://docs.treasuredata.com/articles/td-agent-changelog
Apache License 2.0
82 stars 131 forks source link

Windows TD Agent in_tail Wildcards #183

Open kyleboyer-optum opened 6 years ago

kyleboyer-optum commented 6 years ago

Hey there,

I am trying to tail multiple files in a given directory on a Windows server, yet the * wildcard is not working. I have tried all sorts of permutations with backslashes and the windows directory separators. Is there something I am overlooking? Here is my config:

<source>
  @type tail
  path C:\logs\*
  refresh_interval 30
  pos_file "C:\logs\log_db.db"
  tag "tail"
  format none
</source>
<match **>
  @type stdout
</match>

Path Permutations Tried(With and without quotes in the config):

C:\logs\*
C:\logs\\*
C:\logs\\\*
C:\\logs\\*
C:\\logs\\*
C:\\logs\\\*
C:\\logs\\\\*
C:\logs\**
C:\logs\\**
C:\logs\\\**
C:\\logs\\**
C:\\logs\\**
C:\\logs\\\**
C:\\logs\\\\**
C:\logs\\*\*
C:\logs\\\*\\*
C:\\logs\\\*\*
C:\\logs\\\\*\\*

Thanks, Kyle

smarangon-betclic commented 5 years ago

Hi,

If someone read this post again, here is the answer => wildcard-pattern-in-path-doesnt-work-on-windows-why "Backslash() with * doesn't work on Windows by internal limitation. To avoid this problm, use slash style instead."

Regards, Sylvain.