Prometheus - add target specific label in static_configs

后端 未结 5 538
迷失自我
迷失自我 2021-02-04 00:35

I have job definition as follows:

  - job_name: \'test-name\'
    static_configs:
      - targets: [ \'192.168.1.1:9100\', \'192.168.1.1:9101\', \'192.168.1.1:91         


        
5条回答
  •  抹茶落季
    2021-02-04 00:59

    You can find information in here - Prometheus Good Config

    But I have used these and it worked

    
      - job_name:  'PostgreSQL-exporter'
        scrape_interval: 60s
        scrape_timeout: 60s
        static_configs:
          - targets: ['localhost:9187']
          - labels:
              name: value-for-the-name
    

提交回复
热议问题