Skip to content
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
4 changes: 2 additions & 2 deletions AsBuiltReport.NetApp.ONTAP.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@
"DisableDiagramMainLogo": false,
"DiagramTheme": "White",
"DiagramWaterMark": "",
"ExportDiagrams": false,
"ExportDiagrams": true,
"ExportDiagramsFormat": [
"png"
"pdf"
],
"EnableDiagramSignature": false,
"DiagramColumnSize": 4,
Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Bump Diagrammer.Core module requirement to v0.2.36
- Bump module version to v0.6.12
- Update github actions to use latest version
- Export diagrams by default

### Fixed

Expand All @@ -31,6 +32,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Fix model property assignment in Get-AbrOntapStorageAggrDiagram function
- Fix Volume SnapShot Configuration section showing healthcheck for non violated item
- Fix CodeQL analysis issues 27
- Fix diagram size not respecting document border size

### Removed

Expand Down
Binary file not shown.
Binary file not shown.
Binary file removed Src/Bin/Assemblies/net90/linux-x64/ScottPlot.dll
Binary file not shown.
Binary file not shown.
Binary file removed Src/Bin/Assemblies/net90/linux-x64/SkiaSharp.dll
Binary file not shown.
Binary file not shown.
Binary file removed Src/Bin/Assemblies/net90/linux-x64/libSkiaSharp.so
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed Src/Bin/Assemblies/net90/osx-arm64/ScottPlot.dll
Binary file not shown.
Binary file not shown.
Binary file removed Src/Bin/Assemblies/net90/osx-arm64/SkiaSharp.dll
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed Src/Bin/Assemblies/net90/osx-x64/HarfBuzzSharp.dll
Binary file not shown.
Binary file removed Src/Bin/Assemblies/net90/osx-x64/ScottPlot.dll
Binary file not shown.
Binary file not shown.
Binary file removed Src/Bin/Assemblies/net90/osx-x64/SkiaSharp.dll
Binary file not shown.
Binary file not shown.
Binary file removed Src/Bin/Assemblies/net90/osx-x64/libSkiaSharp.dylib
Binary file not shown.
Binary file not shown.
Binary file removed Src/Bin/Assemblies/net90/win-x64/HarfBuzzSharp.dll
Binary file not shown.
Binary file removed Src/Bin/Assemblies/net90/win-x64/ScottPlot.dll
Binary file not shown.
Binary file not shown.
Binary file removed Src/Bin/Assemblies/net90/win-x64/SkiaSharp.dll
Binary file not shown.
Binary file not shown.
Binary file removed Src/Bin/Assemblies/net90/win-x64/libSkiaSharp.dll
Binary file not shown.
5 changes: 2 additions & 3 deletions Src/Private/Export-AbrOntapDiagram.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -122,10 +122,9 @@ function Export-AbrOntapDiagram {
$Graph = $DiagramObject
$Diagram = New-Diagrammer @DiagramParams -InputObject $Graph
if ($Diagram) {
if ((Get-DiaImagePercent -GraphObj $Diagram).Width -gt 600) { $ImagePrty = 40 } else { $ImagePrty = 30 }
$BestAspectRatio = Get-DiaBestImageAspectRatio -GraphObj $Diagram -MaxWidth 600
Section -Style Heading2 $MainDiagramLabel {
Image -Base64 $Diagram -Text 'NetApp Ontap Diagram' -Percent $ImagePrty -Align Center
Paragraph 'Image preview: Opens the image in a new tab to view it at full resolution.' -Tabs 2
Image -Base64 $Diagram -Text 'NetApp Ontap Diagram' -Width $BestAspectRatio.Width -Height $BestAspectRatio.Height -Align Center
}
}
} catch {
Expand Down
71 changes: 51 additions & 20 deletions Src/Private/Get-AbrOntapClusterASUP.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -35,35 +35,66 @@ function Get-AbrOntapClusterASUP {
'Enabled' = $NodesAUTO.IsEnabled
'Last Time Stamp' = $NodesAUTO.LastTimestampDT
'Last Subject' = $NodesAUTO.LastSubject
'Ondemand Server URL' = $NodesAUTO.OndemandServerUrl
'Validate Digital Certificate' = $NodesAUTO.ValidateDigitalCertificate
'Ondemand Remote Diagnostic Enabled' = $NodesAUTO.IsOndemandRemoteDiagEnabled
'Performance Data Enabled' = $NodesAUTO.IsPerfDataEnabled
'Private Data Removed' = $NodesAUTO.IsPrivateDataRemoved
'Support Enabled' = $NodesAUTO.IsSupportEnabled
}
$Outobj = [pscustomobject](ConvertTo-HashToYN $inObj)
$Outobj += [pscustomobject](ConvertTo-HashToYN $inObj)

if ($Healthcheck.Cluster.AutoSupport) {
$Outobj | Where-Object { $_.'Enabled' -like 'No' } | Set-Style -Style Warning -Property 'Enabled'
}

$TableParams = @{
Name = "Cluster AutoSupport Status - $($NodesAUTO.NodeName)"
List = $true
ColumnWidths = 25, 75
}
if ($Report.ShowTableCaptions) {
$TableParams['Caption'] = "- $($TableParams.Name)"
}
$Outobj | Table @TableParams
if ($Healthcheck.Cluster.AutoSupport -and ($Outobj | Where-Object { $_.'Enabled' -like 'No' })) {
Paragraph 'Health Check:' -Bold -Underline
BlankLine
Paragraph {
Text 'Best Practice:' -Bold
Text 'AutoSupport is disabled on one or more nodes. It is recommended to enable AutoSupport to ensure proactive monitoring and issue resolution.'
}
BlankLine
}
} catch {
Write-PScriboMessage -IsWarning $_.Exception.Message
}
}
if ($InfoLevel.Storage -ge 2) {
foreach ($NodesAUTO in $Outobj) {
Section -Style NOTOCHeading4 -ExcludeFromTOC "$($NodesAUTO.'Node Name')" {
$TableParams = @{
Name = "Cluster AutoSupport Status - $($NodesAUTO.'Node Name')"
List = $true
ColumnWidths = 40, 60
}
if ($Report.ShowTableCaptions) {
$TableParams['Caption'] = "- $($TableParams.Name)"
}
$NodesAUTO | Table @TableParams
if ($Healthcheck.Cluster.AutoSupport -and ($NodesAUTO | Where-Object { $_.'Enabled' -like 'No' })) {
Paragraph 'Health Check:' -Bold -Underline
BlankLine
Paragraph {
Text 'Best Practice:' -Bold
Text 'AutoSupport is disabled on one or more nodes. It is recommended to enable AutoSupport to ensure proactive monitoring and issue resolution.'
}
BlankLine
}
}
}
} else {
$TableParams = @{
Name = "Cluster AutoSupport Status - $($ClusterInfo.ClusterName)"
List = $false
Columns = 'Node Name', 'Protocol', 'Enabled'
ColumnWidths = 40, 30, 30
}
if ($Report.ShowTableCaptions) {
$TableParams['Caption'] = "- $($TableParams.Name)"
}
$Outobj | Table @TableParams
if ($Healthcheck.Cluster.AutoSupport -and ($Outobj | Where-Object { $_.'Enabled' -like 'No' })) {
Paragraph 'Health Check:' -Bold -Underline
BlankLine
Paragraph {
Text 'Best Practice:' -Bold
Text 'AutoSupport is disabled on one or more nodes. It is recommended to enable AutoSupport to ensure proactive monitoring and issue resolution.'
}
BlankLine
}
}
}
} catch {
Write-PScriboMessage -IsWarning $_.Exception.Message
Expand Down
125 changes: 97 additions & 28 deletions Src/Private/Get-AbrOntapClusterHA.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -32,55 +32,124 @@ function Get-AbrOntapClusterHA {
$ClusterHa = Get-NcClusterHa -Node $Nodes.Node -Controller $Array
$inObj = [ordered] @{
'Name' = $Nodes.Node
'NVRAM ID' = $Nodes.NodeNvramId
'Local Mailbox Disks' = ($ClusterHa.LocalMailboxDisks | ForEach-Object { $_.Name }) -join ', '
'Partner' = $ClusterHa.Partner ?? '--'
'Partner NVRAM ID' = $ClusterHa.PartnerNvramId
'Partner Mailbox Disks' = ($ClusterHa.PartnerMailboxDisks | ForEach-Object { $_.Name }) -join ', '
'TakeOver Possible' = $ClusterHa.TakeoverPossible
'TakeOver By Partner Possible' = $ClusterHa.TakeoverByPartnerPossible
'TakeOver State' = $ClusterHa.TakeoverState ?? '--'
'HA Mode' = $ClusterHa.CurrentMode
'HA Type' = $ClusterHa.HaType
'HA State' = $ClusterHa.State
'Interconnect Type' = $ClusterHa.InterconnectType
'Interconnect Links' = $ClusterHa.InterconnectLinks
'Is Enabled' = $ClusterHa.IsEnabled
}
$OutObj += [pscustomobject](ConvertTo-HashToYN $inObj)
} catch {
Write-PScriboMessage -IsWarning $_.Exception.Message
}
}

