Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

cannot find volume mounts by path #691

Closed
shuoshadow opened this issue Nov 22, 2024 · 1 comment
Closed

cannot find volume mounts by path #691

shuoshadow opened this issue Nov 22, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@shuoshadow
Copy link

logconfig

apiVersion: loggie.io/v1beta1
kind: LogConfig
metadata:
  name: java-log  # 配置名称,需要在当前namespace下保持唯一
  namespace: dev1
spec:
  selector:
    type: pod
    labelSelector:  # 标签选择器,用于过滤采集的目标pod
      app: java
  pipeline:
    sources: |
      - type: file
        addonMeta: true
        name: common
        matchFields:
          labelKey: ["*"]    # 将所有labels收集到日志
        paths:
          - /log/*/*.log    # 日志采集目录
        multi:
         active: true   # 开启多行匹配模式
         pattern: '\[\d+-\d+-\d+\s\d+:\d+:\d+\.\d+]\s.*'  # 行首正则表达式
    sinkRef: kafka-sink   # 发送到该kafka
    interceptorRef: java-interceptor   # 引用日志解析

error log:

describe logconfig

Sync type pod test-deploy-7875475b8d-j48fj failed: cannot find volume mounts by path: /log/*/*.log
@shuoshadow shuoshadow added the bug Something isn't working label Nov 22, 2024
@shuoshadow
Copy link
Author

知道原因了... 为什么一定要加个日志路径的挂载呢。文件本身在宿主机上是有保存的,按规则找到文件就行

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant