Search Exchange
Search All Sites
Nagios Live Webinars
Let our experts show you how Nagios can help your organization.Login
Directory Tree
check_exchange2007Backups
1.0
2011-02-16
- Nagios 3.x
GPL
94200
File | Description |
---|---|
Check-Exchange2007Backups.ps1 | Check-Exchange2007Backups.ps1 |
Meet The New Nagios Core Services Platform
Built on over 25 years of monitoring experience, the Nagios Core Services Platform provides insightful monitoring dashboards, time-saving monitoring wizards, and unmatched ease of use. Use it for free indefinitely.
Monitoring Made Magically Better
- Nagios Core on Overdrive
- Powerful Monitoring Dashboards
- Time-Saving Configuration Wizards
- Open Source Powered Monitoring On Steroids
- And So Much More!
Use this script to check the last Exchange backup date from AD. It's written in Powershell, it works well but it is a bit of a pain to launch. From NSClient++, set up the NRPE handler like this:
[NRPE Handlers]
check_exchange2007backups = CMD /C ECHO C:\Scripts\Check-Exchange2007Backups.ps1 -w 2 -c 4 -d "CONTOSO-MAIL-01\First Storage Group\Mailbox DB 1" ; exit $LASTEXITCODE | powershell.exe -PSConsoleFile "D:\Program Files\Microsoft\Exchange Server\Bin\ExShell.psc1" -command -
That check command above should all be on one line. You pipe the command into powershell.exe and include the
$LASTEXITCODE so that Nagios can parse the state properly. Kind of round about but it works fine once it's set up. Note that the arguments to the script come right after the .ps1 extension where the script is called in the check command.
[NRPE Handlers]
check_exchange2007backups = CMD /C ECHO C:\Scripts\Check-Exchange2007Backups.ps1 -w 2 -c 4 -d "CONTOSO-MAIL-01\First Storage Group\Mailbox DB 1" ; exit $LASTEXITCODE | powershell.exe -PSConsoleFile "D:\Program Files\Microsoft\Exchange Server\Bin\ExShell.psc1" -command -
That check command above should all be on one line. You pipe the command into powershell.exe and include the
$LASTEXITCODE so that Nagios can parse the state properly. Kind of round about but it works fine once it's set up. Note that the arguments to the script come right after the .ps1 extension where the script is called in the check command.
Reviews (0)
Be the first to review this listing!