VictoriaMetrics/lib/promscrape/discovery/nomad
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
..
api.go lib/promscrape/discovery/nomad: sync nomad_sd_configs fields with the Prometheus implementation 2023-01-09 21:30:19 -08:00
nomad.go lib/promscrape/discovery/nomad: sync nomad_sd_configs fields with the Prometheus implementation 2023-01-09 21:30:19 -08:00
service_test.go lib/promscrape/discovery/nomad: follow-up after 48f371a46c 2023-01-05 18:09:23 -08:00
service.go lib/promscrape/discovery/nomad: follow-up after 48f371a46c 2023-01-05 18:09:23 -08:00
watch.go lib/promscrape/discovery/nomad: sync nomad_sd_configs fields with the Prometheus implementation 2023-01-09 21:30:19 -08:00