Skip to content

Commit

Permalink
Merge pull request #3 from NETWAYS/fix/double_output
Browse files Browse the repository at this point in the history
Remove duplicated Output
  • Loading branch information
RincewindsHat authored Dec 3, 2024
2 parents 0d78bf9 + 15ce1bb commit 3fcb457
Showing 1 changed file with 3 additions and 4 deletions.
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

0 comments on commit 3fcb457

Please sign in to comment.