romainsi / zabbix-VB-R-SQL

Monitore VB&R with SQL query
33 stars 15 forks source link

Feature Request - Pull the size of latest job #22

Open KodySalak opened 2 years ago

KodySalak commented 2 years ago

Hello!

Firstly, thank you for all that you do for the project. It took some tinkering to get working with my setup, but it's working like a charm now!

I was wondering if you'd be able to add the last backup/copy/etc. job's size in GB? I tried to find where that would be stored in the database and quickly gave up, but I did find Something with Veeam's PowerShell module, which is conveniently installed on every Veeam server. See below on how to get this data.

$Job=Get-VBRJob -Name "NAME-OF-BACKUP"
$Backup = Get-VBRBackup -Name $Job.Name
$Backup.FindLastInTimeStorage().Stats.BackupSize

Then, to clean it, since it's in bytes:

$Size=$Backup.FindLastInTimeStorage().Stats.BackupSize
($Size/1GB).ToString(".00")

I'm a new noob to the Zabbix world and have absolutely no idea how I would add this to a current template or your PowerShell half of this, I just think it would be cool to be able to see the stats of how big the jobs have gotten over time.

romainsi commented 2 years ago

Hello,

Yes this can be added easily, but what value should be recovered because i can't identify : image

Regards,

KodySalak commented 2 years ago

I think it would be the backup size.

Total Size - Total size of the VM Transferred - Amount transferred to storage (after compression and dedupe) Backup Size - The size of the backup Veeam captured (before compression and dedupe)

KodySalak commented 2 years ago

Heya!

Did you need any assistance with this?