-
Notifications
You must be signed in to change notification settings - Fork 10.2k
Closed
Description
While I readily agree that autogenerated config files should not have this problem, and that YAML works that way, especially in the trial phase, this can confuse users. Warning or, preferably, erroring out would be appreciated.
If you run with a configuration like:
scrape_configs:
- job_name: 'prometheus_system'
target_groups:
- targets: ['localhost:9100']
scrape_configs:
- job_name: 'foo_system'
target_groups:
- targets: ['foot:9100']
the former scrape_configs is silently discarded. While that's the obvious case, constructs like
scrape_configs:
- job_name: 'prometheus_system'
target_groups:
- targets: ['localhost:9100']
rule_files:
- 'prometheus.rules'
scrape_configs:
- job_name: 'foo_system'
target_groups:
- targets: ['foo:9100']
are silently discarded as well.
So to summarize: Yes, I fat-fingered, but principle of least surprise would be to error out instead of silently carrying on.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels