-
Notifications
You must be signed in to change notification settings - Fork 4.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added metadata information about servers into consul service description #5455
Added metadata information about servers into consul service description #5455
Conversation
agent/consul/leader.go
Outdated
"consul_voter": strconv.FormatBool(!parts.NonVoter), | ||
"raft_version": strconv.Itoa(parts.RaftVersion), | ||
"serf_protocol": fmt.Sprintf("%v (%v .. %v)", member.ProtocolCur, member.ProtocolMin, member.ProtocolMax), | ||
"version": parts.Build.String(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This could maybe be "consul_version"
(we could add this meta to agents as well in the future and it could conflict with user defined meta)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Aestek version sounds good as it is namespaced by consul service name (and AFAIK, it is not possible to add other meta to consul service)
Could someone review this - as it is pretty straighforward ? This is pretty minor, but would help foreign systems to get information about members of cluster easily (for instance prometheus to target specific instances of Consul servers) |
17d277f
to
ab78be1
Compare
@i0rek Can you have a look, it is pretty straightforward and allow systems such as prometheus (for instance to solve #4659 since prometheus can extract version information from service.meta tags) or UIs to discover quickly more informations about servers without digging into consul tools (we could even later add information about who is the leader to solve issues such as #5073) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good in general, have one question.
Hi @pierresouchay / @Aestek Thanks for this, exposing this kind of info will be very useful for us.
This could be very useful for a feature we're currently adding to the UI! Overall, I was just wondering if you could let me know where the @mkeeler , we were chatting about namespacing useful meta kv's with |
@johncowen Those values will be available in Service.Meta of the service consul (and thus, available in the HTTP APIs, or, for instance in prometheus or similar systems that allow extracting Service.Meta) |
Oh I see, now I understand what you said about the namespacing, these will only be set on the 👍 |
e424ee2
to
3062cab
Compare
Damned unstable tests |
3062cab
to
0bba50f
Compare
@i0rek Unit tests are not stable once again :( |
This allows have information about servers from HTTP APIs without using the command line.
…0rek Rebased on origin master
0bba50f
to
4c3b0d4
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I changed my mind about booted_as_consul_voter
and I have another comment. Looks good otherwise.
…l_current/min/max metadata
@i0rek All DONE |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
@i0rek Thank you again ! |
Several calls had version meta-data added in consul 1.5.2 [1]. This fixes those tests and bumps circleci tests to use consul 1.5.2. [1] hashicorp/consul#5455
Several calls had version meta-data added in consul 1.5.2 [1]. This fixes those tests and bumps circleci tests to use consul 1.5.2. [1] hashicorp/consul#5455
Several calls had version meta-data added in consul 1.5.2 [1]. This fixes those tests and bumps circleci tests to use consul 1.5.2. [1] hashicorp/consul#5455
This allows have information about servers from HTTP APIs without using the command line.
It will allow to see information about servers from GUIs using the HTTP APIs for instance.