cloudstack
cloudstack copied to clipboard
VM stats history visualization
Description
PR #5984 recently implemented the listVirtualMachinesUsageHistory API, which provides historical data of VM stats. However, the current ACS UI only shows VM stats from the most recent data collection.
This PR implements new features in the UI which allow ACS users to view the historical stats of each VM individually.
Types of changes
- [ ] Breaking change (fix or feature that would cause existing functionality to change)
- [x] New feature (non-breaking change which adds functionality)
- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] Enhancement (improves an existing feature and functionality)
- [ ] Cleanup (Code refactoring and cleanup, that may add test cases)
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
- [x] Major
- [ ] Minor
Screenshots:
Charts:




Possible Filtering:

How Has This Been Tested?
I went to Compute > Instances > any-vm-instance > Statistics and was able to visualize all the statistics charts for the selected VM.
Also, I filtered by different period combinations and the data was presented correctly.
Found UI changes, kicking a new UI QA build @blueorangutan ui
@acs-robot a Jenkins job has been kicked to build UI QA env. I'll keep you posted as I make progress.
UI build: :heavy_check_mark: Live QA URL: http://qa.cloudstack.cloud:8080/client/pr/6401 (SL-JID-1605)
@blueorangutan package
@DaanHoogland a Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress.
Looks fantastic, looking forward to reviewing/testing this.
Wow - looks very nice @joseflauzino thanks!
Packaging result: :heavy_check_mark: el7 :heavy_check_mark: el8 :heavy_check_mark: debian :heavy_check_mark: suse15. SL-JID 3459
@blueorangutan test keepEnv
@DaanHoogland a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests
Trillian test result (tid-4223) Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7 Total time taken: 41093 seconds Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr6401-t4223-kvm-centos7.zip Smoke tests completed. 97 look OK, 0 have errors Only failed tests results shown below:
| Test | Result | Time (s) | Test File |
|---|
@joseflauzino, two minor points
- I build and deployed the code from this PR but don´t get any data from this weekend, dispite deploying some VMs in the nested env on saterday: This is because the default value for
vm.stats.max.retention.timeis 1. Does it make sense to set it for instance to 5, so there is always something to see? - when refreshing the default tab is displayed again and after re-opening the statistics tab the configurations (
all dataor astart date/end datepair) are reset/forgotten.
in general tests good and looks good, nice thanks
@DaanHoogland thanks for your review and testing.
1. I build and deployed the code from this PR but don´t get any data from this weekend, dispite deploying some VMs in the nested env on saterday: This is because the default value for `vm.stats.max.retention.time` is 1. Does it make sense to set it for instance to 5, so there is always something to see?
Both vm.stats.max.retention.time and vm.stats.interval were set to 1 min by default on purpose (in PR #5984, not in the current PR). The reason is that it is common to find clouds with a considerable amount of VM instances (e.g. hundreds or even over 1k). So the amount of data generated even in a short 5 min period can be very large and the impact can also be large if it is not something planned by the cloud operators. So I think it is more prudent that we leave the default values of these parameters in a way that generates the minimum amount of data possible. It is then up to the cloud administrators/operators to decide whether or not to increase the amount of stats data to be kept in the database.
2. when refreshing the default tab is displayed again and after re-opening the statistics tab the configurations (`all data`or a `start date`/`end date` pair) are reset/forgotten.
This was also an intentional detail. The idea is to have the user open the filtering modal and click the OK button whenever they want to get updated data for the selected period. The reason is that during our tests there were several times when users clicked the refresh button and it looked like the data was not updated. But what happened was that the selected period was in the past, so the data would always be the same. The way it is now is that the user will always check the selected period before getting updated data. My intention is to leave it this way for now and according to the feedback we get from users we could think of other ways to improve the user experience.
@joseflauzino Ad 1. Ok makes sense Ad 2. Makes sense as well, can we then in this situation change the text on the button or add a note next to it instructing like wise?
Found UI changes, kicking a new UI QA build @blueorangutan ui
@acs-robot a Jenkins job has been kicked to build UI QA env. I'll keep you posted as I make progress.
UI build: :heavy_check_mark: Live QA URL: http://qa.cloudstack.cloud:8080/client/pr/6401 (SL-JID-1674)
@DaanHoogland I have just committed a change that applies your suggestion related to the submit button text.
@DaanHoogland I have just committed a change that applies your suggestion related to the submit button text.
looks ok, I can imagine the novice won´t be clear on this, but letś go for it!
This pull request has merge conflicts. Dear author, please fix the conflicts and sync your branch with the base branch.
Found UI changes, kicking a new UI QA build @blueorangutan ui
@acs-robot a Jenkins job has been kicked to build UI QA env. I'll keep you posted as I make progress.
UI build: :heavy_multiplication_x: (SL-JID-1826)
Found UI changes, kicking a new UI QA build @blueorangutan ui
@acs-robot a Jenkins job has been kicked to build UI QA env. I'll keep you posted as I make progress.
UI build: :heavy_check_mark: Live QA URL: http://qa.cloudstack.cloud:8080/client/pr/6401 (SL-JID-1827)
This pull request has merge conflicts. Dear author, please fix the conflicts and sync your branch with the base branch.
This pull request has merge conflicts. Dear author, please fix the conflicts and sync your branch with the base branch.
@joseflauzino can you fix the conflicts.
Asking @Pearl1594 @vladimirpetrov @borisstoyanov - if we can have a round of review/testing this PR. Thanks. cc @shwstppr







