I am currently working on a problem that users of my PRTG-Sensor Script (https://github.com/mycloudrevolution/Ad ... RStats.ps1) reported.
I have forked the "Get-vPCRepoInfo" PowerShell function from Shawn (https://blog.smasterson.com/) into the script.
I liked the idea of the "SyncSpaceInfoToDb" Method to get the latest details of the repo. But as the Veeam Cloud Repositories became more popular, more and more users reported problems with the script. I have created a workaround that excluded Cloud Repositories from the script but in my opinion, this is not a proper solution. I have also seen some users on Shawn's blog reported this problem.
I am currently not sure where the problem is located, the "SyncSpaceInfoToDb" Method or the Space info in the Object itself ($r.info.CachedFreeSpace $r.Info.CachedTotalSpace). I do not have access to a cloud repository to dig deeper into the problem.
Is someone with Access to a cloud repo willing to support me in creating a proper solution?
The first step might be verifying that the Space info is available for Cloud Repos:
Code: Select all
[Array]$RepoList = Get-VBRBackupRepository | Where-Object {$_.Type -ne "SanSnapshotOnly"}
[Array]$ScaleOuts = Get-VBRBackupRepository -ScaleOut
if ($ScaleOuts) {
foreach ($ScaleOut in $ScaleOuts) {
$Extents = Get-VBRRepositoryExtent -Repository $ScaleOut
foreach ($Extent in $Extents) {
$RepoList = $RepoList + $Extent.repository
}
}
}
$RepoList | Select-Object Name, @{Name="CachedTotalSpaceGB"; Expression= {[Math]::Round([Decimal]$_.info.CachedTotalSpace/1GB,2)}}, @{Name="CachedFreeSpaceGB"; Expression= {[Math]::Round([Decimal]$_.info.CachedFreeSpace/1GB,2)}} | Format-Table -AutoSize