V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX 提问指南
FenixVu
V2EX  ›  问与答

promtail 的多目标日志配置问题

  •  
  •   FenixVu · 2021-08-16 11:29:02 +08:00 · 623 次点击
    这是一个创建于 974 天前的主题,其中的信息可能已经有所发展或是发生改变。
    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 里也只有第一个的记录

    目前尚无回复
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   3283 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 27ms · UTC 13:36 · PVG 21:36 · LAX 06:36 · JFK 09:36
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.