global:
scrape_interval: 15s
scrape_configs:
- job_name: ‘prometheus’
scrape_interval: 5s
static_configs: - targets: [‘localhost:9090’]
root@ip----**:/etc/prometheus# cat prometheus.yml
global:
scrape_interval: 1s
evaluation_interval: 60s
scrape_configs:
- job_name: ‘prometheus’
scrape_interval: 5s
static_configs:- targets: [‘localhost:9090’]
- job_name: ‘node_exporter’
scrape_interval: 5s
static_configs:- targets: [‘localhost:9100’]
- job_name: ‘ec2_aws_node_exporter_discovery’
ec2_sd_configs:- region: ap-south-1
access_key: **************************
secret_key: *****************************************************
port: 9182
relabel_configs:Only monitor instances with a Name starting with “SD Demo”
- source_labels: [__meta_ec2_tag_Name]
regex: .*
action: keepUse the instance ID as the instance label
- source_labels: [__meta_ec2_instance_id]
target_label: instance
- region: ap-south-1
*