Skip to content

Commit

Permalink
Merge pull request #171 from AsBuiltReport/dev
Browse files Browse the repository at this point in the history
v0.8.9 public release
  • Loading branch information
rebelinux authored Sep 1, 2024
2 parents 66cd367 + f2b80fa commit 81fb762
Show file tree
Hide file tree
Showing 12 changed files with 113 additions and 60 deletions.
18 changes: 11 additions & 7 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -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:
Expand Down Expand Up @@ -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
11 changes: 11 additions & 0 deletions .github/ISSUE_TEMPLATE/change_request.yml
Original file line number Diff line number Diff line change
@@ -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:
Expand Down
6 changes: 3 additions & 3 deletions AsBuiltReport.Veeam.VBR.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -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 = @()
Expand Down Expand Up @@ -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'
}
)

Expand Down
1 change: 1 addition & 0 deletions AsBuiltreport.Veeam.VBR.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
"EnableDiagramDebug": false,
"DiagramWaterMark": "",
"ExportDiagrams": true,
"ExportDiagramsFormat": ["png"],
"EnableDiagramSignature": false,
"SignatureAuthorName": "",
"SignatureCompanyName": "",
Expand Down
21 changes: 20 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

Expand Down
29 changes: 15 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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 |

Expand Down
Binary file modified Samples/AsBuiltReport.Veeam.VBR.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 1 addition & 3 deletions Src/Private/Get-AbrVbrBackupServerInfo.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 {
Expand Down
35 changes: 20 additions & 15 deletions Src/Private/Get-AbrVbrDiagram.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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(
Expand Down Expand Up @@ -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" }

Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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' }
Expand All @@ -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
Expand Down Expand Up @@ -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"
}
}
}
}
28 changes: 16 additions & 12 deletions Src/Private/Get-AbrVbrDiagramObjects.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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' }
Expand All @@ -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' }
}

Expand All @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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'
Expand Down
Loading

0 comments on commit 81fb762

Please sign in to comment.