vmware / govmomi

Go library for the VMware vSphere API
Apache License 2.0
2.27k stars 897 forks source link

[BUG] Govc metrics.ls datastore/myds requires an "Interval" -> -i=real is not working ( VSAN ESA Metrics / Telegraf needed ] #3375

Open Muy69 opened 4 months ago

Muy69 commented 4 months ago

Describe the bug I would like to list all the new Metrics in vSphere 8u1 so that the new REAL Time ( 20sec ) Interval can be listet so that we have the ability to implement it to Telegraf Module : Vsphere .

GOVC Version 0.35.0 ( Windows)

govc about FullName: VMware vCenter Server 8.0.1 build-22368047 Name: VMware vCenter Server Vendor: VMware, Inc. Version: 8.0.1 Build: 22368047 OS type: linux-x64 API type: VirtualCenter API version: 8.0.1.0 Product ID: vpx UUID:

Commandline used

govc metric.ls datastore/myds
govc : C:\Windows\system32\govc.exe: ServerFaultCode: A specified parameter was not correct: interval 
At line:1 char:1
+ govc metric.ls datastore/vsanDatastore
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (C:\Windows\syst...rrect: interval:String) [], RemoteException
    + FullyQualifiedErrorId : NativeCommandError

To Reproduce

govc metric.ls datastore/myds
govc : C:\Windows\system32\govc.exe: ServerFaultCode: A specified parameter was not correct: interval
At line:1 char:1
+ govc metric.ls datastore/vsanDatastore
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (C:\Windows\syst...rrect: interval:String) [], RemoteException
    + FullyQualifiedErrorId : NativeCommandError
govc metric.ls datastore/myds -i=real
 govc : Usage: C:\Windows\system32\govc.exe metric.ls [OPTIONS] PATH
At line:1 char:1
+ govc metric.ls datastore/vsanDatastore -i=real
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (Usage: C:\Windo... [OPTIONS] PATH:String) [], RemoteException
    + FullyQualifiedErrorId : NativeCommandError

Link Doku Govnomi

***Usage: govc metric.ls [OPTIONS] PATH***

List available metrics for PATH.

The default output format is the metric name.
The '-l' flag includes the metric description.
The '-L' flag includes the metric units, instance count (if any) and description.
The instance count is prefixed with a single '@'.
If no aggregate is provided for the metric, instance count is prefixed with two '@@'.

Examples:
  govc metric.ls /dc1/host/cluster1
  govc metric.ls datastore/*
  govc metric.ls -L -g CPU /dc1/host/cluster1/host1
  govc metric.ls vm/* | grep mem. | xargs govc metric.sample vm/*

Options:
  -L=false               Longer listing format
  -g=                    List a specific Group
  -i=real                Interval ID (real|day|week|month|year)
  -l=false               Long listing format

Expected behavior

$ govc metric.ls datastore/myds
datastore.numberReadAveraged.average
datastore.throughput.usage.average
datastore.throughput.contention.average
datastore.write.average
datastore.read.average
datastore.numberWriteAveraged.average
disk.used.latest
disk.provisioned.latest
disk.capacity.latest
disk.capacity.contention.average
disk.capacity.provisioned.average
disk.capacity.usage.average

Affected version govc 0.35.0 ( windows )

Screenshots/Debug Output

Additional context

github-actions[bot] commented 4 months ago

Howdy 🖐   Muy69 ! Thank you for your interest in this project. We value your feedback and will respond soon.

If you want to contribute to this project, please make yourself familiar with the CONTRIBUTION guidelines.

Muy69 commented 4 months ago

Anyone an Idea why under the Version 0.35.0 the example is not working any longer ? Did the Option [path] was changed but the Documentation doesnot reflect it yet ?

Muy69 commented 3 months ago

@dougm From the Api I would see the following Metric , as that should be the new Metrics with the 30sec [ ( High Resolution Stats ] Polling Intervall on a VSAN ( esx 8u1 )

Are they already implemented ? Govnomi should be on Version 8u2 compatible I read or is that maybe not true for that aspect ?

['hr-cluster-domclient', 'hr-cluster-domcompmgr', 'hr-host-domclient', 'hr-host-domcompmgr', 'hr-vsan-vnic-net', 'hr-vsan-host-net', 'hr-vsan-pnic-net', 'hr-rdt-net', 'hr-vsan-tcpip-stats', 'hr-vsan-esa-disk-layer', 'hr-vsan-esa-disk-scsifw', 'hr-vsan-esa-dom-scheduler', 'hr-cache-disk', 'hr-capacity-disk', 'hr-disk-group', 'hr-zdom-io', 'hr-zdom-vtx']

github-actions[bot] commented 2 weeks ago

This issue is stale because it has been open for 90 days with no activity. It will automatically close after 30 more days of inactivity. Mark as fresh by adding the comment /remove-lifecycle stale.