[prometheus] Do not put :9100 in instance name
							parent
							
								
									14fc0bbf54
								
							
						
					
					
						commit
						46e2111368
					
				| 
						 | 
				
			
			@ -4,12 +4,7 @@
 | 
			
		|||
  vars:
 | 
			
		||||
    # Prometheus targets.json
 | 
			
		||||
    prometheus_targets:
 | 
			
		||||
      - labels: {job: node}
 | 
			
		||||
        targets: |
 | 
			
		||||
          {{ groups['server'] | map('replace', '.org', '.org:9100') |
 | 
			
		||||
          list | sort }}
 | 
			
		||||
      - labels: {job: prometheus}
 | 
			
		||||
        targets: ['localhost:9090']
 | 
			
		||||
      - targets: "{{ groups['server'] | list | sort }}"
 | 
			
		||||
    prometheus_ups_snmp_targets:
 | 
			
		||||
      - targets: [pulsar.adm.crans.org]
 | 
			
		||||
    prometheus_unifi_snmp_targets:
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -27,10 +27,24 @@ rule_files:
 | 
			
		|||
scrape_configs:
 | 
			
		||||
  # The .json in file_sd_configs is dynamically reloaded
 | 
			
		||||
 | 
			
		||||
  - job_name: dummy
 | 
			
		||||
  - job_name: prometheus
 | 
			
		||||
    static_configs:
 | 
			
		||||
      - targets:
 | 
			
		||||
        - localhost:9090
 | 
			
		||||
 | 
			
		||||
  - job_name: servers
 | 
			
		||||
    file_sd_configs:
 | 
			
		||||
      - files:
 | 
			
		||||
        - '/etc/prometheus/targets.json'
 | 
			
		||||
    relabel_configs:
 | 
			
		||||
      # Do not put :9100 in instance name, rather here
 | 
			
		||||
      - source_labels: [__address__]
 | 
			
		||||
        target_label: __param_target
 | 
			
		||||
      - source_labels: [__param_target]
 | 
			
		||||
        target_label: instance
 | 
			
		||||
      - source_labels: [__param_target]
 | 
			
		||||
        target_label: __address__
 | 
			
		||||
        replacement: '$1:9100'
 | 
			
		||||
 | 
			
		||||
  - job_name: ups_snmp
 | 
			
		||||
    file_sd_configs:
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue