Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upgce_sd has full url in zone meta data #3042
Comments
brian-brazil
added
the
component/service discovery
label
Aug 9, 2017
This comment has been minimized.
This comment has been minimized.
|
The zone is taken from the go compute api https://godoc.org/google.golang.org/api/compute/v1#Instance
So that's where url's are coming from. |
This comment has been minimized.
This comment has been minimized.
|
We generally just take whatever the SD API gives us, you could extract out a shorter version using relabelling. |
This comment has been minimized.
This comment has been minimized.
|
Is it possible to update the documentation with example output? It was not expected that it would be an url, but being an url is fine if it's expected I'm using the following relabelling rule now:
|
This comment has been minimized.
This comment has been minimized.
|
Sure, I'd be happy to take a PR clarifying the docs. |
mkm85
referenced this issue
Aug 10, 2017
Merged
clarify gce sd config when meta data is returning urls as values #805
brian-brazil
closed this
Aug 10, 2017
This comment has been minimized.
This comment has been minimized.
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. |
mkm85 commentedAug 9, 2017
•
edited
What did you do?
I created a gce sd config like
and started prometheus, then I can see that the __meta_gce_zone contains much more than just the zone, it contains an url which ends with the zone"
This is also a problem for '__meta_gce_network' and '__meta_gce_subnetwork'
What did you expect to see?
Labels: region="asia-southeast1"
What did you see instead? Under which circumstances?
Labels: region="https://www.googleapis.com/compute/v1/projects/project/zones/asia-southeast1"
Environment
Running on google compute engine (GCE) in a docker container. It's the official 1.7.1 docker image
Linux 4.10.0-30-generic x86_64