Hi Oleg,
my problem occours in our monitoring tool. We are using check_mk, and I installed the default "Veeam Backup Status" script that comes with the installation. This script always was running a long time (between 10-20 seconds), but started to get much slower in the last months (maybe after a Veeam update? not sure...), so I tried to look for the problem.
This is the part in the script that tries to get the tape jobs:
Code: Select all
$tapeJobs = Get-VBRTapeJob
write-host "<<<veeam_tapejobs:sep(124)>>>"
write-host "JobName|JobID|LastResult|LastState"
foreach ($tapeJob in $tapeJobs)
{
$jobName = $tapeJob.Name
$jobID = $tapeJob.Id
$lastResult = $tapeJob.LastResult
$lastState = $tapeJob.LastState
write-host "$jobName|$jobID|$lastResult|$lastState"
}
This returns all our 5 Backup2Tape and 1 File2Tape jobs - and takes 76 seconds to finish. I measured only the Get-VBRTapeJob command - similar result (~70 seconds)
I now changed the script to use the alternative method:
Code: Select all
$tapeJobs = ([Veeam.Backup.Core.CBackupJob]::GetAllBackupSyncAndTape()).findLastSession()
write-host "<<<veeam_tapejobs:sep(124)>>>"
write-host "JobName|JobID|LastResult|LastState"
foreach ($tapeJob in $tapeJobs)
{
$jobName = $tapeJob.Name
$jobID = $tapeJob.Id
$lastResult = $tapeJob.result
$lastState = $tapeJob.State
write-host "$jobName|$jobID|$lastResult|$lastState"
}
This returns only the 5 Backup2Tape jobs, and takes 1.25 seconds to finish.
The rest of the script (getting all other jobs, getting the status of each single vm...) needs about 3-5 seconds.
Our backup server is not the most powerfull, but I do not think this is the problem: Xeon Silver 4110 DualCore 2.1GHz, 64GB Memory, and during the tests it did not run any task other than 2 SQL Transaction Log backups (idle at the time of the test).
Regards,
Tobias