Meaning of negative counterId/values with MetricCSV?
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 2.3k
- Forks
- 763
- PR merge metrics
- No merged PRs in 30d
Description
Good day,
I'm busy writing an python app to pull all the performance data from the ESXi hosts as quickly as possible.
Using the following code snippet, I get some negative counterId values as below. Are those values to ignore? And if it's "useful", how do I map that negative counterId to the relevant counterId/value?
for vm in gpOutput:
print(vm['moref'])
qs.append(vim.PerformanceManager.QuerySpec(entity=vm['moref'], startTime=startTime, endTime=endTime, instance='*', format='csv'))
print("perfRes")
perfResults = perfManager.QueryPerf(querySpec=qs)
(vim.PerformanceManager.MetricSeriesCSV) {
dynamicType = <unset>,
dynamicProperty = (vmodl.DynamicProperty) [],
id = (vim.PerformanceManager.MetricId) {
dynamicType = <unset>,
dynamicProperty = (vmodl.DynamicProperty) [],
counterId = -2147483542,
instance = ''
},
value = '-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-
1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1
,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,0'
}
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the PerformanceManager.QuerySpec and MetricSeriesCSV entry points shown in the report, then consult the pyvmomi and vSphere PerformanceManager documentation for counterId semantics. Determine whether negative counterId values and -1 samples are expected, and document how such values should be interpreted or mapped.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- api
- Issue type
- Documentation
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100