Is there any solution to use wildcard chars in the path in the file input setting?

I have these folders:

I used this input settings:

<Input in_app>
Module im_file
File "/path/to/logs/t-*/log/app*.log"
SavePos TRUE
InputType LineBased

I always get the ERROR failed to open directory: /path/to/logs/t-*/logs: No such file or directory

I used this setting before:
<Input in_app>
Module im_file
File "/path/to/logs/*app*.log"
SavePos TRUE
InputType LineBased

This is working correctly but we have added some folders under the /path/to/logs/t-01test/ where the nxlog user cant read for security reasons.
The nxlog log is full with errors because of enough rights:
ERROR failed to open directory: path/to/logs/t-01test/conf: Permission denied

Is it allowed to use wildcards in the path?


AskedApril 27, 2020 - 1:45pm

Answers (2)


Yeas, wildcard are allowed in File directive. But yes, you need to doublecheck permissions in your case and maybe configure Path somehow differently.

Regards, Arch

Comments (3)

  • Zola's picture

    Hi Arch!

    Thanks for your answer!
    I used this documentation but without success.
    Can you explain what can I use instead of this setting?

    File "/path/to/logs/t-*/log/app*.log"


  • manuel.munoz's picture

    Zola, wildcards are not allowed in directory names...

    Wildcards are supported in filenames only, directory names in the path cannot be wildcarded. Wildcards are not regular expressions, but are patterns commonly used by Unix shells to expand filenames (also known as "globbing").