Difference between revisions of "Prometheus service discovery"

From wikieduonline
Jump to navigation Jump to search
Line 3: Line 3:
 
* <code>[[ec2_sd_config]]</code> https://prometheus.io/docs/prometheus/latest/configuration/configuration/#ec2_sd_config
 
* <code>[[ec2_sd_config]]</code> https://prometheus.io/docs/prometheus/latest/configuration/configuration/#ec2_sd_config
  
 +
== Examples ==
 +
  - job_name: 'ec2_service_discovery'
 +
    scrape_interval: 15s
 +
    scrape_timeout: 10s
 +
    metrics_path: '/metrics'
 +
    scheme: http
 +
    ec2_sd_configs:
 +
      - region: eu-west-1
 +
        profile: 'arn:aws:iam::01234567890:role/your_Role'
 +
        port: [[9100]]
 +
    relabel_configs:
 +
      # Use the instance ID as the instance label
 +
      - source_labels: [__meta_ec2_tag_Name]
 +
        target_label: instance
  
 +
== Related ==
 
  [[/metrics]]
 
  [[/metrics]]
  

Revision as of 09:29, 30 January 2023

Advertising: