Fix MARS collector against a real agent's object model
Checked with Get-MarsCollectorDiagnostics.ps1 output from MARS agent 2.0.9274 (VA-FS-01): - JobStatus.StartTime/EndTime are UTC values not marked as UTC (DisplayTime is the local one); they were read as local, putting runs 6 hours off. Lookback filtering now compares in UTC too - ErrorInfo is always present with ErrorCode 0 on success; every completed backup would have been a warning. Only non-zero error codes count - Schedule times are TimeSpans; casting them to DateTime failed, so next_run_at was always empty - DatasourceStatus.Datasource is an object; use its DataSourceName - Also report FileProgress.Failed file counts and FailedFileLog - Mock rebuilt on the real shapes; diagnostics handle no System State policy Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
@@ -90,7 +90,10 @@ $report = & {
|
||||
Show-Section 'Get-OBPolicy' { Get-OBPolicy }
|
||||
Show-Section 'Get-OBPolicy | Get-OBSchedule' { Get-OBSchedule -Policy (Get-OBPolicy) }
|
||||
if (Get-Command Get-OBSystemStatePolicy -ErrorAction SilentlyContinue) {
|
||||
Show-Section 'Get-OBSystemStatePolicy | Get-OBSchedule' { Get-OBSchedule -Policy (Get-OBSystemStatePolicy) }
|
||||
Show-Section 'Get-OBSystemStatePolicy | Get-OBSchedule' {
|
||||
$ssPolicy = Get-OBSystemStatePolicy
|
||||
if ($ssPolicy) { Get-OBSchedule -Policy $ssPolicy } else { '(no System State policy configured)' }
|
||||
}
|
||||
}
|
||||
} | Out-String -Width 300
|
||||
|
||||
|
||||
Reference in New Issue
Block a user