Skip to content

Commit

Permalink
feat: add vsan cluster health checks
Browse files Browse the repository at this point in the history
- Updated Publish-VsanHealth to include the results for capacity utilization and the active resysc of objects.
- Bumps the module version to v2.0.0.1009.
- Updates CHANGELOG.md.
  • Loading branch information
GaryJBlake authored Apr 14, 2023
2 parents b106297 + a75ad00 commit a438588
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ Enhancement:
- Added `Publish-VersionHealth` to return the version health from the SoS Health Summary JSON data.
- Updated `Invoke-VcfHealthReport` to include the version health using the `Publish-VersionHealth` cmdlet.
- Added `Show-ReportingOutput` cmdlet to format output to the console when `PowerVCF` is not installed. [GH-121](https://github.com/vmware/powershell-module-for-vmware-cloud-foundation-reporting/pull/121)
- Updated `Publish-VsanHealth` to include the results for capacity utilization and the active resysc of objects.

Refactor:

Expand Down
2 changes: 1 addition & 1 deletion VMware.CloudFoundation.Reporting.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
RootModule = '.\VMware.CloudFoundation.Reporting.psm1'

# Version number of this module.
ModuleVersion = '2.0.0.1008'
ModuleVersion = '2.0.0.1009'

# Supported PSEditions
# CompatiblePSEditions = @()
Expand Down
20 changes: 19 additions & 1 deletion VMware.CloudFoundation.Reporting.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -2076,7 +2076,7 @@ Function Publish-VsanHealth {
Write-Warning 'vSAN data not found in the JSON file: SKIPPED'
} else {

# vSAN Cluster Health Status
# Cluster Health Status
$jsonInputData = $targetContent.vSAN.'Cluster vSAN Status' # Extract Data from the provided SOS JSON
if ($PsBoundParameters.ContainsKey("failureOnly")) {
$outputObject = Read-JsonElement -inputData $jsonInputData -failureOnly # Call Function to Structure the Data for Report Output
Expand All @@ -2094,6 +2094,24 @@ Function Publish-VsanHealth {
}
$customObject += $outputObject # Adding individual component to main customObject

# Cluster Capacity Utilization
$jsonInputData = $targetContent.vSAN.'vSAN Capacity Utilization' # Extract Data from the provided SOS JSON
if ($PsBoundParameters.ContainsKey("failureOnly")) {
$outputObject = Read-JsonElement -inputData $jsonInputData -failureOnly # Call Function to Structure the Data for Report Output
} else {
$outputObject = Read-JsonElement -inputData $jsonInputData # Call Function to Structure the Data for Report Output
}
$customObject += $outputObject # Adding individual component to main customObject

# Cluster Active ReSync Objects
$jsonInputData = $targetContent.vSAN.'Active ReSync Objects' # Extract Data from the provided SOS JSON
if ($PsBoundParameters.ContainsKey("failureOnly")) {
$outputObject = Read-JsonElement -inputData $jsonInputData -failureOnly # Call Function to Structure the Data for Report Output
} else {
$outputObject = Read-JsonElement -inputData $jsonInputData # Call Function to Structure the Data for Report Output
}
$customObject += $outputObject # Adding individual component to main customObject

# Cluster Data Compression Status
$jsonInputData = $targetContent.vSAN.'Cluster Data Compression Status' # Extract Data from the provided SOS JSON
if ($PsBoundParameters.ContainsKey("failureOnly")) {
Expand Down

0 comments on commit a438588

Please sign in to comment.