Skip to content

Commit

Permalink
Add HealthCheck Recommendations AsBuiltReport#100
Browse files Browse the repository at this point in the history
  • Loading branch information
rebelinux committed Jun 1, 2023
1 parent 37dd5d1 commit 6ad0bd3
Show file tree
Hide file tree
Showing 18 changed files with 172 additions and 45 deletions.
2 changes: 1 addition & 1 deletion 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.7.1'
ModuleVersion = '0.7.2'

# Supported PSEditions
# CompatiblePSEditions = @()
Expand Down
4 changes: 3 additions & 1 deletion AsBuiltreport.Veeam.VBR.json
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,9 @@
"Tenants": true,
"BackupStorage": true,
"ReplicaResources": true
},
"Jobs": {
"Status": true
}

}
}
16 changes: 16 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,21 @@
# :arrows_clockwise: Veeam VBR As Built Report Changelog

## [0.7.2] - 2023-05-30

### Added

- Added HealthCheck recommendations
- Added Global Notification options

### Changed

- Visually improved the Backup Window Time Period table

### Fixed

- Fix [#99](https://github.com/AsBuiltReport/AsBuiltReport.Veeam.VBR/issues/99)
- Fix [#100](https://github.com/AsBuiltReport/AsBuiltReport.Veeam.VBR/issues/100)

## [0.7.1] - 2023-03-07

### Changed
Expand Down
6 changes: 6 additions & 0 deletions Src/Private/Get-AbrVbrBackupRepository.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,7 @@ function Get-AbrVbrBackupRepository {
$OutObj += [pscustomobject]$inobj

if ($HealthCheck.Infrastructure.BR) {
$OutObj | Where-Object { $_.'Immutability Supported' -eq 'Yes' } | Set-Style -Style OK -Property 'Immutability Supported'
$OutObj | Where-Object { $_.'Immutability Supported' -eq 'Yes' -and $_.'Immutability Enabled' -eq 'No' } | Set-Style -Style Warning -Property 'Immutability Enabled'
}

Expand All @@ -178,6 +179,11 @@ function Get-AbrVbrBackupRepository {
$TableParams['Caption'] = "- $($TableParams.Name)"
}
$OutObj | Table @TableParams

if (($HealthCheck.Infrastructure.BestPractice) -and ($OutObj | Where-Object { $_.'Immutability Supported' -eq 'Yes' -and $_.'Immutability Enabled' -eq 'No' })) {
Paragraph "Health Check:" -Italic -Bold -Underline
Paragraph "Best Practice: Veeam recommend to implement Immutability where it is supported. It is done for increased security: immutability protects your data from loss as a result of attacks, malware activity or any other injurious actions." -Italic -Bold
}
}
}
catch {
Expand Down
12 changes: 9 additions & 3 deletions Src/Private/Get-AbrVbrBackupServerInfo.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -145,14 +145,14 @@ function Get-AbrVbrBackupServerInfo {
'BIOS Version' = $HWBIOS.Version
'Processor Manufacturer' = $HWCPU[0].Manufacturer
'Processor Model' = $HWCPU[0].Name
'Number of CPU Cores' = $HWCPU[0].NumberOfCores
'Number of Logical Cores' = $HWCPU[0].NumberOfLogicalProcessors
'Number of CPU Cores' = ($HWCPU.NumberOfCores | Measure-Object -Sum).Sum
'Number of Logical Cores' = ($HWCPU.NumberOfLogicalProcessors | Measure-Object -Sum).Sum
'Physical Memory (GB)' = ConvertTo-FileSizeString $HW.CsTotalPhysicalMemory
}
$OutObj += [pscustomobject]$inobj

if ($HealthCheck.Infrastructure.Server) {
$OutObj | Where-Object { $_.'Number of CPU Cores' -lt 4} | Set-Style -Style Warning -Property 'Number of CPU Cores'
$OutObj | Where-Object { $_.'Number of CPU Cores' -lt 2} | Set-Style -Style Warning -Property 'Number of CPU Cores'
if ([int]([regex]::Matches($OutObj.'Physical Memory (GB)', "\d+(?!.*\d+)").value) -lt 8) { $OutObj | Set-Style -Style Warning -Property 'Physical Memory (GB)' }
}

Expand All @@ -165,6 +165,12 @@ function Get-AbrVbrBackupServerInfo {
$TableParams['Caption'] = "- $($TableParams.Name)"
}
$OutObj | Table @TableParams
if ($HealthCheck.Infrastructure.BestPractice) {
if (([int]([regex]::Matches($OutObj.'Physical Memory (GB)', "\d+(?!.*\d+)").value) -lt 8) -or ($OutObj | Where-Object { $_.'Number of CPU Cores' -lt 2})) {
Paragraph "Health Check:" -Italic -Bold -Underline
Paragraph "Best Practice: Recommended Veeam Backup Server minimum configuration is two CPU cores and 8GB RAM." -Italic -Bold
}
}
#---------------------------------------------------------------------------------------------#
# Backup Server Local Disk Inventory Section #
#---------------------------------------------------------------------------------------------#
Expand Down
7 changes: 6 additions & 1 deletion Src/Private/Get-AbrVbrBackupjob.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ function Get-AbrVbrBackupjob {
.DESCRIPTION
Documents the configuration of Veeam VBR in Word/HTML/Text formats using PScribo.
.NOTES
Version: 0.7.1
Version: 0.7.2
Author: Jonathan Colon
Twitter: @jcolonfzenpr
Github: rebelinux
Expand Down Expand Up @@ -53,6 +53,11 @@ function Get-AbrVbrBackupjob {
}
}

if ($HealthCheck.Jobs.Status) {
$OutObj | Where-Object { $_.'Latest Result' -eq 'Failed' } | Set-Style -Style Critical -Property 'Latest Result'
$OutObj | Where-Object { $_.'Latest Result' -eq 'Warning' } | Set-Style -Style Warning -Property 'Latest Result'
}

$TableParams = @{
Name = "Backup Jobs - $VeeamBackupServer"
List = $false
Expand Down
2 changes: 1 addition & 1 deletion Src/Private/Get-AbrVbrBackupjobHyperV.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ function Get-AbrVbrBackupjobHyperV {
.DESCRIPTION
Documents the configuration of Veeam VBR in Word/HTML/Text formats using PScribo.
.NOTES
Version: 0.7.1
Version: 0.7.2
Author: Jonathan Colon
Twitter: @jcolonfzenpr
Github: rebelinux
Expand Down
12 changes: 11 additions & 1 deletion Src/Private/Get-AbrVbrBackupjobVMware.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ function Get-AbrVbrBackupjobVMware {
.DESCRIPTION
Documents the configuration of Veeam VBR in Word/HTML/Text formats using PScribo.
.NOTES
Version: 0.7.1
Version: 0.7.2
Author: Jonathan Colon
Twitter: @jcolonfzenpr
Github: rebelinux
Expand Down Expand Up @@ -405,6 +405,10 @@ function Get-AbrVbrBackupjobVMware {
}
$OutObj = [pscustomobject]$inobj

if ($HealthCheck.Jobs.BestPractice) {
$OutObj | Where-Object { $_.'Enabled Backup File Encryption' -eq 'No'} | Set-Style -Style Warning -Property 'Enabled Backup File Encryption'
}

$TableParams = @{
Name = "Advanced Settings (Storage) - $($Bkjob.Name)"
List = $true
Expand All @@ -414,6 +418,12 @@ function Get-AbrVbrBackupjobVMware {
$TableParams['Caption'] = "- $($TableParams.Name)"
}
$OutObj | Table @TableParams
if ($HealthCheck.Jobs.BestPractice) {
if ($OutObj | Where-Object { $_.'Enabled Backup File Encryption' -eq 'No'}) {
Paragraph "Health Check:" -Italic -Bold -Underline
Paragraph "Best Practice: Backup and replica data is a high potential source of vulnerability. To secure data stored in backups and replicas, use Veeam Backup & Replication inbuilt encryption to protect data in backups" -Italic -Bold
}
}
}
catch {
Write-PscriboMessage -IsWarning $_.Exception.Message
Expand Down
14 changes: 14 additions & 0 deletions Src/Private/Get-AbrVbrConfigurationBackupSetting.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,20 @@ function Get-AbrVbrConfigurationBackupSetting {
$TableParams['Caption'] = "- $($TableParams.Name)"
}
$OutObj | Table @TableParams
if ($HealthCheck.Infrastructure.BestPractice) {
if ($OutObj | Where-Object { $_.'Encryption Enabled' -like 'No' -or $_.'Run Job Automatically' -like 'No' -or $_.'Enabled' -like 'No' }) {
Paragraph "Health Check:" -Italic -Bold -Underline
if ($OutObj | Where-Object { $_.'Encryption Enabled' -like 'No'} ) {
Paragraph "Best Practice: Whenever possible, enable configuration backup encryption." -Italic -Bold
}
if ($OutObj | Where-Object { $_.'Run Job Automatically' -like 'No'}) {
Paragraph "Best Practice: It`s a recommended best practice to activate the 'Run job automatically' option of the Backup Configuration job." -Italic -Bold
}
if ($OutObj | Where-Object { $_.'Enabled' -like 'No'}) {
Paragraph "Best Practice: It`s a recommended best practice to enable the Backup Configuration j ob" -Italic -Bold
}
}
}
}
}
}
Expand Down
10 changes: 7 additions & 3 deletions Src/Private/Get-AbrVbrEmailNotificationSetting.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ function Get-AbrVbrEmailNotificationSetting {
.DESCRIPTION
Documents the configuration of Veeam VBR in Word/HTML/Text formats using PScribo.
.NOTES
Version: 0.7.1
Version: 0.7.2
Author: Jonathan Colon
Twitter: @jcolonfzenpr
Github: rebelinux
Expand All @@ -26,10 +26,10 @@ function Get-AbrVbrEmailNotificationSetting {

process {
try {
if ((Get-VBRMailNotificationConfiguration).count -gt 0) {
$EmailSettings = Get-VBRMailNotificationConfiguration
if ($EmailSettings) {
Section -Style Heading4 'Email Notification' {
$OutObj = @()
$EmailSettings = Get-VBRMailNotificationConfiguration
foreach ($EmailSetting in $EmailSettings) {
$inObj = [ordered] @{
'Email Recipient' = $EmailSetting.Recipient
Expand Down Expand Up @@ -63,6 +63,10 @@ function Get-AbrVbrEmailNotificationSetting {
$TableParams['Caption'] = "- $($TableParams.Name)"
}
$OutObj | Table @TableParams
if ($HealthCheck.Infrastructure.BestPractice -and ($OutObj | Where-Object { $_.'Enabled' -eq 'No' })) {
Paragraph "Health Check:" -Italic -Bold -Underline
Paragraph "Best Practice: Veeam recommends configuring email notifications to be able to receive alerts with the results of jobs performed on the backup server." -Italic -Bold
}
}
}
}
Expand Down
8 changes: 8 additions & 0 deletions Src/Private/Get-AbrVbrEnterpriseManagerInfo.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,10 @@ function Get-AbrVbrEnterpriseManagerInfo {

if ($OutObj) {

if ($HealthCheck.Infrastructure.BackupServer) {
$OutObj | Where-Object { $_.'Skip License Push' -eq 'Yes' } | Set-Style -Style Warning -Property 'Skip License Push'
}

$TableParams = @{
Name = "Enterprise Manager - $($BackupServer.Name.Split(".")[0])"
List = $true
Expand All @@ -63,6 +67,10 @@ function Get-AbrVbrEnterpriseManagerInfo {
$TableParams['Caption'] = "- $($TableParams.Name)"
}
$OutObj | Table @TableParams
if ($HealthCheck.Infrastructure.BestPractice -and ($OutObj | Where-Object { $_.'Skip License Push' -eq 'Yes' })) {
Paragraph "Health Check:" -Italic -Bold -Underline
Paragraph "Best Practice: Veeam recommends centralized license management through Enterprise Manager." -Italic -Bold
}
}
}
}
Expand Down
Loading

0 comments on commit 6ad0bd3

Please sign in to comment.