To enable health reporting and monitoring of your VMware Cloud Foundation instance, you install and configure the PowerShell Module for VMware Cloud Foundation Reporting and the Python Module for VMware Cloud Foundation Health Monitoring in VMware Aria Operations on the host virtual machine.
Install the PowerShell Module for VMware Cloud Foundation Reporting
You install the PowerShell Module for VMware Cloud Foundation Reporting together with supporting PowerShell modules from the PowerShell gallery on the host virtual machine.
Procedure
-
Log in to the host virtual machine.
-
Start PowerShell.
-
Install the PowerShell module and its dependencies from the PowerShell Gallery by running the commands in the console.
Set-PSRepository -Name PSGallery -InstallationPolicy Trusted Install-Module -Name VMware.PowerCLI -MinimumVersion 13.2.1 Install-Module -Name VMware.vSphere.SsoAdmin -MinimumVersion 1.3.9 Install-Module -Name PowerVCF -MinimumVersion 2.4.1 Install-Module -Name PowerValidatedSolutions -MinimumVersion 2.11.0 Install-Module -Name VMware.CloudFoundation.Reporting -MinimumVersion 2.6.3
-
Import the modules by running the commands in the console.
Set-PowerCLIConfiguration -Scope AllUsers -ParticipateInCEIP $false -Confirm:$false Import-Module -Name VMware.PowerCLI Import-Module -Name VMware.vSphere.SsoAdmin Import-Module -Name PowerVCF Import-Module -Name PowerValidatedSolutions Import-Module -Name VMware.CloudFoundation.Reporting
-
Verify the modules are installed correctly by running the command in the console.
Test-VcfReportingPrereq
Install and Configure the Python Module for VMware Cloud Foundation Health Monitoring in VMware Aria Operations
Upload the Python Module for VMware Cloud Foundation Health Monitoring in VMware Aria Operations to the host virtual machine and configure the necessary settings to enable health data collection and the integration with VMware Aria Operations.
Procedure
- Photon OS
-
Log in to the host virtual machine at <host_virtual_machine_fqdn>:22 as the admin user by using a Secure Shell (SSH) client.
- Install the Python Module for VMware Cloud Foundation Health Monitoring in VMware Aria Operations.
pip install vmware-cloud-foundation-health-monitoring --target=/opt/vmware/hrm-<sddc_manager_vm_name>
- Provide execute permissions to the files in the hrm directory.
chmod -R 755 /opt/vmware/hrm-<sddc_manager_vm_name>
- Switch to the
hrm-<sddc_manager_vm_name>/main
directory.cd /opt/vmware/hrm-<sddc_manager_vm_name>/main
Edit the env.json file and configure the values according to your VMware Cloud Foundation Planning and Preparation Workbook.
vi env.json
- Encrypt the service account passwords.
python encrypt-passwords.py
- Enter the password for the VMware Aria Operations service account.
- Enter the password for the SDDC Manager service account.
- Enter the password for the SDDC Manager appliance local user.
Repeat this procedure for each VMware Cloud Foundation instance.
- Windows Server
-
Log in to the host virtual machine at <host_virtual_machine_fqdn> as the Administrator user by using a Remote Desktop Connection (RDC) client and open a PowerShell console.
- Start Windows Command Prompt.
- Install the Python Module for VMware Cloud Foundation Health Monitoring in VMware Aria Operations.
pip install vmware-cloud-foundation-health-monitoring --target=C:\vmware\hrm-<sddc_manager_vm_name>\
- Change to the hrm-<sddc_manager_vm_name>\main folder.
cd c:\vmware\hrm-<sddc_manager_vm_name>\main
Edit the env.json file and configure the values according to your VMware Cloud Foundation Planning and Preparation Workbook.
notepad env.json
- Encrypt the service account passwords.
python encrypt-passwords.py
- Enter the password for the VMware Aria Operations service account.
- Enter the password for the SDDC Manager service account.
- Enter the password for the SDDC Manager appliance local user.
Repeat this procedure for each VMware Cloud Foundation instance.
Install the VMware Aria Operations Nagini Client for Health Reporting and Monitoring for VMware Cloud Foundation
The VMware Aria Operations Nagini client is a Python wrapper for Rest API calls to VMware Aria Operations. You install the VMware Aria Operations Nagini client on the host virtual machine to enable the integration between the Python Module for VMware Cloud Foundation Health Monitoring and VMware Aria Operations.
Procedure
- Photon OS
-
-
Log in to the host virtual machine at <host_virtual_machine_fqdn>:22 as the admin user by using a Secure Shell (SSH) client.
-
Download the Python language bindings package for VMware Aria Operations.
wget https://<aria_operations_fqdn>/suite-api/docs/bindings/python/vcops-python.zip --output-document=/opt/vmware/vcops-python.zip
Note:If your host virtual machine does not trust the Certificate Authority chain, run the above command with
--no-check-certificate
option. - Unzip the Python language bindings package zip file.
unzip /opt/vmware/vcops-python.zip -d /opt/vmware/vrops-python rm /opt/vmware/vcops-python.zip
- Navigate to the Python language bindings package directory you previously created.
cd /opt/vmware/vrops-python
- Install the Python language bindings package.
python setup.py install
-
- Windows Server
-
-
Log in to the host virtual machine at <host_virtual_machine_fqdn> as the Administrator user by using a Remote Desktop Connection (RDC) client.
-
Start PowerShell.
-
Download the Python language bindings package for VMware Aria Operations.
Invoke-WebRequest -Uri https://<aria_operations_fqdn>/suite-api/docs/bindings/python/vcops-python.zip -OutFile C:\vmware\vcops-python.zip
Note:If your host virtual machine does not trust the Certificate Authority chain, run the above command with
-skipCertificateCheck
option. -
Unzip the Python language bindings package zip file.
Expand-Archive C:\vmware\vcops-python.zip -DestinationPath C:\vmware\vrops-python Remove-Item -Path c:\vmware\vcops-python.zip
- Navigate to the Python language bindings package directory you previously created.
cd C:\vmware\vrops-python
- Install the Python language bindings package.
python setup.py install
-
Manually Run the Python Module for VMware Cloud Foundation Health Monitoring in VMware Aria Operations
Manually run the script to verify that health data from the SDDC management components is received and successfully sent to VMware Aria Operations.
Procedure
- Photon OS
-
-
Log in to the host virtual machine at <host_virtual_machine_fqdn>:22 as the admin user by using a Secure Shell (SSH) client.
- Run the send-data-to-vrops.py script for each VMware Cloud Foundation instance.
python /opt/vmware/hrm-<sddc_manager_vm_name>/main/send-data-to-vrops.py
Note:On a large environment (250 ESXi hosts, 10000 virtual machines) the script may take up to one and a half hours to complete.
While script is running the health check tasks will appear in SDDC Manager, this is normal and expected.
When the script completes, it generates .json report files and logs in the DEFAULT_LOGS_DIR_PATH directory, set in your env.json file.
- Verify that health data and metrics are sent to VMware Aria Operations.
- Log in to the VMware Aria Operations interface at https://<aria_operations_fqdn> with a user assigned the Administrator role.
- In the left pane, navigate to Inventory.
- On the Inventory page, click Detailed view.
- Click the Integrations tab and, from the drop-down menu, select All objects.
- In the inventory pane, navigate to
- In the Object browser pane, navigate to and select the Management Domain vCenter Server appliance.
- Click the Metrics tab.
- Expand the Metrics section and verify that there are 5 metrics whith names beginning with HRM and 11 metrics with names beginning with SOS.
- Repeat this procedure for each VMware Cloud Foundation instance.
-
- Windows Servver
-
-
Log in to the host virtual machine at <host_virtual_machine_fqdn> as the Administrator user by using a Remote Desktop Connection (RDC) client and open a PowerShell console.
- Run the send-data-to-vrops.py script for each VMware Cloud Foundation instance.
python C:\vmware\hrm-<sddc_manager_vm_name>\main\send-data-to-vrops.py
Note:On a large environment (250 ESXi hosts, 10000 virtual machines) the script may take up to one and a half hours to complete.
While script is running the health check tasks will appear in SDDC Manager, this is normal and expected.
When the script completes, it generates .json report files and logs in the DEFAULT_LOGS_DIR_PATH directory, set in your env.json file.
- Verify that health data and metrics are sent to VMware Aria Operations.
- Log in to the VMware Aria Operations interface at https://<aria_operations_fqdn> with a user assigned the Administrator role.
- In the left pane, navigate to .
- In the Object browser pane, navigate to and select the Management Domain vCenter Server appliance.
- Click the Metrics tab.
- Expand the Metrics section and verify that there are 5 metrics whith names beginning with HRM and 10 metrics with names beginning with SOS.
- Repeat this procedure for each VMware Cloud Foundation instance.
-
Schedule the Python Module for VMware Cloud Foundation Health Reporting in VMware Aria Operations to Run Daily
Automate sending health data to VMware Aria Operations by scheduling the Python module to run daily.
Procedure
- Photon OS
-
- Log in to the host virtual machine at <host_virtual_machine_fqdn>:22 as the admin user by using a Secure Shell (SSH) client.
- Edit the cron tab.
crontab -e
- Add the following to the file.
59 23 * * * /opt/vmware/env/bin/python /opt/vmware/hrm-<sddc_manager_vm_name>/main/send-data-to-vrops.py > /dev/null 2>&1
- Verify the cron job configuration by running the following command:
crontab -l
- Repeat this procedure for each VMware Cloud Foundation instance.
- Windows Servver
-
- Log in to the host virtual machine at <host_virtual_machine_fqdn> as Administrator by using Remote Desktop Connection (RDC) client.
- Click Start, enter task and select Task scheduler.
- In the Task scheduler window, from the Action drop-down menu, select Create basic task.
On the Create a basic task page, configure the values according to your VMware Cloud Foundation Planning and Preparation Workbook and click Next.
- On the Task trigger page, select Daily and click Next.
On the Daily page, configure the start time and recurrence according to your VMware Cloud Foundation Planning and Preparation Workbook and click Next.
- On the Action page, select Start a program and click Next.
-
On the Start a program page, click Browse, navigate to the c:\vmware\hrm-<sddc_manager_vm_name>\examples\run_send-data-to-vrops.bat file in the Python module directory, click Open and click Next.
- On the Summary page, click Finish.
- Repeat this procedure for each VMware Cloud Foundation instance.