mirror of
https://github.com/prometheus/prometheus.git
synced 2024-12-25 13:44:05 -08:00
discovery/openstack: remove unneeded assignment
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
This commit is contained in:
parent
ed99af0b05
commit
f32acc0b7b
|
@ -123,9 +123,7 @@ func (h *HypervisorDiscovery) refresh() (*targetgroup.Group, error) {
|
||||||
return false, fmt.Errorf("could not extract hypervisors: %s", err)
|
return false, fmt.Errorf("could not extract hypervisors: %s", err)
|
||||||
}
|
}
|
||||||
for _, hypervisor := range hypervisorList {
|
for _, hypervisor := range hypervisorList {
|
||||||
labels := model.LabelSet{
|
labels := model.LabelSet{}
|
||||||
openstackLabelHypervisorHostIP: model.LabelValue(hypervisor.HostIP),
|
|
||||||
}
|
|
||||||
addr := net.JoinHostPort(hypervisor.HostIP, fmt.Sprintf("%d", h.port))
|
addr := net.JoinHostPort(hypervisor.HostIP, fmt.Sprintf("%d", h.port))
|
||||||
labels[model.AddressLabel] = model.LabelValue(addr)
|
labels[model.AddressLabel] = model.LabelValue(addr)
|
||||||
labels[openstackLabelHypervisorHostName] = model.LabelValue(hypervisor.HypervisorHostname)
|
labels[openstackLabelHypervisorHostName] = model.LabelValue(hypervisor.HypervisorHostname)
|
||||||
|
|
Loading…
Reference in a new issue