mirror of
https://github.com/prometheus/prometheus
synced 2024-12-23 15:04:13 +00:00
Update discovery/gce/gce.go
Co-authored-by: Julien Pivotto <roidelapluie@gmail.com> Signed-off-by: Joey Freeland <joey@free.land>
This commit is contained in:
parent
8017dd7242
commit
5d0a12855b
@ -180,7 +180,7 @@ func (d *Discovery) refresh(ctx context.Context) ([]*targetgroup.Group, error) {
|
||||
|
||||
// Append named interface metadata for all interfaces
|
||||
for _, iface := range inst.NetworkInterfaces {
|
||||
gceLabelNetAddress := model.LabelName(fmt.Sprintf("%sinterface_ipv4_%s", gceLabel, iface.Name))
|
||||
gceLabelNetAddress := model.LabelName(fmt.Sprintf("%sinterface_ipv4_%s", gceLabel, strutil.SanitizeLabelName(iface.Name)))
|
||||
labels[gceLabelNetAddress] = model.LabelValue(iface.NetworkIP)
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user