prometheus/prometheus — pull request #86 by juliusv (2013-02-25 23:42:10+00:00)
Title: Allow replacing job targets via HTTP API.

This ended up much uglier than I would like :( Part of the reason is that the existing retrieval structure doesn't lend itself very well to swapping out targets or getting information out for display (like heap elements being juggled around during scrape). Other ugly parts are how the config+job state needs to get passed around to populate targets and pools with the right parameters. Meh, but my brain stopped producing better results, so I hope this is ok for now. I think it would be a good idea to rewrite the retrieval layer from scratch sometime, with these pain points in mind. It could all be much more beautiful.

This roughly comprises the following changes:

- index target pools by job instead of scrape interval
- make targets within a pool exchangable while preserving existing
health state for targets
- allow exchanging targets via HTTP API (PUT)
- show target lists in /status (experimental and broken!)