Nomad service discovery, find client instances

I am working on prometheus setup for Nomad. Existing nomad-pack for prometheus still uses consul nomad-pack-community-registry/packs/prometheus/variables.hcl at main · hashicorp/nomad-pack-community-registry · GitHub, so have to workaround.

When using nomad_sd_configs, prometheus find services exposed, but doesn’t find nomad clients and servers themselves. With consuld_sd_configs it is possible to find nomad-client type of instance and scrape metrics from it.

How can I do the same with nomad_sd_configs? Find nomad client instances, for example?

Here is the setup i have now and honestly it doesn’t make much sense, as services found through service discovery will not expose metrics on /v1/metrics endpoind - this is for the nomad itself.

- job_name: "nomad_client"
    metrics_path: "/v1/metrics"
    params:
      format:
      - "prometheus"
    nomad_sd_configs:
    - server: "{{ env "attr.unique.network.ip-address" }}:4646"

@attachmentgenie nomad-pack-o11y-registry/packs/prometheus/variables.hcl at main · attachmentgenie/nomad-pack-o11y-registry · GitHub example is unfortunately also not migrated to nomad service discovery