diff --git a/.gitignore b/.gitignore index 8293078..9656516 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ -vm-metrics \ No newline at end of file +vm-metrics +log.txt \ No newline at end of file diff --git a/log.txt b/log.txt index b0915b5..f8e824c 100644 --- a/log.txt +++ b/log.txt @@ -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 diff --git a/main.go b/main.go index b07c593..7e53d49 100644 --- a/main.go +++ b/main.go @@ -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],