Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

[matcher]is there anyway to change the default log_path for add_kubernetes_metadata matcher? #23606

Closed
metadeng opened this issue Jan 21, 2021 · 2 comments
Assignees
Labels
Team:Integrations Label for the Integrations team

Comments

@metadeng
Copy link

metadeng commented Jan 21, 2021

Describe the enhancement:
filebeat version: 7.9
OS: centos 8.2
kubernetes: 1.18.3

when i try to change the default log_path for add_kubernetes_metadata matcher as i change the rootdir for docker, and there is nothing to match the right path for current matcher, as except,there is anyway that i can change the docker's rootdir as well as the path that i configured in filebeat.yml?
Describe a specific use case for the enhancement or feature:
some feature may cause us to change the rootdir path for docker, therefor, hope that filebeat support us to custom the input log path for docker.

@botelastic botelastic bot added the needs_team Indicates that the issue/PR needs a Team:* label label Jan 21, 2021
@metadeng metadeng changed the title is there anyway to change the default log_path for add_kubernetes_metadata matcher? [matcher]is there anyway to change the default log_path for add_kubernetes_metadata matcher? Jan 21, 2021
@andresrc andresrc added the Team:Integrations Label for the Integrations team label Jan 22, 2021
@elasticmachine
Copy link
Collaborator

Pinging @elastic/integrations (Team:Integrations)

@botelastic botelastic bot removed the needs_team Indicates that the issue/PR needs a Team:* label label Jan 22, 2021
@tetianakravchenko
Copy link
Contributor

tetianakravchenko commented Dec 27, 2021

Hi @metadeng, here was added some clarifications and documentation on this processor matcher - #28868. If I correctly understood your use case, with this change you should be able to redefine log_path. Note that: value defined as a logs_path of the matcher must be a subdirectory
of directory defined as a paths of filebeat input, example:

filebeat.inputs:
    - type: container
      paths:
        - /var/lib/custom/path/*.log
      processors:
        - add_kubernetes_metadata:
            host: ${NODE_NAME}
            matchers:
            - logs_path:
                logs_path: "/var/lib/custom/path/"

I will close this issue, feel free to reopen it if needed.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Team:Integrations Label for the Integrations team
Projects
None yet
Development

No branches or pull requests

4 participants