Search Exchange
Search All Sites
Nagios Live Webinars
Let our experts show you how Nagios can help your organization.Login
Directory Tree
Exchange 2013 Hub Transport Queues Check (inc. performance data)
2.1
2016-11-01
- Nagios 3.x
GPL
112259
File | Description |
---|---|
NagiosMonitoring_ExchangeQueueHealth.ps1 | NagiosMonitoring_ExchangeQueueHealth.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!
This powershell plugin for the NSCP Client (former known as NSClient++) can be used to monitor the mail queues on a Microsoft Exchange 2013 hub transport servers. It will provide the amount of emails in the queues as performance data to the Nagios environment.
# History:
# Version 1.x
# Originally created by Joshua Kirkes (joshua@awesomejar.com)
# at AwesomeJar Consulting, LLC in San Francisco, CA
#
# Revision 1.1
# Created by Marc Koene
#
# Version 2.0
# Created by Bastian W.
# * Added variable for the hubserver
# * checked if PSSnapin is loaded
#
# Version 2.1
# Created by Bastian W.
# * added Nagios performance counters
Installation / Usage:
See comment inside the powershell (*.ps1) script
Howto use:
If you are new to an Nagios & NSCP Setup you can check our the following howto: http://www.admin-enclave.com/en/articles/linux/287-nagios-core-3-x-installation-guide-on-debian-8-x-jessie.html
# History:
# Version 1.x
# Originally created by Joshua Kirkes (joshua@awesomejar.com)
# at AwesomeJar Consulting, LLC in San Francisco, CA
#
# Revision 1.1
# Created by Marc Koene
#
# Version 2.0
# Created by Bastian W.
# * Added variable for the hubserver
# * checked if PSSnapin is loaded
#
# Version 2.1
# Created by Bastian W.
# * added Nagios performance counters
Installation / Usage:
See comment inside the powershell (*.ps1) script
Howto use:
If you are new to an Nagios & NSCP Setup you can check our the following howto: http://www.admin-enclave.com/en/articles/linux/287-nagios-core-3-x-installation-guide-on-debian-8-x-jessie.html
Reviews (6)
byheinzelrumpel, August 12, 2014
Hi,
sorry to bother, but I am new to nagios and I am having difficulties to understand what to configure on my nagios server and on my exchange host. I am using debian7 for nagios if this helps. As far as I understand I hav to use nrpe and must define an own service, right? Any help would be appreciated.
Regards, Heinzelrumpel
sorry to bother, but I am new to nagios and I am having difficulties to understand what to configure on my nagios server and on my exchange host. I am using debian7 for nagios if this helps. As far as I understand I hav to use nrpe and must define an own service, right? Any help would be appreciated.
Regards, Heinzelrumpel
Owner's reply
Hi, you can get in contact with me via eMail. Then I can help you with the setup. You can also check here (http://www.admin-enclave.com/en/nagios-monitoring.html) for a basic configuration and a FAQ.
bysharkbot, March 10, 2014
Few things I had to do to make the script work:
1. Set-ExecutionPolicy Unrestricted
2. check_exchange_mailqueue=cmd /c echo scriptsNagiosMonitoring_ExchangeQueueHealth.ps1; exit($lastexitcode) | PowerShell.exe -ExecutionPolicy Bypass -Command -
Without the -ExecutinPolicy Bypass, I got an AuthorizationManager error.
1. Set-ExecutionPolicy Unrestricted
2. check_exchange_mailqueue=cmd /c echo scriptsNagiosMonitoring_ExchangeQueueHealth.ps1; exit($lastexitcode) | PowerShell.exe -ExecutionPolicy Bypass -Command -
Without the -ExecutinPolicy Bypass, I got an AuthorizationManager error.
Owner's reply
Hi, yes the script need the execution policy as written inside the script. But maybe I should put a readme inside the files which can be downloaded to explain that :-).
Remeber to define the check like this, otherwise you will not get correct Exit code to nagios (critical show always as Warning).
cmd /c echo scriptsNagiosMonitoring_ExchangeQueueHealth.ps1; exit($lastexitcode) | PowerShell.exe -Command -
cmd /c echo scriptsNagiosMonitoring_ExchangeQueueHealth.ps1; exit($lastexitcode) | PowerShell.exe -Command -
byuuddlrlrbabastrt, February 18, 2013
Is there any way to exclude dismounted DB's?
I have been looking at the Get-Queue cmdlet, but haven't found anything useful yet
I have been looking at the Get-Queue cmdlet, but haven't found anything useful yet
Owner's reply
Hm, no not yet. I never found that useful. What is the reason for the dismounted DB?
I'm using this script to alert administrators via SMS messages (standalone postfix host) if there is any issues with the Exchange queue's. My external script in NSC.ini looks like this:
check_exchange_mailqueue=cmd /c echo C:\Scripts\Nagios\NagiosMonitoring_ExchangeQueueHealth.ps1 | PowerShell.exe -Command -
check_exchange_mailqueue=cmd /c echo C:\Scripts\Nagios\NagiosMonitoring_ExchangeQueueHealth.ps1 | PowerShell.exe -Command -
bymdiorio, May 10, 2012
The script works great when using it on the host, but when I tried executing it using check_nrpe, I received the following error:
Add-PSSnapin : No snap-ins have been registered for Windows PowerShell version 2.
When running PowerShell scripts on Server 2008 R2 x64, the default example will run a 32bit powershell console, not the 64bit. sysnative is a virtual directory recognized by 32bit applications to launch 64bit commands. The following in the proper nsc.ini command to get this to work:
check_exchange_queue=cmd /c echo c:NagiosExchangeQueueHealth.ps1 | C:WindowssysnativeWindowsPowerShellv1.0PowerShell.exe -Command -
Add-PSSnapin : No snap-ins have been registered for Windows PowerShell version 2.
When running PowerShell scripts on Server 2008 R2 x64, the default example will run a 32bit powershell console, not the 64bit. sysnative is a virtual directory recognized by 32bit applications to launch 64bit commands. The following in the proper nsc.ini command to get this to work:
check_exchange_queue=cmd /c echo c:NagiosExchangeQueueHealth.ps1 | C:WindowssysnativeWindowsPowerShellv1.0PowerShell.exe -Command -