promtail 的多目标日志配置问题

2021-08-16 11:29:02 +08:00
 FenixVu
scrape_configs:
- job_name: system
  pipeline_stages:
  - regex:
        expression: '^(?P<timestamp>\d{4}-\d{2}-\d{2}\S\d{2}:\d{2}:\d{2}.\d+\+\d{2}:\d{2}).*'
  - timestamp:
        source: timestamp
        format: RFC3339Nano
        action_on_failure: skip
  static_configs:
  - targets:
      - localhost
    labels:
      job: 59.110/mysql
      __path__: /var/log/960c6986c8b14cb3d38a188962bfa75b251e07df56f486629acecdb53e2f6046/*.log

- job_name: test
  pipeline_stages:
  - regex:
        expression: '^(?P<timestamp>\d{4}-\d{2}-\d{2}\S\d{2}:\d{2}:\d{2}.\d+\+\d{2}:\d{2}).*'
  - timestamp:
        source: timestamp
        format: RFC3339Nano
        action_on_failure: skip
  static_configs:
  - targets:
      - localhost
    labels:
      job: 59.110/test
      __path__: /var/log/1b60893eaa204cb44d4560eaae02ac0b8da16b51d733a2cd886be0f6c6e93cb2/*.log

为什么这两个 job 我只能采集到第一个 第二个完全采集不到 positions.yaml 里也只有第一个的记录

673 次点击
所在节点    问与答
0 条回复

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/796029

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX