add vcenter url to output
Some checks reported errors
continuous-integration/drone Build was killed

This commit is contained in:
2023-08-31 14:28:44 +10:00
parent ea2e2e2912
commit f646fa7ea4
3 changed files with 12 additions and 1 deletions

3
.gitignore vendored
View File

@@ -1 +1,2 @@
vm-metrics
vm-metrics
log.txt

View File

@@ -221,3 +221,11 @@
2023/08/31 11:55:53 Setting timezone to 'Australia/Sydney'
2023/08/31 11:55:53 Connecting to vCenter https://vc.lab.local/sdk
2023/08/31 11:55:53 Cluster: Cluster
2023/08/31 14:27:24 Starting execution. Built on from sha1
2023/08/31 14:27:24 Setting timezone to 'Australia/Sydney'
2023/08/31 14:27:24 Connecting to vCenter https://vc.lab.local/sdk
2023/08/31 14:27:24 Cluster: Cluster
2023/08/31 14:28:00 Starting execution. Built on from sha1
2023/08/31 14:28:00 Setting timezone to 'Australia/Sydney'
2023/08/31 14:28:00 Connecting to vCenter https://vc.lab.local/sdk
2023/08/31 14:28:00 Cluster: Cluster

View File

@@ -36,6 +36,7 @@ var (
type DrsResults struct {
ClusterName string
DrsScore int32
Vcenter string
NumVmsDrsBucket0To20 int32
NumVmsDrsBucket21To40 int32
NumVmsDrsBucket41To60 int32
@@ -310,6 +311,7 @@ func getNumVmsPerDrsScoreBucket(client *govmomi.Client) error {
// Create a new result
result := DrsResults{
Vcenter: client.URL().Host,
ClusterName: cluster.Name,
DrsScore: ccr.DrsScore,
NumVmsDrsBucket0To20: ccr.NumVmsPerDrsScoreBucket[0],