cloudstack icon indicating copy to clipboard operation
cloudstack copied to clipboard

VM stats history visualization

Open joseflauzino opened this issue 3 years ago • 66 comments

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:

CPU

Memory

Network

Disk

Possible Filtering: filters

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.

joseflauzino avatar May 20 '22 11:05 joseflauzino

Found UI changes, kicking a new UI QA build @blueorangutan ui

acs-robot avatar May 20 '22 11:05 acs-robot

@acs-robot a Jenkins job has been kicked to build UI QA env. I'll keep you posted as I make progress.

blueorangutan avatar May 20 '22 11:05 blueorangutan

UI build: :heavy_check_mark: Live QA URL: http://qa.cloudstack.cloud:8080/client/pr/6401 (SL-JID-1605)

blueorangutan avatar May 20 '22 11:05 blueorangutan

@blueorangutan package

DaanHoogland avatar May 20 '22 15:05 DaanHoogland

@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.

blueorangutan avatar May 20 '22 15:05 blueorangutan

Looks fantastic, looking forward to reviewing/testing this.

rohityadavcloud avatar May 20 '22 15:05 rohityadavcloud

Wow - looks very nice @joseflauzino thanks!

nvazquez avatar May 20 '22 15:05 nvazquez

Packaging result: :heavy_check_mark: el7 :heavy_check_mark: el8 :heavy_check_mark: debian :heavy_check_mark: suse15. SL-JID 3459

blueorangutan avatar May 20 '22 16:05 blueorangutan

@blueorangutan test keepEnv

DaanHoogland avatar May 20 '22 17:05 DaanHoogland

@DaanHoogland a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests

blueorangutan avatar May 20 '22 17:05 blueorangutan

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

blueorangutan avatar May 21 '22 05:05 blueorangutan

@joseflauzino, two minor points

  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?
  2. when refreshing the default tab is displayed again and after re-opening the statistics tab the configurations (all dataor a start date/end date pair) are reset/forgotten.

in general tests good and looks good, nice thanks

DaanHoogland avatar May 23 '22 07:05 DaanHoogland

@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 avatar May 23 '22 17:05 joseflauzino

@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?

DaanHoogland avatar May 23 '22 17:05 DaanHoogland

Found UI changes, kicking a new UI QA build @blueorangutan ui

acs-robot avatar Jun 03 '22 19:06 acs-robot

@acs-robot a Jenkins job has been kicked to build UI QA env. I'll keep you posted as I make progress.

blueorangutan avatar Jun 03 '22 19:06 blueorangutan

UI build: :heavy_check_mark: Live QA URL: http://qa.cloudstack.cloud:8080/client/pr/6401 (SL-JID-1674)

blueorangutan avatar Jun 03 '22 19:06 blueorangutan

@DaanHoogland I have just committed a change that applies your suggestion related to the submit button text.

joseflauzino avatar Jun 03 '22 19:06 joseflauzino

@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!

DaanHoogland avatar Jun 07 '22 09:06 DaanHoogland

This pull request has merge conflicts. Dear author, please fix the conflicts and sync your branch with the base branch.

github-actions[bot] avatar Jun 23 '22 14:06 github-actions[bot]

Found UI changes, kicking a new UI QA build @blueorangutan ui

acs-robot avatar Jun 23 '22 14:06 acs-robot

@acs-robot a Jenkins job has been kicked to build UI QA env. I'll keep you posted as I make progress.

blueorangutan avatar Jun 23 '22 14:06 blueorangutan

UI build: :heavy_multiplication_x: (SL-JID-1826)

blueorangutan avatar Jun 23 '22 14:06 blueorangutan

Found UI changes, kicking a new UI QA build @blueorangutan ui

acs-robot avatar Jun 23 '22 14:06 acs-robot

@acs-robot a Jenkins job has been kicked to build UI QA env. I'll keep you posted as I make progress.

blueorangutan avatar Jun 23 '22 14:06 blueorangutan

UI build: :heavy_check_mark: Live QA URL: http://qa.cloudstack.cloud:8080/client/pr/6401 (SL-JID-1827)

blueorangutan avatar Jun 23 '22 14:06 blueorangutan

This pull request has merge conflicts. Dear author, please fix the conflicts and sync your branch with the base branch.

github-actions[bot] avatar Jun 23 '22 15:06 github-actions[bot]

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

sonarqubecloud[bot] avatar Jun 23 '22 15:06 sonarqubecloud[bot]

This pull request has merge conflicts. Dear author, please fix the conflicts and sync your branch with the base branch.

github-actions[bot] avatar Jun 28 '22 13:06 github-actions[bot]

@joseflauzino can you fix the conflicts.

Asking @Pearl1594 @vladimirpetrov @borisstoyanov - if we can have a round of review/testing this PR. Thanks. cc @shwstppr

rohityadavcloud avatar Jun 29 '22 07:06 rohityadavcloud