SadiJr opened a new pull request #5357:
URL: https://github.com/apache/cloudstack/pull/5357


   ### Description
   
   CloudStack has a feature to get VM metrics, which, for VMWare, is collected 
from a time window of 5 minutes; This time window (5 minutes) is hard-coded and 
operators cannot choose which one to use. 
   
   In vCenter, VMWare has default metric collections time window of 5 minutes, 
however operators are able to change it, which may cause inconsistency with the 
hard-coded ACS's time window.
   
   This PR intends to externalize this configuration via 
`vmware.stats.time.window` option to allow operators to choose the time window 
to collect the metrics. Also, I added logs to alert operators in case window 
interval is not enabled in vCenter.
   
   Interesting links about this:
    - 
https://knowledge.broadcom.com/external/article/41027/the-vmware-probe-output-error-with-inval.html
    - https://www.veeam.com/kb1021
    - https://github.com/vmware/pyvmomi/issues/783
    - 
https://community.broadcom.com/enterprisesoftware/communities/community-home/digestviewer/viewthread?MessageKey=646291e2-9c27-416f-b3e2-b408fd852cf3&CommunityKey=170eb4e5-a593-4af2-ad1d-f7655e31513b&tab=digestviewer
    - 
https://docs.vmware.com/en/VMware-vSphere/6.7/com.vmware.vsphere.vcenterhost.doc/GUID-5D85751A-2CE8-4FD5-83C8-90A17060631E.html
   
   ### Types of changes
   
   - [ ] Breaking change (fix or feature that would cause existing 
functionality to change)
   - [ ] New feature (non-breaking change which adds functionality)
   - [ ] Bug fix (non-breaking change which fixes an issue)
   - [x] Enhancement (improves an existing feature and functionality)
   - [ ] Cleanup (Code refactoring and cleanup, that may add test cases)
   
   #### Feature/Enhancement Scale
   
   - [ ] Major
   - [x] Minor
   
   ### How Has This Been Tested?
   
   - I created a VM in CloudStack and maked Network and Disk I/O operations;
   - I changed the value of configuration `vmware.stats.time.window`;
   - I checked if the error message appears in logs when the interval used is 
disabled in vCenter;
   - After that, I enabled the interval in vCenter;
   - I checked if metrics are now collected;
   - And checked if VM metrics in ACS are the same at the vCenter (a little 
difference, but this is expected because ACS call vCenter to collect metrics, 
when It responses, the VM metrics have changed a little);
   - Finally, for my tests, 20 seconds are the minimum acceptable by vCenter 
6.5. Less than this result in errors.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to