From 39576534c16e8b8721ea989eec1c2aff2ab356a7 Mon Sep 17 00:00:00 2001 From: shojka7 Date: Sat, 9 Jan 2016 22:19:48 +0100 Subject: [PATCH] Update zabbix_vbr_job.ps1 Hello Please review proposed changes to monitor 'No Veeam jobs have run in the past 24h'. We encountered one problem where our Veeam license has expired and the jobs stopped processing. Although we were monitoring our server with your script, we were unaware of this critical event. This is the reason why we are amending the '24hJobCount' - Addition made by Sean Nienaber Our little contribution, please share/include this changes if you find them useful. Keep up the good work. Thank You. --- zbx-templates/zbx-veeam/zabbix_vbr_job.ps1 | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/zbx-templates/zbx-veeam/zabbix_vbr_job.ps1 b/zbx-templates/zbx-veeam/zabbix_vbr_job.ps1 index 3eb9933..f77dac4 100755 --- a/zbx-templates/zbx-veeam/zabbix_vbr_job.ps1 +++ b/zbx-templates/zbx-veeam/zabbix_vbr_job.ps1 @@ -93,6 +93,14 @@ switch ($ITEM) { } else { return "0" } + } + "24hJobCount" { + $query = Get-VBRBackupSession | where { $_.EndTime -gt ((Get-Date).AddDays(-1)) } | Measure + if ($query) { + [string]$query.Count + } else { + return "0" + } } default { Write-Host "-- ERROR -- : Need an option to work !"