VictoriaMetrics/lib/promscrape/discovery
Aliaksandr Valialkin 9fbd45a22f
lib/promscrape/discovery/kuma: follow-up for 317fef95f9
- Do not generate __meta_server label, since it is unavailable in Prometheus.
- Add a link to https://docs.victoriametrics.com/sd_configs.html#kuma_sd_configs to docs/CHANGELOG.md,
  so users could click it and read the docs without the need to search the corresponding docs.
- Remove kumaTarget struct, since it is easier generating labels for discovered targets
  directly from the response returned by Kuma. This simplifies the code.
- Store the generated labels for discovered targets inside atomic.Value. This allows reading them
  from concurrent goroutines without the need to use mutex.
- Use synchronouse requests to Kuma instead of long polling, since there is a little sense
  in the long polling when the Kuma server may return 304 Not Modified response every -promscrape.kumaSDCheckInterval.
- Remove -promscrape.kuma.waitTime command-line flag, since it is no longer needed when long polling isn't used.
- Set default value for -promscrape.kumaSDCheckInterval to 30s in order to be consistent with Prometheus.
- Remove unnecessary indirections for string literals, which are used only once, in order to improve code readability.
- Remove unused fields from discoveryRequest and discoveryResponse.
- Update tests.
- Document why fetch_timeout and refresh_interval options are missing in kuma_sd_config.
- Add docs to discoveryutils.RequestCallback and discoveryutils.ResponseCallback,
  since these are public types.

Side notes: it is weird that Prometheus implementation for kuma_sd_configs sets `instance` label,
since usually this label is set by the Prometheus itself to __address__ after the relabeling phase.
See https://www.robustperception.io/life-of-a-label/

Updates https://github.com/VictoriaMetrics/VictoriaMetrics/issues/3389

See https://github.com/prometheus/prometheus/issues/7919
and https://github.com/prometheus/prometheus/pull/8844
as a reference implementation in Prometheus
2023-02-22 17:51:51 -08:00
..
azure lib/promscrape/discovery/azure: add __meta_azure_machine_size label in the same way as Prometheus does 2023-01-27 17:07:12 -08:00
consul app,lib: fix typos in comments (#3804) 2023-02-13 13:27:13 +01:00
digitalocean lib/promscrape: optimize service discovery speed 2022-11-29 21:26:00 -08:00
dns lib/promscrape: optimize service discovery speed 2022-11-29 21:26:00 -08:00
docker lib/promscrape/discovery: add a comment explaining why duplicates are removed from the generated target labels 2023-02-22 17:51:51 -08:00
dockerswarm lib/promscrape/discovery: add a comment explaining why duplicates are removed from the generated target labels 2023-02-22 17:51:51 -08:00
ec2 lib/promscrape: optimize service discovery speed 2022-11-29 21:26:00 -08:00
eureka lib/promscrape: optimize service discovery speed 2022-11-29 21:26:00 -08:00
gce lib/promscrape/discovery/gce: follow-up for b2ccdaaa2f 2023-01-10 13:51:03 -08:00
http lib/promscrape/discovery: add a comment explaining why duplicates are removed from the generated target labels 2023-02-22 17:51:51 -08:00
kubernetes lib/promscrape/discovery: add a comment explaining why duplicates are removed from the generated target labels 2023-02-22 17:51:51 -08:00
kuma lib/promscrape/discovery/kuma: follow-up for 317fef95f9 2023-02-22 17:51:51 -08:00
nomad app,lib: fix typos in comments (#3804) 2023-02-13 13:27:13 +01:00
openstack lib/promscrape/discovery/openstack: use port 80 for the discovered target by default if it isnt specified in the config 2023-02-11 14:41:58 -08:00
yandexcloud lib/promscrape: optimize service discovery speed 2022-11-29 21:26:00 -08:00