If you are making significant changes to the way targets are
discovered by Prometheus, you might want to make sure you are not
missing anything.
There used to be a [targets](https://prometheus.torproject.org/classic/targets) web interface but it might be broken
([1108095](https://bugs.debian.org/1108095)) or even retired altogether ([tpo/tpa/team#41790](https://gitlab.torproject.org/tpo/tpa/team/-/issues/41790))
and besides, visually checking for this is error-prone.
It's better to do a stricter check. For that, you can use the API
endpoint and `diff` the resulting JSON, after some filtering. Here's
an example.
1. fetch the targets before the change:
curl localhost:9090/api/v1/targets > before.json
2. make the change (typically by running Puppet):
pat
3. fetch the targets after the change:
curl localhost:9090/api/v1/targets > after.json
4. diff the two, you'll notice this is way too noisy because the
scrape times have changed. you might also get changed paths that
you should ignore:
diff -u before.json after.json
Files might be sorted differently as well.
5. so instead, created a filtered and sorted JSON file: