Python Module for VMware Cloud Foundation Health Monitoring in VMware Aria Operations
Project description
Python Module for VMware Cloud Foundation Health Monitoring in VMware Aria Operations
Table of Contents
- Python Module for VMware Cloud Foundation Health Monitoring in VMware Aria Operations
Introduction
This content supports the Health Reporting and Monitoring for VMware Cloud Foundation validated solution which enables the user to monitor the operational state of your VMware Cloud Foundation environment through custom dashboards, alerts, and notifications. These custom dashboards are intended to serve as an extension to native VMware Aria Operations dashboards and dashboards that are enabled using the respective management packs.
Requirements
Platforms
- VMware Cloud Foundation 5.2
- VMware Cloud Foundation 5.1
- VMware Cloud Foundation 5.0
- VMware Cloud Foundation 4.5
Operating Systems
- Microsoft Windows Server 2019 and 2022
- VMware Photon OS 3.0 and 4.0
Python Version
Follow the Python Beginners Guide to download and install Python.
Python Libraries
Install required Python libraries by running the following commands on the host virtual machine:
pip install requests
pip install setuptools
pip install paramiko
pip install maskpass==0.3.1
PowerShell Editions and Versions
- PowerShell Core 7.2.0 or later
PowerShell Modules
- PowerShell Module for VMware Cloud Foundation Reporting - latest version
Implementation
Follow the Implementation of Health Reporting and Monitoring for VMware Cloud Foundation from Health Reporting and Monitoring for VMware Cloud Foundation
Install the Python Module in a Disconnected Environment
For disconnected environments (e.g., dark-site, air-gapped), you can save the Health Reporting and Monitoring Python module and its dependencies from the PyPI using the below instructions.
For Photon OS
-
On the target system, create a directory to save the Python modules
mkdir -p /opt/vmware/hrm-modules
-
From a system with an Internet connection, make a modules directory and create a new file
requirements.txt
inside it.mkdir -p /home/hrm-modules/ cd /home/hrm-modules/ vi requirements.txt
-
Add below content to the
requirements.txt
file and save it.requests setuptools paramiko maskpass==0.3.1
-
Create another file
module.txt
in the same location.vi module.txt
-
Add below content to the
module.txt
file and save it.vmware-cloud-foundation-health-monitoring
-
From a system with an Internet connection, save the module and its dependencies from PyPI by running the following commands in the terminal:
pip download -r module.txt pip download -r requirements.txt
-
From the system with an Internet connection, copy the module and its dependencies to a target system by running the following commands in the terminal:
scp -r /home/vcf/hrm-modules/* username@remote_host:/opt/vmware/hrm-modules/
-
On the target system, install the module and its dependencies by running the following commands in the terminal:
cd /opt/vmware/hrm-modules pip install -r requirements.txt --no-index --find-links . pip install -r module.txt --no-index --find-links . -t /opt/vmware/hrm-<sddc_manager_vm_name>
For Windows Server
-
From a system with an Internet connection, make a modules folder
F:\hrm-modules
. -
Create a new file
requirements.txt
inside the modules folder. -
Add the below content to the
requirements.txt
file and save it.requests setuptools paramiko maskpass==0.3.1
-
In the modules folder
f:\hrm-modules
, create a new filemodule.txt
-
Add below content to
module.txt
file and save it.vmware-cloud-foundation-health-monitoring
-
From a system with an Internet connection, save the module and its dependencies from PyPI by running the following commands from cmdline:
cd f:\hrm-modules pip download -r module.txt pip download -r requirements.txt
-
From the system with the Internet connection, copy the module and its dependencies to a target system by running the following commands in the PowerShell console:
Copy-Item -Path F:\hrm-modules\* -Destination '\\<destination_host>\C$\vmware\hrm-modules
-
On the target system, install the module and its dependencies by running the following commands in the terminal:
cd c:\vmware\hrm-modules pip install -r requirements.txt --no-index --find-links . pip install -r module.txt --no-index --find-links . -t c:\vmware\hrm-<sddc_manager_vm_name>
Once the Python modules are installed, continue to follow the Implementation of Health Reporting and Monitoring for VMware Cloud Foundation from Health Reporting and Monitoring for VMware Cloud Foundation
Updating the Python Module to the Latest Version
For Photon OS
-
Log in to the host virtual machine at
<host_virtual_machine_fqdn>:22
as theroot
user by using a Secure Shell (SSH) client. -
Update the Python Module for Health Reporting and Monitoring in VMware Aria Operations.
pip install vmware-cloud-foundation-health-monitoring --target=/opt/vmware/hrm-<sddc_manager_vm_name> --upgrade
-
Provide execute permissions to the files in the
hrm-<sddc_manager_vm_name>
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.
For Windows Server
-
Log in to the host virtual machine at
<host_virtual_machine_fqdn>
as theAdministrator
user by using a Remote Desktop Connection (RDC) client and open a PowerShell console. -
Start Windows Command Prompt.
-
Update the Python Module for Health Reporting and Monitoring in VMware Aria Operations.
pip install vmware-cloud-foundation-health-monitoring --target=C:\vmware\hrm-<sddc_manager_vm_name>\ --upgrade
-
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.
VMware Aria Operations Dashboards Preview
-
VCF Health Rollup
-
VCF Backup Health
-
VCF Certificate Health
-
VCF Compute Health
-
VCF Connectivity Health
-
VCF DNS Health
-
VCF Hardware Compatibility
-
VCF Networking Health
-
VCF NTP Health
-
VCF Password Health
-
VCF SDDC Manager and vCenter Services Health
-
VCF Snapshot Health
-
VCF Storage Health
-
VCF vSAN Health
-
VCF Version Health
Known Issues
-
Please make sure that your NSX-T account name is configured as mentioned in this issue.
-
The vCenter Server name needs to be updated in VMware Cloud Foundation 4.x. The filters on the VMware Aria Operations dashboards depend on the name.
To set the Product Name for the vCenter Server, follow the below steps:
- Log in to the management domain vCenter Server at
https://<management_vcenter_server_fqdn>/ui
asadministrator@vsphere.local
. - In the
VMs and templates
inventory, expand themanagement domain vCenter Server
tree and expand the management domain data center. - Select the first
management domain vCenter Server virtual machine
and selectConfigure
tab. - In the
Settings
pane selectvApp Options
. - Click the
Edit
button. TheEdit vApp Options
dialog box opens. - If vApp options are disabled, select the
Enable vApp options
check box and clickOK
. - Click the
Details
tab and enterVMware vCenter Server Appliance
as product name in theName
field.
- Log in to the management domain vCenter Server at
-
Shades of red, green, and yellow may vary on VMware Aria Operations widgets
Shades of red, green, and yellow may be different in different widgets but they represent the same thing. Ignore the shades as this is a VMware Aria Operations product limitation.
Support
This Python module is not supported by VMware Support Services.
We welcome you to use the GitHub Issues to report bugs or suggest enhancements.
In order to have a good experience with our community, we recommend that you read the contributing guidelines.
When filing an issue, please check existing open, or recently closed, issues to make sure someone else hasn't already reported the issue.
Please try to include as much information as you can. Details like these are incredibly useful:
- A reproducible test case or series of steps.
- Any modifications you've made relevant to the bug.
- Anything unusual about your environment or deployment.
License
Copyright 2023-2024 Broadcom. All Rights Reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
-
Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
-
Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file vmware_cloud_foundation_health_monitoring-2.2.0.1003.tar.gz
.
File metadata
- Download URL: vmware_cloud_foundation_health_monitoring-2.2.0.1003.tar.gz
- Upload date:
- Size: 112.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 32d527ef146639a26d8d781b7a18ced7141cc17a0d99eb686e6ea2890d0d7c70 |
|
MD5 | 426727a0fd7dd08add21c9bfde1a76ce |
|
BLAKE2b-256 | 309d4d3712e2f74098ee4333fa9b084c39fb9e0f0f7d6a5dae8660f9b3372c87 |
File details
Details for the file vmware_cloud_foundation_health_monitoring-2.2.0.1003-py3-none-any.whl
.
File metadata
- Download URL: vmware_cloud_foundation_health_monitoring-2.2.0.1003-py3-none-any.whl
- Upload date:
- Size: 109.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a4c4faacd19739d5c05b7c69e435928f8133126de43ba26c6979fdbc93a27fa3 |
|
MD5 | 38917dff1e17726980454972c3e7eee8 |
|
BLAKE2b-256 | 1ecfb127b446e85940e18ae7d3e7e972a53eebb73f598b6b121f0a7d62bb8deb |