if ($Healthcheck.Cluster.HA) {
$OutObj | Where-Object { $_.'TakeOver State' -like 'in_takeover' } | Set-Style -Style Warning -Property 'TakeOver State'
$OutObj | Where-Object { $_.'HA Mode' -ne 'non_ha' -and $_.'HA State' -notlike 'connected' } | Set-Style -Style Warning -Property 'HA State'
$OutObj | Where-Object { $_.'TakeOver Possible' -eq 'No' -and $_.'HA Mode' -ne 'non_ha' } | Set-Style -Style Warning -Property 'TakeOver Possible'
}
$OutObj | Where-Object { $_.'TakeOver By Partner Possible' -eq 'No' -and $_.'HA Mode' -ne 'non_ha' } | Set-Style -Style Warning -Property 'TakeOver By Partner Possible'
$OutObj | Where-Object { $_.'Is Enabled' -eq 'No' -and $_.'HA Mode' -ne 'non_ha' } | Set-Style -Style Warning -Property 'Is Enabled'

$TableParams = @{
Name = "Cluster HA Status - $($ClusterInfo.ClusterName)"
List = $false
ColumnWidths = 20, 20, 11, 19, 10, 20
}
if ($Report.ShowTableCaptions) {
$TableParams['Caption'] = "- $($TableParams.Name)"
}
$OutObj | Table @TableParams
if ($Healthcheck.Cluster.HA -and (($OutObj | Where-Object { $_.'TakeOver State' -like 'in_takeover' } ) -or ($OutObj | Where-Object { $_.'HA Mode' -ne 'non_ha' -and $_.'HA State' -notlike 'connected' }) -or ($OutObj | Where-Object { $_.'TakeOver Possible' -eq 'No' -and $_.'HA Mode' -ne 'non_ha' }))) {
Paragraph 'Health Check:' -Bold -Underline
BlankLine
if ($OutObj | Where-Object { $_.'TakeOver State' -like 'in_takeover' }) {
Paragraph {
Text 'Best Practice:' -Bold
Text 'One or more nodes are currently in takeover state. It is recommended to investigate the cause of the takeover and ensure that the affected node is restored to normal operation as soon as possible.'

if ($InfoLevel.Cluster -ge 2) {
foreach ($NodeHa in $OutObj) {
Section -Style NOTOCHeading4 -ExcludeFromTOC "$($NodeHa.Name)" {
$TableParams = @{
Name = "Cluster HA Status - $($NodeHa.Name)"
List = $true
ColumnWidths = 40, 60
}
if ($Report.ShowTableCaptions) {
$TableParams['Caption'] = "- $($TableParams.Name)"
}
$NodeHa | Table @TableParams
if ($Healthcheck.Cluster.HA -and (($NodeHa | Where-Object { $_.'TakeOver State' -like 'in_takeover' } ) -or ($NodeHa | Where-Object { $_.'HA Mode' -ne 'non_ha' -and $_.'HA State' -notlike 'connected' }) -or ($NodeHa | Where-Object { $_.'TakeOver Possible' -eq 'No' -and $_.'HA Mode' -ne 'non_ha' }))) {
Paragraph 'Health Check:' -Bold -Underline
BlankLine
if ($NodeHa | Where-Object { $_.'TakeOver State' -like 'in_takeover' }) {
Paragraph {
Text 'Best Practice:' -Bold
Text 'One or more nodes are currently in takeover state. It is recommended to investigate the cause of the takeover and ensure that the affected node is restored to normal operation as soon as possible.'
}
BlankLine
}
if ($NodeHa | Where-Object { $_.'TakeOver Possible' -eq 'No' }) {
Paragraph {
Text 'Best Practice:' -Bold
Text 'One or more nodes have takeover capability disabled. It is recommended to enable storage failover capability to ensure high availability in case of node failures.'
}
BlankLine
}
if ($NodeHa | Where-Object { $_.'HA Mode' -ne 'non_ha' -and $_.'HA State' -notlike 'connected' }) {
Paragraph {
Text 'Best Practice:' -Bold
Text 'One or more nodes are operating in HA mode and are not connected. It is recommended to verify the HA configuration and connectivity to ensure high availability is properly set up.'
}
BlankLine
}
if ($NodeHa | Where-Object { $_.'Is Enabled' -eq 'No' -and $_.'HA Mode' -ne 'non_ha' }) {
Paragraph {
Text 'Best Practice:' -Bold
Text 'One or more nodes have HA disabled while operating in HA mode. It is recommended to enable HA to ensure redundancy and high availability.'
}
BlankLine
}
}
}
BlankLine
}
if ($OutObj | Where-Object { $_.'TakeOver Possible' -eq 'No' }) {
Paragraph {
Text 'Best Practice:' -Bold
Text 'One or more nodes have takeover capability disabled. It is recommended to enable storage failover capability to ensure high availability in case of node failures.'
}
BlankLine
} else {
$TableParams = @{
Name = "Cluster AutoSupport Status - $($ClusterInfo.ClusterName)"
List = $false
Columns = 'Name', 'Partner', 'TakeOver Possible', 'TakeOver State', 'HA Mode', 'HA State'
ColumnWidths = 20, 20, 11, 19, 10, 20
}
if ($OutObj | Where-Object { $_.'HA Mode' -ne 'non_ha' -and $_.'HA State' -notlike 'connected' }) {
Paragraph {
Text 'Best Practice:' -Bold
Text 'One or more nodes are operating in HA mode and are not connected. It is recommended to verify the HA configuration and connectivity to ensure high availability is properly set up.'
}
if ($Report.ShowTableCaptions) {
$TableParams['Caption'] = "- $($TableParams.Name)"
}
$Outobj | Table @TableParams
if ($Healthcheck.Cluster.HA -and (($Outobj | Where-Object { $_.'TakeOver State' -like 'in_takeover' } ) -or ($Outobj | Where-Object { $_.'HA Mode' -ne 'non_ha' -and $_.'HA State' -notlike 'connected' }) -or ($Outobj | Where-Object { $_.'TakeOver Possible' -eq 'No' -and $_.'HA Mode' -ne 'non_ha' }))) {
Paragraph 'Health Check:' -Bold -Underline
BlankLine
if ($Outobj | Where-Object { $_.'TakeOver State' -like 'in_takeover' }) {
Paragraph {
Text 'Best Practice:' -Bold
Text 'One or more nodes are currently in takeover state. It is recommended to investigate the cause of the takeover and ensure that the affected node is restored to normal operation as soon as possible.'
}
BlankLine
}
if ($Outobj | Where-Object { $_.'TakeOver Possible' -eq 'No' }) {
Paragraph {
Text 'Best Practice:' -Bold
Text 'One or more nodes have takeover capability disabled. It is recommended to enable storage failover capability to ensure high availability in case of node failures.'
}
BlankLine
}
if ($Outobj | Where-Object { $_.'HA Mode' -ne 'non_ha' -and $_.'HA State' -notlike 'connected' }) {
Paragraph {
Text 'Best Practice:' -Bold
Text 'One or more nodes are operating in HA mode and are not connected. It is recommended to verify the HA configuration and connectivity to ensure high availability is properly set up.'
}
BlankLine
}
if ($Outobj | Where-Object { $_.'Is Enabled' -eq 'No' -and $_.'HA Mode' -ne 'non_ha' }) {
Paragraph {
Text 'Best Practice:' -Bold
Text 'One or more nodes have HA disabled while operating in HA mode. It is recommended to enable HA to ensure redundancy and high availability.'
}
BlankLine
}
}
}
}
Expand Down
Loading