alibaba / ilogtail

Fast and Lightweight Observability Data Collector
https://ilogtail.gitbook.io/ilogtail-docs
Apache License 2.0
1.74k stars 387 forks source link

[QUESTION]: input_file插件采集容器日志,没有携带metadata信息 #1814

Open PalanQu opened 1 week ago

PalanQu commented 1 week ago

ilogtail通过daemonset部署,版本commit为d413393c79eae41c95bfce03b1e2c519372892ba,最后一个commit为2024年9月15日,采集配置如下,有两个问题

inputs:
  - Type: input_file
    FilePaths:
    - /log/*.info
    EnableContainerDiscovery: true
    AppendingLogPositionMeta: true
    AllowingIncludedByMultiConfigs: true
    CollectingContainersMeta: true
    ExternalK8sLabelTag:
      cluster: subApplication
    ContainerFilters: 
      IncludeK8sLabel:
        cluster: "^.*$"
  1. 采集到的日志并没有携带metadata信息,例如采集到的日志如下
2024-10-17 19:44:21 {"__file_offset__":"4087590","logtime":"2024-10-17T19:44:20.109445","level":"INFO","logger":"src/allocator/free_space_syncer.cpp:119","thread":"00000085","bthread":"0000000100000916","xrayTraceId":"FACAFA77886CDEBA","msg":"sync free space info success, node num = 24","_prdline_":"base","expireDay":"14","__time__":"1729165460"}
  1. ExternalK8sLabelTag没有按照预期将label中cluster放到subApplication字段
Takuka0311 commented 2 days ago

后续使用release版本可行吗?