On a windows collector, how to add a source from a second local drive?

Comments

8 comments

  • Avatar
    Ben Newton

    Elijah,

    Is the that the actual path log files. From the docs:

    For files on Windows systems, enter the absolute path including the drive letter. Escape special characters and spaces with a backslash (). 

    So, do you need something like D:\dir\subdir\subdir\*.log ?

     

    0
    Comment actions Permalink
  • Avatar
    Elijah Taylor

    That's a sanitized path, but the same structure and drive.

    I had created a source using "d:\dir\subdir\subdir\*" which failed with the error above (does not exist or cannot be read). After a while I deleted that source and (after trying some others) re-added the same thing but with ** at the end instead of just *.

    For some reason it worked properly with the ** even though all the extra * did was add recursion. Both should have worked as far as I could tell. Maybe a bug?

    0
    Comment actions Permalink
  • Avatar
    Ben Newton

    The ** does directory recursion, and * does file recursion. So, d:\dir\subdir\subdir\**\*.log matches:

    d:\dir\subdir\subdir\foo.log

    d:\dir\subdir\subdir\subdir\foo.log

    d:\dir\subdir\subdir\subdir\subdir\foo.log

    etc..

     

    0
    Comment actions Permalink
  • Avatar
    Elijah Taylor

    Ben,

     

    The ** should act dual purpose and do both directory and file recursion.

     

    According to the docs: "/var/log/** will match all files in /var/log and all files in all child directories, recursively."

     

    So you should be able to end your windows path with \** (as I did) and have it find all files in the designated directory, as well as all files in any sub directories.

     

    This is how it is behaving currently actually, my question was why ending the path with \* did not find all files in the given directory but instead gave the "does not exist or cannot be read" message.

    0
    Comment actions Permalink
  • Avatar
    Yongxing Wang

    Elijah,

     

    "\*" only finds the files under the given directory, NOT recursively for each every subdirectories. So if your directory contains no file at all, but just a couple of subdirectories, then you will get the above mentioned symptom.

    Thanks!

    Yongxing

     

    0
    Comment actions Permalink
  • Avatar
    Elijah Taylor

    Yongzing,

    I wonder if I messed up the collector in the first place by creating the source before the directory was populated. The problem is that it never appeared to recover even after putting some files in the directory (i.e. it never recognized that a file had been placed there).

    I'll try again to create a source without any files in it and then populate the directory and see how long before (or if) the collector recognizes the presence of files.

    0
    Comment actions Permalink
  • Avatar
    Elijah Taylor

    Sorry, got your name wrong Yongxing :)

    0
    Comment actions Permalink
  • Avatar
    Yongxing Wang

    No problem with the name thing. :-) If it still doesn't work, I'd suggest you to open a support ticket. 

     

    Yongxing

    0
    Comment actions Permalink

Please sign in to leave a comment.