PowerShell script exchange
GianlucaCroci
Expert
Posts: 214
Liked: 20 times
Joined: Feb 26, 2019 12:08 pm
Full Name: Gianluca Croci
Contact:

Re: My Veeam Report v9.5.1

Post by GianlucaCroci »

Hello all,

Thank's a lot for the replies.

@Oleg: I know this, I thought it was what you say.
But I only took the portion of code indicated by "by garrettt12» Sep 23, 2021 5:28 pm", as well as others previously.


If possible it would be nice to have it for extent, because it would allow us to understand when an Extent is filling up at the expense of others.


The part instead of FileCopy or FileBackup? It is included in @chris.arceneaux's V11
oleg.feoktistov
Veeam Software
Posts: 1912
Liked: 635 times
Joined: Sep 25, 2019 10:32 am
Full Name: Oleg Feoktistov
Contact:

Re: My Veeam Report v9.5.1

Post by oleg.feoktistov »

I had no idea what some of the properties were in the code above, so I left only those, which I though would be useful to showcase the idea
of reporting on extents' sizes. You will probably need something like this:

Code: Select all

 Function Get-VBRSORepoInfo {
  [CmdletBinding()]
  param (
    [Parameter(Position=0, ValueFromPipeline=$true)]
    [Veeam.Backup.Powershell.Infos.VBRScaleOutBackupRepository[]]$Repository
  )
  Begin {
  $repoArray = @()
    foreach ($sobr in $Repository) {
    $extentArray = @()
    $storageFreeSum = 0
    $storageTotalSum = 0
       foreach ($extent in $sobr.Extent) {
        
           $ExtentName = $extent.Name
           $Path = $extent.Repository.Path.ToString()
           $StorageFree = [Math]::Round($extent.repository.Getcontainer().CachedFreeSpace.Inbytes / 1GB,2)
           $StorageTotal = [Math]::Round($extent.repository.Getcontainer().CachedtotalSpace.InBytes / 1GB,2)
           $FreePercentage = [Math]::Round(($extent.repository.Getcontainer().CachedFreeSpace.Inbytes/$extent.repository.Getcontainer().CachedtotalSpace.InBytes)*100)
     
         $extentArray += $extent | select @{n='ExtentName';e={$ExtentName}}, @{n='Path';e={$Path}}, @{n='StorageFree';e={$StorageFree}}, `
         @{n='StorageTotal';e={$StorageTotal}}, @{n='FreePercentage';e={$FreePercentage}}
         $storageFreeSum += $StorageFree
         $storageTotalSum += $StorageTotal
       }
       
        $Id = $sobr.Id
        $Name = $sobr.Name
        $PolicyType = $sobr.PolicyType
        $Extents = $extentArray
        $StorageFree = $storageFreeSum
        $StorageTotal = $storageTotalSum
        $FreePercentage = $freePercentageSum
        $repoArray += $sobr | select @{n='Id';e={$Id}}, @{n='Name';e={$Name}}, @{n='PolicyType';e={$PolicyType}}, @{n='Extents';e={$Extents}}, `
        @{n='StorageFree';e={$StorageFree}}, @{n='StorageTotal';e={$StorageTotal}}
      
    }
    $repoArray
    }
} 
Hope it helps!
Ollo
Enthusiast
Posts: 32
Liked: 3 times
Joined: Jan 19, 2018 6:32 am
Contact:

Re: My Veeam Report v9.5.1

Post by Ollo »

Any updates for v11a available?
oleg.feoktistov
Veeam Software
Posts: 1912
Liked: 635 times
Joined: Sep 25, 2019 10:32 am
Full Name: Oleg Feoktistov
Contact:

Re: My Veeam Report v9.5.1

Post by oleg.feoktistov »

No, there aren't any updates for this report yet. As soon as we have them, will let you know. Thanks!
pantoufle
Influencer
Posts: 11
Liked: never
Joined: Feb 16, 2012 6:20 pm
Full Name: Pantoufle

Re: My Veeam Report v9.5.1

Post by pantoufle »

thanks for this thread !

i upgrade from Veeam BR 9.5 to 11a
and MVR 9.0.1 to 9.5.3, and there is a lot of work :-O
FSW Ant
Influencer
Posts: 11
Liked: never
Joined: Jun 24, 2021 5:28 pm
Full Name: Anthony
Contact:

Re: My Veeam Report v9.5.1

Post by FSW Ant »

Ok, I've gotten this to work almost 100% with only 1 issue. It seems that the "VM's with No Successful Backups within RPO" and the "VM's with only Backups with Warnings within RPO" are the problem. Whenever its enabled to show these tables, even if there are no VM's that fit those categories are showing, just those heading being present makes the Veeam backup report header red and prepends the title of the email with "Failed" even though nothing failed. When I set these values to false (below), the report shows successful but doesn't have any VM's listed at all, not even for success. If I only turn off the unprotectedVM's, then the report comes through as "warning" even though no VM's are listed in the Warning state.

$showUnprotectedVMs = $True
# Show VMs with Successful Backups within RPO ($reportMode)
# Also shows VMs with Only Backups with Warnings within RPO ($reportMode)
$showProtectedVMs = $true

How can we change the report so that the unprotected VM's (red section) and the Protected but with Warning VM's (yellow section) can be present on the report at all times, but will show the report as "success" if there are no VM's listed in those fields? Or, maybe even have it so those two fields don't show if they are empty.

As of right now this is the only thing thats holding me back and I feel like it doesn't make sense that the report will say failed just because those tables are there even when they are empty.

Here is a screenshot of what it looks like. The report should show "success" because there aren't any VM's listed for Failed or Warning (the area's I circled in blue) but the report thinks its "failed"

Image

Ant
merku
Enthusiast
Posts: 46
Liked: 10 times
Joined: Feb 08, 2020 3:17 pm
Full Name: Mercurio
Contact:

Re: My Veeam Report v9.5.1

Post by merku » 2 people like this post

Have you tried this new version of myveeamreport? It works fine for me and at the moment I have no particular problems. If needed, this is the github link to download it:

https://github.com/marcohorstmann/MyVeeamReport

enjoy yourselves
Samba222
Service Provider
Posts: 79
Liked: 24 times
Joined: Jan 18, 2017 11:54 am
Full Name: Ronald
Contact:

Re: My Veeam Report v9.5.1

Post by Samba222 » 1 person likes this post

works perfect - big thanks to Marco for further development!
Post Reply

Who is online

Users browsing this forum: No registered users and 18 guests