Closed eren-kemer closed 7 years ago
Don't know how(didn't find any way to) but perhasp you could check if the repository is connected. Otherwise, maybe catch the exception and turn the sensor red?
I think the problem is not cloud Repo specific. All unailable Repositories should be effected (Server disconnected for example ).
Have you tried a simple Try / Catch around '[Veeam.Backup.Core.CBackupRepositoryEx]::SyncSpaceInfoToDb($r, $true)'?
I will try to create a test scenario inside my Lab for that Situationen.
I'm not too familiar with powershell. Just tried to fiddle around to find the issue here. I can test for you though, if needed.
Might you please check this Version: https://github.com/mycloudrevolution/Advanced-PRTG-Sensors/pull/21
in Debug Mode you should see the message: "SyncSpaceInfoToDb Failed" but no error should occure.
Works as expected.
When cloud repository is added to VBR Console but not connected(see image), the powershell script shows an exception, just before PRTG output.
Doesn't affect prtg output directly, but i assume this should be an error in PRTG.