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

Expose GCE labels during service discovery #4137

Closed
woolite64 opened this Issue May 3, 2018 · 5 comments

Comments

Projects
None yet
2 participants
@woolite64
Copy link
Contributor

woolite64 commented May 3, 2018

Proposal

Expose GCE instance labels as __meta_gce_label_ so that values can be passed to Target Labels.

It's currently possible to filter by GCE labels using Prometheus, but the values aren't available once the host is found. Tags and metadata are exposed (here) with __meta prefixes.

@brian-brazil

This comment has been minimized.

Copy link
Member

brian-brazil commented May 3, 2018

Would you like to send a PR? We generally accept all potentially useful metadata.

@woolite64

This comment has been minimized.

Copy link
Contributor Author

woolite64 commented May 4, 2018

Open to creating a PR, but having some dependency issues.

My local vendor files don't have the Instance.Labels parameter in the docs. It looks like the Google Compute dependencies that get imported don't match the docs here: https://godoc.org/google.golang.org/api/compute/v1

@brian-brazil

This comment has been minimized.

Copy link
Member

brian-brazil commented May 4, 2018

It sounds like you'll need to update the vendoring. We use govendor for this,

@woolite64

This comment has been minimized.

Copy link
Contributor Author

woolite64 commented May 8, 2018

Opened a PR for this. First time using Go, any feedback is appreciated.

I was able to compile, run tests, and confirm that GCE labels were working on my end.

@woolite64 woolite64 closed this May 12, 2018

@lock

This comment has been minimized.

Copy link

lock bot commented Mar 22, 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 22, 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.