Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions cmd/datastore.go
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,6 @@ func queryDatastores() {

// Calculate results and add perf data to list.
perfData, state := processQueryResults(datastoreName, capacity, freeSpace)
pl.Add(&perfData)

// Create PartialResult and add to Overall result.
pr := result.PartialResult{
Expand All @@ -142,14 +141,14 @@ func queryDatastores() {
check.ExitError(err)
}

pr.Perfdata.Add(&perfData)

aggregatedResult.AddSubcheck(pr)
}

dbConnection.Close()

fmt.Printf("%s | %s\n\n", aggregatedResult.GetOutput(), pl.String())

check.ExitRaw(aggregatedResult.GetStatus(), aggregatedResult.GetOutput()+" | "+pl.String()) // ExitRaw because of 'nested formatting issues' otherwise.
check.ExitRaw(aggregatedResult.GetStatus(), aggregatedResult.GetOutput()) // ExitRaw because of 'nested formatting issues' otherwise.
}

// Computes Perfdata, check result based on the queried data.
Expand Down
Loading