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

  1. Log in to the host virtual machine.

    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.
    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.
  2. Start PowerShell.

  3. 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
  4. 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 
  5. 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
  1. Log in to the host virtual machine at <host_virtual_machine_fqdn>:22 as the admin user by using a Secure Shell (SSH) client.

  2. 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>
  3. Provide execute permissions to the files in the hrm directory.
    chmod -R 755 /opt/vmware/hrm-<sddc_manager_vm_name>
  4. Switch to the hrm-<sddc_manager_vm_name>/main directory.
    cd /opt/vmware/hrm-<sddc_manager_vm_name>/main
  5. Edit the env.json file and configure the values according to your VMware Cloud Foundation Planning and Preparation Workbook.
    vi env.json
  6. Encrypt the service account passwords.
    python encrypt-passwords.py
  7. Enter the password for the VMware Aria Operations service account.
  8. Enter the password for the SDDC Manager service account.
  9. Enter the password for the SDDC Manager appliance local user.
  10. Repeat this procedure for each VMware Cloud Foundation instance.

Windows Server
  1. 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.

  2. Start Windows Command Prompt.
  3. 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>\
  4. Change to the hrm-<sddc_manager_vm_name>\main folder.
    cd c:\vmware\hrm-<sddc_manager_vm_name>\main
  5. Edit the env.json file and configure the values according to your VMware Cloud Foundation Planning and Preparation Workbook.
    notepad env.json
  6. Encrypt the service account passwords.
    python encrypt-passwords.py
  7. Enter the password for the VMware Aria Operations service account.
  8. Enter the password for the SDDC Manager service account.
  9. Enter the password for the SDDC Manager appliance local user.
  10. 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
  1. Log in to the host virtual machine at <host_virtual_machine_fqdn>:22 as the admin user by using a Secure Shell (SSH) client.

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

  3. 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
  4. Navigate to the Python language bindings package directory you previously created.
    cd /opt/vmware/vrops-python
  5. Install the Python language bindings package.
    python setup.py install
Windows Server
  1. Log in to the host virtual machine at <host_virtual_machine_fqdn> as the Administrator user by using a Remote Desktop Connection (RDC) client.

  2. Start PowerShell.

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

  4. 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
  5. Navigate to the Python language bindings package directory you previously created.
    cd C:\vmware\vrops-python
  6. 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
  1. Log in to the host virtual machine at <host_virtual_machine_fqdn>:22 as the admin user by using a Secure Shell (SSH) client.

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

  3. Verify that health data and metrics are sent to VMware Aria Operations.
    1. Log in to the VMware Aria Operations interface at https://<aria_operations_fqdn> with a user assigned the Administrator role.
    2. In the left pane, navigate to Inventory.
    3. On the Inventory page, click Detailed view.
    4. Click the Integrations tab and, from the drop-down menu, select All objects.
    5. In the inventory pane, navigate to vCenter > Virtual machine
    6. In the Object browser pane, navigate to All objects > vCenter > Virtual machine and select the Management Domain vCenter Server appliance.
    7. Click the Metrics tab.
    8. Expand the Metrics section and verify that there are 5 metrics whith names beginning with HRM and 11 metrics with names beginning with SOS.
  4. Repeat this procedure for each VMware Cloud Foundation instance.
Windows Servver
  1. 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.

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

  3. Verify that health data and metrics are sent to VMware Aria Operations.
    1. Log in to the VMware Aria Operations interface at https://<aria_operations_fqdn> with a user assigned the Administrator role.
    2. In the left pane, navigate to Environment > Object browser.
    3. In the Object browser pane, navigate to All objects > vCenter > Virtual machine and select the Management Domain vCenter Server appliance.
    4. Click the Metrics tab.
    5. Expand the Metrics section and verify that there are 5 metrics whith names beginning with HRM and 10 metrics with names beginning with SOS.
  4. 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
  1. Log in to the host virtual machine at <host_virtual_machine_fqdn>:22 as the admin user by using a Secure Shell (SSH) client.
  2. Edit the cron tab.
    crontab -e
  3. 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
  4. Verify the cron job configuration by running the following command:
    crontab -l
  5. Repeat this procedure for each VMware Cloud Foundation instance.
Windows Servver
  1. Log in to the host virtual machine at <host_virtual_machine_fqdn> as Administrator by using Remote Desktop Connection (RDC) client.
  2. Click Start, enter task and select Task scheduler.
  3. In the Task scheduler window, from the Action drop-down menu, select Create basic task.
  4. On the Create a basic task page, configure the values according to your VMware Cloud Foundation Planning and Preparation Workbook and click Next.
  5. On the Task trigger page, select Daily and click Next.
  6. On the Daily page, configure the start time and recurrence according to your VMware Cloud Foundation Planning and Preparation Workbook and click Next.
  7. On the Action page, select Start a program and click Next.
  8. 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.
  9. On the Summary page, click Finish.
  10. Repeat this procedure for each VMware Cloud Foundation instance.