Home Directory Plugins Backup and Recovery Windows Server Backup 2008/7 Powershell Passive Check

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
Email: sales@nagios.com


Remember Me

Directory Tree

Windows Server Backup 2008/7 Powershell Passive Check

Current Version
Last Release Date
Compatible With
  • Nagios 3.x
  • Nagios XI
  • Nagios Fusion
Nagios Windows Backup Script V1.5.rarLatest Version
Nagios Windows Backup Script.rarOriginal Version
Network Monitoring Software - Download Nagios XI
Log Management Software - Nagios Log Server - Download
Netflow Analysis Software - Nagios Network Analyzer - Download
Windows Server Backup 2008/7 Powershell Passive Check
Checks Windows Server Backup 2008 log file and passively reports if the last backup was successful or not. Uses Task Scheduler, PowerShell, NSCAweb, and cURL. Nagios freshness checking can be used to change the status when the host does not passively report the status.

Script was written because I wanted to monitor a lot of offsite servers using Windows Server Backup. The script eliminates daily email notifications and will allow you to be alerted when the status is unknown.
Version 1.5 - Updated to show the amount of backups available in the service status information

The PowerShell Script executes by the task scheduler and dumps the Windows Server Backup log file to a text file. The script looks for the last backup date that should be present in the log if the backup is successful. If the date is not present then the backup has failed. The script sends a passive check to Nagios via NSCAweb using cURL HTTP requests indicating that the backup is successful or not.

*Script Requires NSCAweb: http://wiki.smetj.net/wiki/Nscaweb
the PowerShell script uses cURL (contained in zip file) to send HTTP requests to NSCAweb's local queue which reports to Nagios.

*The default port 5668 should be allowed inbound to the Nagios server if you are checking hosts over the internet

*No ports need to be forwarded on the monitored host's network(Uses HTTP Request to get the info to Nagios)

*The services in Nagios should be set to passive checks only

*Freshness checking should be setup so you are alerted when the passive check does not report in

*the ZIP file contains a task that can be imported and is set to launch the PowerShell script daily at 7:00AM as the system account. The task launches the script from "C:Nagios Windows Backup Script"

*The PowerShell execution policy may need to be changed for the script to run (Set-ExecutionPolicy bypass)

*Launch the PowerShell script manually to troubleshoot

3/22/2012 - Reuploaded script with "wbadmin get versions" uncommented. Had it commented for testing. Sorry.

Please let me know how this is working for you and if you have any suggestions.


Zachary Niezelski

Reviews (2)
Thanks for a very useful plugin.

The backup check will always fail if you don't have the right date format string, so check the line:
$yesterday = $date_sub1.ToString("M/d/yyyy")
In South Africa we use "yyyy/MM/dd"
bymeilon, March 21, 2012
1 of 1 people found this review helpful
I found a bug: In your download there is the line that pulls the history from wbadmin commented out. This should be enabled by default.

Also, you maybe want to use the regional settings in PowerShell to automatically determine the yesterday date value for comparison. Or add a list of known ones (Germany uses dd.MM.yyyy).

Otherwise great!
Owner's reply


Thanks for your review. I uploaded the script with that line uncommented. I'll look into the dates and see if I can make it more regional friendly.