Build precise queries to find exactly what you need
Press ESC to close
This contribution is a useful tool for monitoring a mission-critical IT service, namely MS Exchange. However, I had to fix a few things to get it working in my environment. These points may save you some time:
— In the mbhealth2007.ps1 script, correct the typo in AddAdd-PSSnapin Microsoft.Exchange.Management.PowerShell.Admin . Remove the extra “Add.” Comment the first Write-Host command to avoid generating unwanted output.
— Owing to the way PowerShell handles exit codes, the Nagios status code did not work as suggested. Instead, in NSC.ini for NSClient++, under [External Scripts], add the line check_mailbox_health=cmd /c echo C:”Program Files”NSClient++scriptsmbhealth2007.ps1 ; exit($lastexitcode) | powershell.exe -noprofile -command –
See http://powershell.com/cs/blogs/tips/archive/2009/05/18/returning-exit-code-from-script.aspx for more info on PowerShell exit codes. Actually the hardest part was finding out how to correctly quote “Program Files” in the NSC.ini file.
After making those changes, the Mailbox health 2007 script is working fine in my environment.
We’ve completely redesigned the world’s largest repository of Nagios plugins and monitoring tools. Join thousands of users sharing monitoring solutions for servers, applications, and everything in between.
Due to our redesign, all existing accounts require a password reset to access your account again.
Ready to explore 6,100+ projects and contribute to the community?
Reset Password Create Account
Happy Monitoring!