Description
Is your feature request related to a problem? Please describe.
Greetings:
I am investigating how directories are created when using the tail
input plugin. It would be super helpful if I could get some guidance on how this works since I'm having trouble getting clarity from the docs.
Relevant documentation can be found here.
The documentation gives an example at the top, which I will modify and reproduce here to describe my problem...
<source>
@type tail
path /var/log/httpd-access.log
# NOTE: Here I have inserted the additional /httpd/ directory.
pos_file /var/log/td-agent/httpd/httpd-access.log.pos
tag apache.access
<parse>
@type apache2
</parse>
</source>
My problem is as follows: When td-agent
starts up, it will create the /var/log/td-agent/httpd/
directory as needed to hold the .pos
file under it. I find that I am unable to use the configuration files to specify the ownership and mode for this new directory. I have verified that the td-agent
user on my machine can set the ownership and mode of this directory, but I can't do it automatically in the config files.
For example, when the dirctory holding the .pos
file is created, the mode is 00755
when I would like it to be 00770
. I would also like it to have a specific user and group ownership.
I am not sure if this would be a new feature, or if I'm just missing how to make this small change from reading the existing docs. If I am missing something, I apologize!
Many thanks in advance, please let me know if more information is needed and I will try to provide it.
Best,
lifecrisis
Describe the solution you'd like
I would like to be able to set custom ownership and permissions on directories created to hold .pos
files.
Describe alternatives you've considered
I tried setting the permissions external to the td-agent
process, but this is cumbersome with many servers. It is best to specify the permissions in the config files so that I can rely on td-agent
to set itself up properly. :)
Additional context
No response
Activity