Nomad-sd: expose additional client meta
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 17k
- Forks
- 2.1k
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 105
Description
Proposal
Nomad SD exposes very basic set of metadata:
nomad service info -verbose pushgateway
ID = _nomad-task-260f2146-1aa3-21f6-802d-234053ab0f60-pushgateway-pushgateway-http
Service Name = pushgateway
Namespace = default
Job ID = pushgateway
Alloc ID = 260f2146-1aa3-21f6-802d-234053ab0f60
Node ID = a156d6c6-3771-6984-e1f4-23d0e4eb996c
Datacenter = dc1
Address = 172.30.51.84:27995
Tags = []
It would be nice if additional Meta could've been exposed for the consumers. For example client name is something that is much more descriptive and can be used to help identify the location of the workload.
Additional meta that can be exposed via SD can be nice as well: ec2_region, availability_zone, etc'
Use-cases
When scraping with prometheus, client name is a very good place to put the client's hostname. Exposing it in the "instance" tag of prometheus is a nice way of quickly identifying where is the task running.
Attempted Solutions
I'm not sure if there are workarounds to this problem at the moment.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with Nomad service discovery as exercised by nomad service info -verbose, and trace how the current metadata is assembled and returned. Clarify which client and additional metadata should be exposed, including the Prometheus instance use case, then define tests that verify the selected fields appear without breaking existing output.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, prometheus
- Domain
- infrastructure, observability
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 32/100