將prometheus採集的數據遠程存儲到influxdb中

這個比較簡單,api

https://docs.influxdata.com/influxdb/v1.7/supported_protocols/prometheuslua

只須要更改prometheus.yaml配置 文件。url

    global:
      # 抓取的間隔時間
      scrape_interval: 20s
      # How long until a scrape request times out.
      scrape_timeout: 10s
      # 計算告警觸發條件的週期
      evaluation_interval: 20s
    # 告警規則文件
    rule_files:
      - '/etc/prometheus-rules/*.rules'
    remote_write:
      - url: "http://xxxx:8086/api/v1/prom/write?db=prometheus"

    # remote_read:
    #   - url: "http://xxxx:8086/api/v1/prom/read?db=prometheus"
相關文章
相關標籤/搜索