BackupExec

check_backupexec_backups

Description:

This is a Nagios Plugin destined to check the last status and last run of Symantec Backup Exec 2012 job passed as an argument.

Current Version

1.0

Last Release Date

2012-11-13

Compatible With

  • Nagios 3.x
  • Nagios XI

Owner

License

GPL


Project Files
Project Notes
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. Usage: check_backupexec_backups.ps1 [job name] [number of days]
Reviews (3) Add a Review
Wrote some modifications
by RedFish, April 30, 2016

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 } else { $jobsize=$jobsize+"B" Write-Host "OK Job $name ($jobsize GB) completed successfully on $lastend in $jobduration minutes.|Job_size=$jobsize; Duration_minutes=$jobduration" exit 0 }



localization
by jakommo, August 31, 2013

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.



Always critical
by tribbink, November 30, 2012

Hi 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?



Add a Review

You must be logged in to submit a review.

Thank you for your review!

Your review has been submitted and is pending approval.

Recommend

To:


From:


Thank you for your recommendation!

Your recommendation has been sent.

Project Stats
Rating
4 (4)
Favorites
0
Views
54,319