Open susishopware opened 1 year ago
I added the SureBackups in my sensor:
$allSureBkSesh = @(Get-VBRSureBackupSession | Where-Object{($_.CreationTime -ge (Get-Date).AddHours(-$HourstoCheck))}) # Get all Sure Backup Sessions
$successSessionSureBk = @($allSureBkSesh | Where-Object{$_.Result -eq "Success"})
$warnungSessionSureBk = @($allSureBkSesh | Where-Object{$_.Result -eq "Warning"})
$failsSessionSureBk = @($allSureBkSesh | Where-Object{$_.Result -eq "Failed"})
$runningSessionSureBk = @($allSureBkSesh | Where-Object{$_.State -eq "working"})
$Count = $successSessionSureBk.Count
$xmlOutput = $xmlOutput + "<result>
<channel>Successful-SUREBackups</channel>
<value>$Count</value>
<showChart>1</showChart>
<showTable>1</showTable>
</result>"
$Count = $warnungSessionSureBk.Count
$xmlOutput = $xmlOutput + "<result>
<channel>Warning-SUREBackups</channel>
<value>$Count</value>
<showChart>1</showChart>
<showTable>1</showTable>
<LimitMaxWarning>0</LimitMaxWarning>
<LimitMode>1</LimitMode>
</result>"
$Count = $failsSessionSureBk.Count
$xmlOutput = $xmlOutput + "<result>
<channel>Failes-SUREBackups</channel>
<value>$Count</value>
<showChart>1</showChart>
<showTable>1</showTable>
<LimitMaxError>0</LimitMaxError>
<LimitMode>1</LimitMode>
</result>"
$Count = $runningSessionSureBk.Count
$xmlOutput = $xmlOutput + "<result>
<channel>Running-SUREBackups</channel>
<value>$Count</value>
<showChart>1</showChart>
<showTable>1</showTable>
</result>"
Hey, I'm not sure if its already integrated in "Successfull Backups" but it would be great if there is a separate column for SureBackup Jobs.
Thanks for your service!