Skip to content

Commit

Permalink
Fixed datastore name mapping in vsphere input (influxdata#5920)
Browse files Browse the repository at this point in the history
  • Loading branch information
prydin authored and Helge Waastad committed Jun 13, 2019
1 parent 6f64c83 commit 2091e20
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions plugins/inputs/vsphere/endpoint.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit 2091e20

Please sign in to comment.