Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add vsan cluster health checks #124

Merged
merged 2 commits into from
Apr 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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