Skip to content
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

Consul Service Discovery Make Node Meta Information Available #3019

Closed
omadawn opened this Issue Aug 2, 2017 · 3 comments

Comments

Projects
None yet
3 participants
@omadawn
Copy link

omadawn commented Aug 2, 2017

Consul SD makes service tags available via __meta_consul_tags but these are not as flexible as labels. Consul provides meta data for nodes which would be much more useful for setting labels such as group="Web", environment="Production", etc.

We could either have this meta data become labels when written to the TSDs or make them available via hidden labels similar to the way marathon SD does it (_meta_marathon_port_mapping_label)

Consul nodes:
[sporkboy@lappy:Consul]$ curl http://server2.example.com:8500/v1/catalog/nodes | jq '.'
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 476 100 476 0 0 817 0 --:--:-- --:--:-- --:--:-- 817
[
{
"ID": "",
"Node": "server1.example.com",
"Address": "server1.example.com",
"Datacenter": "denver",
"TaggedAddresses": null,
"Meta": {
"Environment": "Test",
"Group": "prometheus-poc",
"Team": "Unix"
},
"CreateIndex": 61,
"ModifyIndex": 5256
},
{
"ID": "",
"Node": "server2.example.com",
"Address": "server2.example.com",
"Datacenter": "denver",
"TaggedAddresses": null,
"Meta": {
"Environment": "Perf",
"Group": "prometheus-poc",
"Team": "Unix"
},
"CreateIndex": 5,
"ModifyIndex": 218
}
]

consul services:
[sporkboy@lappy:Consul]$ curl http://server2.example.com:8500/v1/catalog/services | jq '.'
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 211 100 211 0 0 3467 0 --:--:-- --:--:-- --:--:-- 3516
{
"consul": [],
"node": [
"tag1",
"tag2"
],
"node-exporter": [
"prometheus",
"exporter"
],
"node2test-service": [
"monkeys",
"brains",
"test",
"prometheus",
"exporter"
],
"process-exporter": [
"prometheus",
"exporter"
],
"web": [
"rails"
]
}

@brian-brazil

This comment has been minimized.

Copy link
Member

brian-brazil commented Aug 2, 2017

See #2966

@grobie

This comment has been minimized.

Copy link
Member

grobie commented Nov 12, 2017

Added in #2966.

@lock

This comment has been minimized.

Copy link

lock bot commented Mar 23, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked and limited conversation to collaborators Mar 23, 2019

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
You can’t perform that action at this time.