-
Notifications
You must be signed in to change notification settings - Fork 10.1k
Closed
Description
What did you do?
- Set targets via
file_sd_configs, where each target inside the file has the sameinstancebut adds a unique__metrics_path__label (for proxying metrics to devices that can't run exporters, similar tosnmp_exporter) - Refresh
/targetsendpoint multiple times
What did you expect to see?
- Consistent, sorted ordering of targets
What did you see instead? Under which circumstances?
- Randomly ordered targets list each refresh
Cause
Sorting by only the instance label: https://github.com/prometheus/prometheus/blob/master/web/web.go#L690-L694
Proposal
Sort by the full URL (including query params, sorted by key?) instead of just the instance
Happy to do a PR for this is the proposal is acceptable.