VictoriaMetrics/lib/promscrape/discovery/consul
Aliaksandr Valialkin 43a4dcdaf8
lib/promscrape/discovery/nomad: sync nomad_sd_configs fields with the Prometheus implementation
See the list of configs supported by Prometheus at f88a0a7d83/discovery/nomad/nomad.go (L76-L84)

- Removed "token" option. In can be set either via NOMAD_TOKEN env var or via `bearer_token` config option.
- Removed "scheme" option. It is automatically detected depending on whether the `tls_config` is set.
- Removed "services" and "tags" options, since they aren't supported by Prometheus.
- Added "region" option. If it is missing, then the region is read from NOMAD_REGION env var.
  If this var is empty, then it is set to "global" in the same way as Nomad client does.
  See 865ee8d37c/api/api.go (L297)
  and 865ee8d37c/api/api.go (L555-L556)
- If the "server" option is missing, then it is read from NOMAD_ADDR in the same way
  as Nomad client does - see 865ee8d37c/api/api.go (L294-L296)

This is a follow-up for 8aee209c53

Updates https://github.com/VictoriaMetrics/VictoriaMetrics/issues/3367
2023-01-09 21:30:19 -08:00
..
agent.go all: use %w instead of %s for wrapping errors in fmt.Errorf 2020-06-30 23:33:46 +03:00
agent_test.go lib/promscrape: add Prometheus-compatible service discovery for Consul aka consul_sd_configs 2020-05-04 20:53:06 +03:00
api.go lib/promscrape/discovery/nomad: sync nomad_sd_configs fields with the Prometheus implementation 2023-01-09 21:30:19 -08:00
consul.go lib/promscrape: optimize service discovery speed 2022-11-29 21:26:23 -08:00
service_node.go lib/promscrape/discovery/consul: expose service tags in individual labels __meta_consul_tag_<tagname> 2022-12-19 13:02:56 -08:00
service_node_test.go lib/promscrape/discovery/consul: expose service tags in individual labels __meta_consul_tag_<tagname> 2022-12-19 13:02:56 -08:00
watch.go lib/promscrape/discovery/{consul,nomad}: wait until the deleted serviceWatchers are stopped inside updateServices() call 2023-01-05 21:53:08 -08:00