Search Exchange

Search All Sites

Nagios Live Webinars

Let our experts show you how Nagios can help your organization.

Contact Us

Phone: 1-888-NAGIOS-1


Remember Me

Directory Tree


Current Version
Last Release Date
Compatible With
  • Nagios 3.x
  • Nagios XI
Network Monitoring Software - Download Nagios XI
Log Management Software - Nagios Log Server - Download
Netflow Analysis Software - Nagios Network Analyzer - Download
This is a Nagios Plugin destined to check the last status and last run of Symantec Backup Exec 2012 job passed as an argument.
Powershell needs to be installed on the Nagios box.

The plugin takes 2 arguments:

- Symantec Backup Exec job name
- Number of days that have to elapse since the last job run before it's assumed to be in critical state

It checks both last job status and last job run date. If the number of days that have elapsed since the last job run date is greater than the second argument the job is assumed to be in critical state. If no, last job status is checked. Based on the status then plugin returns the following exit codes:

Error - 2: critical
non Error / non Succeeded - 1: warning
Succeeded - 0: ok

It has been successfully tested on Symantec Backup Exec 2012 14.0.1798.

check_backupexec_backups.ps1 [job name] [number of days]
Reviews (3)
With my regional seetings I had to modify the script, I also added some performance datas. The modifications do start afet line 48 :

$now = (Get-Date).AddDays(-$period)
$lastend = (Get-BEJobHistory -Name $name -FromLastJobRun).EndTime.ToString("dd.MM.yyyy HH:mm")
$laststart = (Get-BEJobHistory -Name $name -FromLastJobRun).StartTime
$jobsize = (Get-BEJobHistory -Name $name -FromLastJobRun).TotalDataSizeBytes/1000000000
$jobsize = "{0:N0}" -f $jobsize
$jobduration = (Get-BEJobHistory -Name $name -FromLastJobRun).ElapsedTime.Hours*60 +(Get-BEJobHistory -Name $name -FromLastJobRun).ElapsedTime.Minutes
$name = " + $name + "

if ($now -gt $laststart)
Write-Host "CRITICAL! Last run of job: $name on $lastend."
exit 2
Write-Host "OK Job $name ($jobsize GB) completed successfully on $lastend in $jobduration minutes.|Job_size=$jobsize; Duration_minutes=$jobduration"
exit 0
byjakommo, August 7, 2013
0 of 1 people found this review helpful
My Server runs on German locale and I had to change "$now = $now.ToString("yyyy-MM-dd")" to "$now = $now.ToString("dd.MM.yyyy")" for this to work.
bytribbink, November 14, 2012
2 of 3 people found this review helpful

cmd /c echo scriptscheck_backupexec_backups.ps1 "B2D full-Full" "7" | powershell.exe -command -

always comes with critical, last night the backup ran ok. Doing something wrong?
Owner's reply


You have a typo in script execution command. There is no backslash between 'scripts' and 'check_backupexec_backups.ps1'. Also, please try double quotation of job name as on an example below:

check_backupexec_backups1 = cmd /c echo scripts\check_backupexec_backups.ps1 ""VEEAM TO TAPES-Full Backup - Monthly"" 35; exit $LastExitCode | powershell.exe -command -