FenixVu
V2EX  ›  问与答

promtail 的多目标日志配置问题

  •  
  •   FenixVu · Aug 16, 2021 · 1323 views
    This topic created in 1754 days ago, the information mentioned may be changed or developed.
    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 里也只有第一个的记录

    No Comments Yet
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2724 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 30ms · UTC 15:12 · PVG 23:12 · LAX 08:12 · JFK 11:12
    ♥ Do have faith in what you're doing.