I'm using Prometheus http service discovery to add targets dynamically, But it looks like I can only add labels and targets URLs <static_config>. I would like to know is there any way to specify scrape_interval for each target?
I can do that if I add targets manually to the Prometheus config file as below.
global:
scrape_interval: 15s # By default, scrape targets every 15 seconds.
scrape_configs:
- job_name: 'target-1'
# Override the global default and scrape targets from this job every 5 seconds.
scrape_interval: 5s
static_configs:
- targets: ['localhost:9090']
- job_name: 'target-2'
scrape_interval: 5s
static_configs:
- targets: ['localhost:1010']