Fixed datastore name mapping in vsphere input (#5920)

This commit is contained in:
Pontus Rydin 2019-05-28 21:08:44 -04:00 committed by Daniel Nelson
parent ce2d501e91
commit fa492e0840
1 changed files with 2 additions and 3 deletions

View File

@ -369,7 +369,6 @@ func (e *Endpoint) discover(ctx context.Context) error {
}
log.Printf("D! [inputs.vsphere]: Discover new objects for %s", e.URL.Host)
resourceKinds := make(map[string]resourceKind)
dcNameCache := make(map[string]string)
numRes := int64(0)
@ -418,9 +417,9 @@ func (e *Endpoint) discover(ctx context.Context) error {
}
// Build lun2ds map
dss := resourceKinds["datastore"]
dss := newObjects["datastore"]
l2d := make(map[string]string)
for _, ds := range dss.objects {
for _, ds := range dss {
url := ds.altID
m := isolateLUN.FindStringSubmatch(url)
if m != nil {