Skip to main content

Report snapshots older than X days in vROps

There are several ways to reporting snapshots. You can use PowerCLI, VRTools, or even vSphere Client itself. Today I will show you how to reporting by vRealize Operations Manager (vROps) 6.x. The benefit of  vROps reports is you can schedule it by sending email with PDF & CSV reports. I found a post discuss how to reports by vROps. But it requests modify policy, it may impacts global calculation. What if your teams request different criteria for reports?

I noticed there is a bug in following view after finishing it. If you reporting snapshots older than X days but you delete the  snapshot  within X days and  create a new one, VM will still show up in view! But I think it still valuable to publish this article since it's a way to custom report in vROps.

Every report needs to associate with a view. So first step is create view. Login by admin account. Go to Views -> create a new view -> give name and description -> select List in Presentation step -> select Virtual Machine in Subjects step.

Data section is tricky. Select Snapshot Space (GB) under Disk Space metric -> Select Last in Transformation drop-list in Data tab -> Select Advanced in Time Settings -> Set Relative Start Date to Previous 4 Days and Relative End Date to Previous 3 Days -> Go to Filter tab -> Select Metrics in first drop-list, select metric Space|Snapshot|Virtual Machine Used (GB) in secondary drop-list, select is greater than in third drop-list, and set value to 0 in forth filed.

[caption id="attachment_919" align="aligncenter" width="300"]Select Last in Transformation drop-list in Data tab Select Last in Transformation drop-list in Data tab[/caption]

[caption id="attachment_920" align="aligncenter" width="300"]Set Relative Start Date to Previous 4 Days and Relative End Date to Previous 3 Days Set Relative Start Date to Previous 4 Days and Relative End Date to Previous 3 Days[/caption]

[caption id="attachment_921" align="aligncenter" width="300"]Select metric Virtual Machine Used (GB) in Snapshot node of Disk Space collection Select metric Virtual Machine Used (GB) in Snapshot node of Disk Space collection[/caption]

Transformation of metric Snapshot Space (GB) was set to last so it only shows last value in the selected time range. If value is 0 means no snapshot during the period. And time range was set to between previous 4 days to 3 days in steps above. It only shows the last value between last 4 to 3 days (It's actual  only one day). If the value is 0, we can take it as no snapshot before 3 days. If the value is greater than  0 means snapshot existing. In filter tab we filtered VMs by Snapshot | Virtual Machine Used (GB) is greater than 0. The metric value in filter tab is recent value according to my test. It filters the VMs out  that don't have snapshots.

Then just simply go next page by default settings and finish the view creation. You will be able to see a new view in the list. Next you need to create a report base upon the view. There are lot of articles in internet talk about that.

Popular posts from this blog

Connect-NsxtServer shows "Unable to connect to the remote server"

When you run Connect-NsxtServer in the PowerCLI, it may show "Unable to connect to the remote server".  Because the error message is a little bit confusing with other login issues. It's not easy to troubleshoot. The actual reason is the NSX-T uses a self-signed certificate, and the PowerCLI cannot accept the certificate automatically. The fix is super easy. You need to set the PowerCLI to ignore the invalid certificate with the following command: Set-PowerCLIConfiguration -Scope User -InvalidCertificateAction:Ignore -Confirm:$false

Setup Terraform and Ansible for Windows provisionon CentOS

Provisioning Windows machines with Terraform is easy. Configuring Windows machines with Ansible is also not complex. However, it's a little bit challenging to combine them. The following steps are some ideas about handling a Windows machine from provisioning to post configuration without modifying the winrm configuration on the guest operating system. Install required repos for yum. yum -y install yum -y install yum -y install yum -y install epel-release yum -y install yum-utils yum-config-manager --add-repo Install  Terraform . sudo yum -y install terraform Install  Ansible . sudo yum -y install ansible Install  Kerberos . yum -y install gcc python-devel krb5-devel krb5-libs krb5-workstation

How to List All Users in Terraform Cloud

Terraform has a rich API. However, the API documentation does not mention how to list all users. We can leverage the organization membership API and the PowerShell command  Invoke-RestMethod  to get a user list. 1. Create an organization token in Terraform Cloud. 2. Create the token variable ( $Token ) in PowerShell. $Token = "abcde" 3. Create the API parameters variable in PowerShell. $params = @{ Uri = "" Authentication = "Bearer" Token = $Token ContentType = "application/vnd.api+json" } Note: You need to replace ZHENGWU with your own organization name. And I used 100 at the end of the URI to retrieve the first 100 users. It can be any number.  4. Retrieve the API return and list the user's email address. $Test = Invoke-RestMethod @params $