diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index e1dbad6..3f528ae 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -1,9 +1,20 @@ name: Bug Report description: File a bug report +title: "[Bug]: " labels: ["bug"] assignees: - rebelinux body: + - type: markdown + attributes: + value: | + Thanks for taking the time to fill out this bug report :) + - Kindly **DO NOT** ask for instructions. + - Use [Discussions](https://github.com/orgs/AsBuiltReport/discussions) section if you have a query or doubts or any other relevant question. + - You may join [Slack community](https://the-code-community.slack.com#asbuiltreport) to interact with fellow contributors and users + - Read project's [Web Site](https://www.asbuiltreport.com/user-guide/installation/) for detailed documentation. + - Read project's [FAQs](https://www.asbuiltreport.com/support/faq/) section for Frequently asked questions. + - Search for previous [Issues](https://github.com/AsBuiltReport/AsBuiltReport.Veeam.VBR/issues)/[Pull Requests](https://github.com/AsBuiltReport/AsBuiltReport.Veeam.VBR/pulls) if this issue is already reported or fix has been created. - type: dropdown id: vbrversion attributes: @@ -101,10 +112,3 @@ body: - label: >- I have read and followed the [bug reporting guidelines](https://www.asbuiltreport.com/about/contributing/#reporting-issues-and-bugs). required: true - - label: >- - I have read [the documentation](https://www.asbuiltreport.com/user-guide/new-asbuiltconfig), - and referred to the [known issues](https://www.asbuiltreport.com/user-guide/known-issues/) before submitting this bug report. - required: true - - label: >- - I have checked for previously opened & closed [issues](https://github.com/AsBuiltReport/AsBuiltReport.Veeam.VBR/issues) before submitting this bug report. - required: true diff --git a/.github/ISSUE_TEMPLATE/change_request.yml b/.github/ISSUE_TEMPLATE/change_request.yml index 63c0d51..5def392 100644 --- a/.github/ISSUE_TEMPLATE/change_request.yml +++ b/.github/ISSUE_TEMPLATE/change_request.yml @@ -1,9 +1,20 @@ name: Change Request description: Request a new change or an improvement +title: "[Change Request]: " labels: ["change request"] assignees: - rebelinux body: + - type: markdown + attributes: + value: | + Thanks for taking the time to fill out this enahancement form :) + - Kindly **DO NOT** ask for instructions. + - Use [Discussions](https://github.com/orgs/AsBuiltReport/discussions) section if you have a query or doubts or any other relevant question. + - You may join [Slack community](https://the-code-community.slack.com#asbuiltreport) to interact with fellow contributors and users + - Read project's [Web Site](https://www.asbuiltreport.com/user-guide/installation/) for detailed documentation. + - Read project's [FAQs](https://www.asbuiltreport.com/support/faq/) section for Frequently asked questions. + - Search for previous [Issues](https://github.com/AsBuiltReport/AsBuiltReport.NetApp.ONTAP/issues)/[Pull Requests](https://github.com/AsBuiltReport/AsBuiltReport.NetApp.ONTAP/pulls) if this issue is already reported or fix has been created. - type: dropdown id: vbrversion attributes: diff --git a/AsBuiltReport.Veeam.VBR.psd1 b/AsBuiltReport.Veeam.VBR.psd1 index 2059bb9..8d245d2 100644 --- a/AsBuiltReport.Veeam.VBR.psd1 +++ b/AsBuiltReport.Veeam.VBR.psd1 @@ -12,7 +12,7 @@ RootModule = 'AsBuiltReport.Veeam.VBR.psm1' # Version number of this module. - ModuleVersion = '0.8.8' + ModuleVersion = '0.8.9' # Supported PSEditions # CompatiblePSEditions = @() @@ -63,11 +63,11 @@ } @{ ModuleName = 'Diagrammer.Core'; - ModuleVersion = '0.2.1' + ModuleVersion = '0.2.3' } @{ ModuleName = 'Veeam.Diagrammer'; - ModuleVersion = '0.6.0' + ModuleVersion = '0.6.2' } ) diff --git a/AsBuiltreport.Veeam.VBR.json b/AsBuiltreport.Veeam.VBR.json index e192f30..3baee65 100644 --- a/AsBuiltreport.Veeam.VBR.json +++ b/AsBuiltreport.Veeam.VBR.json @@ -16,6 +16,7 @@ "EnableDiagramDebug": false, "DiagramWaterMark": "", "ExportDiagrams": true, + "ExportDiagramsFormat": ["png"], "EnableDiagramSignature": false, "SignatureAuthorName": "", "SignatureCompanyName": "", diff --git a/CHANGELOG.md b/CHANGELOG.md index 285e856..59c72ac 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,25 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ##### This project is community maintained and has no sponsorship from Veeam, its employees or any of its affiliates. +## [0.8.9] - 2024-08-31 + +### Added + +- Add ExportDiagramsFormat option that allows specifying the format of the exported diagrams + - Supported formats are dot, pdf, png, svg +- Compatibility tests with v12.2 were performed + +### Changed + +- Increase Diagrammer.Core minimum requirement to v0.2.3 +- Increase Veeam.Diagrammer minimum requirement to v0.6.2 + +### Fixed + +- Fix bug while exporting diagram in svg format +- Improve error handling when infrastructure components are missing +- Fix [#169](https://github.com/AsBuiltReport/AsBuiltReport.Veeam.VBR/issues/169) + ## [0.8.8] - 2024-07-26 ### Added @@ -33,7 +52,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed - - Fix sorting of table [A-Z]. +- Fix sorting of table [A-Z]. ## [0.8.6] - 2024-04-29 diff --git a/README.md b/README.md index 8b37c1e..2e50aa2 100644 --- a/README.md +++ b/README.md @@ -149,19 +149,20 @@ The **Report** schema provides configuration of the Veeam VBR report information The **Options** schema allows certain options within the report to be toggled on or off. -| Sub-Schema | Setting | Default | Description | -| ----------------------- | ------------------- | ------- | ---------------------------------------------------------------- | -| BackupServerPort | TCP Port | 9392 | Set the backup server service's custom port. | -| PSDefaultAuthentication | Negotiate/Kerberos | Default | Set the PSRemoting authentication method | -| EnableHardwareInventory | true / false | false | Toggle to enable/disable of Hardware information | -| ReportStyle | Veeam/AsBuiltReport | Veeam | Allow to set report style template. | -| EnableDiagrams | true / false | false | Toggle to enable/disable of Infrastructure Diagrams | -| EnableDiagramsDebug | true/false | false | Toggle to enable/disable diagram debug option. | -| DiagramWaterMark | string | empty | Used to set the diagram waterMark. | -| ExportDiagrams | true/false | true | Toggle to enable/disable diagram export option. | -| EnableDiagramSignature | true/false | false | Toggle to enable/disable diagram signature (button right corner) | -| SignatureAuthorName | string | empty | Toggle to set signature author name. | -| SignatureCompanyName | string | empty | Toggle to set signature company name. | +| Sub-Schema | Setting | Default | Description | +| ----------------------- | ------------------- | ------- | ------------------------------------------------------------------------------ | +| BackupServerPort | TCP Port | 9392 | Set the backup server service's custom port. | +| PSDefaultAuthentication | Negotiate/Kerberos | Default | Set the PSRemoting authentication method | +| EnableHardwareInventory | true / false | false | Toggle to enable/disable of Hardware information | +| ReportStyle | Veeam/AsBuiltReport | Veeam | Allow to set report style template. | +| EnableDiagrams | true / false | false | Toggle to enable/disable of Infrastructure Diagrams | +| EnableDiagramsDebug | true/false | false | Toggle to enable/disable diagram debug option. | +| DiagramWaterMark | string | empty | Used to set the diagram waterMark. | +| ExportDiagrams | true/false | true | Toggle to enable/disable diagram export option. | +| ExportDiagramsFormat | string array | png | Set the format used to export the infrastructure diagram. (dot, png, pdf, svg) | +| EnableDiagramSignature | true/false | false | Toggle to enable/disable diagram signature (button right corner) | +| SignatureAuthorName | string | empty | Toggle to set signature author name. | +| SignatureCompanyName | string | empty | Toggle to set signature company name. | ### InfoLevel @@ -172,7 +173,7 @@ There are 4 levels (0-3) of detail granularity for each section as follows; | Setting | InfoLevel | Description | | :-----: | ----------- | -------------------------------------------------------------------- | | 0 | Disabled | Does not collect or display any information | -| 1 | Enabled | Provides summarised information for a collection of objects | +| 1 | Enabled | Provides summarized information for a collection of objects | | 2 | Adv Summary | Provides condensed, detailed information for a collection of objects | | 3 | Detailed | Provides detailed information for individual objects | diff --git a/Samples/AsBuiltReport.Veeam.VBR.png b/Samples/AsBuiltReport.Veeam.VBR.png index 02b295b..77c0c10 100644 Binary files a/Samples/AsBuiltReport.Veeam.VBR.png and b/Samples/AsBuiltReport.Veeam.VBR.png differ diff --git a/Src/Private/Get-AbrVbrBackupServerInfo.ps1 b/Src/Private/Get-AbrVbrBackupServerInfo.ps1 index a19d4fd..24e9b37 100644 --- a/Src/Private/Get-AbrVbrBackupServerInfo.ps1 +++ b/Src/Private/Get-AbrVbrBackupServerInfo.ps1 @@ -6,7 +6,7 @@ function Get-AbrVbrBackupServerInfo { .DESCRIPTION Documents the configuration of Veeam VBR in Word/HTML/Text formats using PScribo. .NOTES - Version: 0.8.8 + Version: 0.8.9 Author: Jonathan Colon Twitter: @jcolonfzenpr Github: rebelinux @@ -31,8 +31,6 @@ function Get-AbrVbrBackupServerInfo { $OutObj = @() try { foreach ($BackupServer in $BackupServers) { - # $CimSession = New-CimSession $BackupServer.Name -Credential $Credential -Authentication $Options.PSDefaultAuthentication - # $PssSession = New-PSSession $BackupServer.Name -Credential $Credential -Authentication $Options.PSDefaultAuthentication $CimSession = try { New-CimSession $BackupServer.Name -Credential $Credential -Authentication $Options.PSDefaultAuthentication -Name 'CIMBackupServer' -ErrorAction Stop } catch { Write-PScriboMessage -IsWarning "Backup Server Section: New-CimSession: Unable to connect to $($BackupServer.Name): $($_.Exception.MessageId)" } $PssSession = try { New-PSSession $BackupServer.Name -Credential $Credential -Authentication $Options.PSDefaultAuthentication -ErrorAction Stop -Name 'PSSBackupServer' } catch { diff --git a/Src/Private/Get-AbrVbrDiagram.ps1 b/Src/Private/Get-AbrVbrDiagram.ps1 index 3f393a7..ae5a20b 100644 --- a/Src/Private/Get-AbrVbrDiagram.ps1 +++ b/Src/Private/Get-AbrVbrDiagram.ps1 @@ -44,7 +44,7 @@ function Get-AbrVbrDiagram { Allow the creation of footer signature. AuthorName and CompanyName must be set to use this property. .NOTES - Version: 0.8.8 + Version: 0.8.9 Author(s): Jonathan Colon Twitter: @jcolonfzenpr Github: rebelinux @@ -120,13 +120,6 @@ function Get-AbrVbrDiagram { HelpMessage = 'Specify the Diagram filename' )] [ValidateNotNullOrEmpty()] - [ValidateScript({ - if (($Format | Measure-Object).count -lt 2) { - $true - } else { - throw "Format value must be unique if Filename is especified." - } - })] [String] $Filename, [Parameter( @@ -395,7 +388,7 @@ function Get-AbrVbrDiagram { # SOBR Graphviz Cluster $SOBR = Get-VbrSOBRInfo if ($SOBR) { - SubGraph SOBR -Attributes @{Label = (Get-DiaHTMLLabel -ImagesObj $Images -Label "Scale-Out Backup Repository" -IconType "VBR_SOBR" -SubgraphLabel -IconDebug $IconDebug); fontsize = 18; penwidth = 1.5; labelloc = 'b'; style = 'dashed,rounded' } { + SubGraph SOBR -Attributes @{Label = (Get-DiaHTMLLabel -ImagesObj $Images -Label "Scale-Out Backup Repositories" -IconType "VBR_SOBR" -SubgraphLabel -IconDebug $IconDebug); fontsize = 18; penwidth = 1.5; labelloc = 'b'; style = 'dashed,rounded' } { Node SOBRRepo @{Label = (Get-DiaHTMLNodeTable -ImagesObj $Images -inputObject ($SOBR | ForEach-Object { $_.Name.split('.')[0] }) -Align "Center" -iconType "VBR_SOBR_Repo" -columnSize 3 -IconDebug $IconDebug -MultiIcon -AditionalInfo $SOBR.AditionalInfo); shape = 'plain'; fillColor = 'transparent'; fontsize = 14; fontname = "Segoe Ui" } @@ -435,6 +428,11 @@ function Get-AbrVbrDiagram { } } } + } else { + SubGraph ObjectRepos -Attributes @{Label = (Get-DiaHTMLLabel -ImagesObj $Images -Label "Object Storage" -IconType "VBR_Object" -SubgraphLabel -IconDebug $IconDebug); fontsize = 18; penwidth = 1.5; labelloc = 't'; style = 'dashed,rounded' } { + + Node -Name ObjectRepo -Attributes @{Label = 'No Object Storage Repositories'; shape = "rectangle"; labelloc = 'c'; fixedsize = $true; width = "4"; height = "3"; fillColor = 'transparent'; penwidth = 0 } + } } # WanAccels Graphviz Cluster @@ -575,8 +573,11 @@ function Get-AbrVbrDiagram { # Connect Veeam Proxies Server to the Dummy line if ($Proxies | Where-Object { $_.AditionalInfo.Type -eq 'vSphere' }) { Edge -From VBRProxyPoint -To ViProxies @{minlen = 2; arrowtail = 'none'; arrowhead = 'dot'; style = 'dashed' } - } else { + } elseif (-Not ($Proxies | Where-Object { $_.AditionalInfo.Type -eq 'vSphere' }) -and ($Proxies.AditionalInfo | Where-Object { $_.Type -eq "Off host" -or $_.Type -eq "On host" })) { Edge -From VBRProxyPoint -To HvProxies @{minlen = 2; arrowtail = 'none'; arrowhead = 'dot'; style = 'dashed' } + } else { + Edge -From VBRProxyPoint -To Proxies @{minlen = 2; arrowtail = 'none'; arrowhead = 'dot'; style = 'dashed' } + } # Connect Veeam Repository to the Dummy line Edge -From VBRRepoPoint -To Repositories @{minlen = 2; arrowtail = 'none'; arrowhead = 'dot'; style = 'dashed' } @@ -587,6 +588,8 @@ function Get-AbrVbrDiagram { } elseif ($ArchObjRepositoriesInfo) { Edge -To VBRRepoPoint -From ArchObjectRepositories @{minlen = 2; arrowtail = 'dot'; arrowhead = 'none'; style = 'dashed' } + } else { + Edge -To VBRRepoPoint -From ObjectRepo @{minlen = 2; arrowtail = 'dot'; arrowhead = 'none'; style = 'dashed' } } # Connect Veeam Wan Accelerator to the Dummy line @@ -624,11 +627,13 @@ function Get-AbrVbrDiagram { } } end { - #Export the Diagram - if ($Graph) { - Export-Diagrammer -GraphObj ($Graph | Select-String -Pattern '"([A-Z])\w+"\s\[label="";style="invis";shape="point";]' -NotMatch) -ErrorDebug $EnableErrorDebug -Format $Format -Filename $Filename -OutputFolderPath $OutputFolderPath -WaterMarkText $Options.DiagramWaterMark -WaterMarkColor "Green" - } else { - Write-PScriboMessage -IsWarning "No Graph object found. Disabling diagram section" + foreach ($OutputFormat in $Format) { + #Export the Diagram + if ($Graph) { + Export-Diagrammer -GraphObj ($Graph | Select-String -Pattern '"([A-Z])\w+"\s\[label="";style="invis";shape="point";]' -NotMatch) -ErrorDebug $EnableErrorDebug -Format $OutputFormat -Filename "$Filename.$OutputFormat" -OutputFolderPath $OutputFolderPath -WaterMarkText $Options.DiagramWaterMark -WaterMarkColor "Green" -IconPath $IconPath + } else { + Write-PScriboMessage -IsWarning "No Graph object found. Disabling diagram section" + } } } } \ No newline at end of file diff --git a/Src/Private/Get-AbrVbrDiagramObjects.ps1 b/Src/Private/Get-AbrVbrDiagramObjects.ps1 index d99ae38..91099d7 100644 --- a/Src/Private/Get-AbrVbrDiagramObjects.ps1 +++ b/Src/Private/Get-AbrVbrDiagramObjects.ps1 @@ -24,6 +24,7 @@ function Get-IconType { 'AzureArchive' { 'VBR_Cloud_Repository' } 'DDBoost' { 'VBR_Deduplicating_Storage' } 'HPStoreOnceIntegration' { 'VBR_Deduplicating_Storage' } + 'ExaGrid' { 'VBR_Deduplicating_Storage' } 'SanSnapshotOnly' { 'VBR_Storage_NetApp' } 'Proxy' { 'VBR_Repository' } 'ESXi' { 'VBR_ESXi_Server' } @@ -32,6 +33,8 @@ function Get-IconType { 'IndividualComputers' { 'VBR_AGENT_IC' } 'ActiveDirectory' { 'VBR_AGENT_AD' } 'CSV' { 'VBR_AGENT_CSV' } + 'CifsShare' {'VBR_NAS'} + 'NfsShare' {'VBR_NAS'} default { 'VBR_No_Icon' } } @@ -58,13 +61,17 @@ function Get-RoleType { 'WinLocal' { 'Windows Local' } 'DDBoost' { 'Dedup Appliances' } 'HPStoreOnceIntegration' { 'Dedup Appliances' } + 'ExaGrid' { 'Dedup Appliances' } + 'InfiniGuard' { 'Dedup Appliances' } 'Cloud' { 'Cloud' } 'SanSnapshotOnly' { 'SAN' } "vmware" { 'VMware Backup Proxy' } "hyperv" { 'HyperV Backup Proxy' } "agent" { 'Agent & Files Backup Proxy' } "nas" { 'NAS Backup Proxy' } - default { 'Backup Repository' } + "CifsShare" { 'SMB Share' } + "NfsShare" { 'NFS Share' } + default { 'Unknown' } } return $RoleType @@ -416,7 +423,7 @@ function Get-VbrRepositoryInfo { param ( ) - [Array]$Repositories = Get-VBRBackupRepository | Where-Object { $_.Type -notin @("SanSnapshotOnly", "AmazonS3Compatible", "WasabiS3") } | Sort-Object -Property Name + [Array]$Repositories = Get-VBRBackupRepository | Where-Object { $_.Type -notin @("SanSnapshotOnly", "AmazonS3Compatible", "WasabiS3", "SmartObjectS3") } | Sort-Object -Property Name [Array]$ScaleOuts = Get-VBRBackupRepository -ScaleOut | Sort-Object -Property Name if ($ScaleOuts) { $Extents = Get-VBRRepositoryExtent -Repository $ScaleOuts | Sort-Object -Property Name @@ -429,19 +436,16 @@ function Get-VbrRepositoryInfo { $IconType = Get-IconType $Role = Get-RoleType -String $Repository.Type - $Rows = @{} + $Rows = [ordered]@{} - if ($Role -like '*Local' -or $Role -like 'Cloud') { + if ($Repository.Host.Name) { $Rows.add('Server', $Repository.Host.Name.Split('.')[0]) - $Rows.add('Repo Type', $Role) - # $Rows.add('Path', $Repository.FriendlyPath) - $Rows.add('Total Space', "$(($Repository).GetContainer().CachedTotalSpace.InGigabytes) GB") - $Rows.add('Used Space', "$(($Repository).GetContainer().CachedFreeSpace.InGigabytes) GB") - } elseif ($Role -like 'Dedup*') { - $Rows.add('Repo Type', $Role) - $Rows.add('Total Space', "$(($Repository).GetContainer().CachedTotalSpace.InGigabytes) GB") - $Rows.add('Used Space', "$(($Repository).GetContainer().CachedFreeSpace.InGigabytes) GB") + } else { + $Rows.add('Server', 'N/A') } + $Rows.add('Repo Type', $Role) + $Rows.add('Total Space', "$(($Repository).GetContainer().CachedTotalSpace.InGigabytes) GB") + $Rows.add('Used Space', "$(($Repository).GetContainer().CachedFreeSpace.InGigabytes) GB") if (($Role -ne 'Dedup Appliances') -and ($Role -ne 'SAN') -and ($Repository.Host.Name -in $ViBackupProxy.Host.Name -or $Repository.Host.Name -in $HvBackupProxy.Host.Name)) { $BackupType = 'Proxy' diff --git a/Src/Private/Get-AbrVbrSecurityCompliance.ps1 b/Src/Private/Get-AbrVbrSecurityCompliance.ps1 index 6cec86c..76f0964 100644 --- a/Src/Private/Get-AbrVbrSecurityCompliance.ps1 +++ b/Src/Private/Get-AbrVbrSecurityCompliance.ps1 @@ -6,7 +6,7 @@ function Get-AbrVbrSecurityCompliance { .DESCRIPTION Documents the configuration of Veeam VBR in Word/HTML/Text formats using PScribo. .NOTES - Version: 0.8.6 + Version: 0.8.9 Author: Jonathan Colon Twitter: @jcolonfzenpr Github: rebelinux @@ -70,6 +70,9 @@ function Get-AbrVbrSecurityCompliance { 'ConfigurationBackupRepositoryNotLocal' = 'The configuration backup is not stored on the backup server' 'LossProtectionEnabled' = 'Password loss protection is enabled' 'TrafficEncryptionEnabled' = 'Encryption network rules added for LAN traffic' + 'NetBiosDisabled' = 'NetBIOS protocol should be disabled on all network interfaces' + 'LsassProtectedProcess' = 'Local Security Authority Server Service (LSASS) should be set to run as a protected process' + 'HardenedRepositoryNotContainsNBDProxies' = 'Hardened repositories should not be used as backup proxy servers due to expanded attack surface' } $StatusObj = @{ 'Ok' = "Passed" diff --git a/Src/Public/Invoke-AsBuiltReport.Veeam.VBR.ps1 b/Src/Public/Invoke-AsBuiltReport.Veeam.VBR.ps1 index 2570788..3312ae9 100644 --- a/Src/Public/Invoke-AsBuiltReport.Veeam.VBR.ps1 +++ b/Src/Public/Invoke-AsBuiltReport.Veeam.VBR.ps1 @@ -5,7 +5,7 @@ function Invoke-AsBuiltReport.Veeam.VBR { .DESCRIPTION Documents the configuration of Veeam VBR in Word/HTML/Text formats using PScribo. .NOTES - Version: 0.8.8 + Version: 0.8.9 Author: Jonathan Colon Twitter: @jcolonfzenpr Github: rebelinux @@ -467,9 +467,14 @@ function Invoke-AsBuiltReport.Veeam.VBR { # Backup Infrastructure Diagram Section # #---------------------------------------------------------------------------------------------# + if (-Not $Options.ExportDiagramsFormat) { + $DiagramFormat = 'png' + } else { + $DiagramFormat = $Options.ExportDiagramsFormat + } $DiagramParams = @{ - 'Format' = "png" - 'FileName' = 'AsBuiltReport.Veeam.VBR.png' + 'Format' = $DiagramFormat + 'FileName' = "AsBuiltReport.Veeam.VBR" 'OutputFolderPath' = (Get-Location).Path } @@ -487,7 +492,9 @@ function Invoke-AsBuiltReport.Veeam.VBR { try { $Graph = Get-AbrVbrDiagram @DiagramParams if ($Graph) { - Write-Information "Saved 'AsBuiltReport.Veeam.VBR.png' diagram to '$((Get-Location).Path)\'." -InformationAction Continue + foreach ($OutputFormat in $DiagramFormat) { + Write-Information "Saved 'AsBuiltReport.Veeam.VBR.$($OutputFormat)' diagram to '$((Get-Location).Path)\'." -InformationAction Continue + } } } catch { Write-PScriboMessage -IsWarning "Unable to export the Infrastructure Diagram: $($_.Exception.Message)"