Skip to main content

Hi guys,

I have a problem when searching for information in jobs type "EpAgentBackup", in the "Backup" type I can search for all the information, but in "EpAgentBackup" I can't...

 

I would like information like the following:

 

               Job                          = $JobName

                Name                      = $jobObject.Name

                Size                         = $jobObject.ApproxSizeString

                PointsOnDisk            = $PointsOnDisk

                LastResult                = $LastResult

                LastBackupStart        = $LastBackupStart

                LastBackupTotalSize  = $BackupTotalSize

                LastBackupSize         = $BackupSize

                RepositoryPath         = $RepositoryPath

                Status                     = $jobStatus

 

Today I can't search for information via PowerShell in Agent type jobs.

Could someone please tell me if it is possible?

Thank you for all your support!


Thanks in advance
 

@diegocs082 Did you refer the below?

 

https://helpcenter.veeam.com/docs/backup/powershell/veeam_psreference.html?ver=120


Hi @liyakat_versatile 

Yes, we work with Veeam Backup & Replication 12 and create PowerShell scripts to monitor our customers' backup environments via Zabbix. But we have already tried in several ways to obtain this information for the jobtype "EpAgentBackup" but without success.


The object model for agent job handling is being reworked. Did you try Get-VBRComputerBackupJobSession already?

https://forums.veeam.com/post497164.html?hilit=epagentbackup#p497164

We are using several PS scripts to generate CSV files with all the information about VM, Agent, NAS, Plugin and SQL-TLOG sessions that did produce backups during e.g. the last 24h.

The part that produces agent data might serve you:

#agent backup jobs
$all_agent_backup_sessions = Get-VBRComputerBackupJobSession | Where-Object { $_.CreationTime -gt (Get-Date).AddHours(-$interval_in_hours)};
foreach ($backup_session in $all_agent_backup_sessions){
$session_tasks = Get-VBRTaskSession -session $backup_session
foreach ($session_task in $session_tasks){
$obj_client = $session_task.Name;
$obj_group = $session_task.JobName;
$obj_job = $session_task.Info.ObjectPlatform.Platform.ToString();
$obj_schedule = $backup_session.Progress.StartTimeLocal;
$obj_status = $session_task.Status;
$obj_level = $session_task.WorkDetails.TaskAlgorithm;
$obj_size = ($session_task.Progress.ReadSize /1024 /1024 /1024 /1024) -split ',' -join '.';
$obj_files = 1;
$obj_start = $session_task.Progress.StartTimeLocal;
$obj_stop = $session_task.Progress.StopTimeLocal;
$obj_expiry = $session_task.Progress.StartTimeLocal.AddDays(42);

#other code to push things to CSV here...
}
}

 


Hi @Michael Melter,I hope you are well.The script sent worked perfectly, now I can see everything we need for good monitoring.Thank you very much for your support.

Been a pleasure. 😀


Comment