Build precise queries to find exactly what you need
Press ESC to close
Your review has been submitted and is pending approval.
Exchange 2013 Server Health/Component Health Check for Nagios and use with NSClient/NRPE.
Current Version
1.0
Last Release Date
2013-04-13
Owner
Cameron Murray
Website
http://www.camm.id.au/?p=213
Download URL
License
GPL
Compatible With
In Exchange 2013, Microsoft has in-built monitoring of most of the services and components behind the scenes, and the status of these components and services can be polled using the Get-ServerHealth commandlet.
I have developed a powershell/plugin for Nagios to poll the in-built Exchange 2013 monitoring to return the result.
This plugin can monitor any of the following Exchange 2013 Components:
ActiveSync ActiveSync.Protocol ActiveSync.Proxy AD Antimalware AntiSpam Autodiscover Autodiscover.Protocol Autodiscover.Proxy Classification DAL Datamining DataProtection ECP ECP.Proxy EDS EventAssistants EWS EWS.Protocol EWS.Proxy FfoQuarantine FfoTransport FIPS FrontendTransport HubTransport IMAP.Protocol MailboxMigration MailboxTransport MessageTracing Monitoring MRS MSExchangeCertificateDeployment Network OAB OAB.Proxy Outlook Outlook.Protocol Outlook.Proxy OWA OWA.Protocol OWA.Protocol.Dep OWA.Proxy POP.Protocol ProcessIsolation Provisioning PublicFolders RemoteMonitoring RMS RPS RPS.Proxy RWS.Proxy Search Security SiteMailbox Store Transport TransportSync UM.CallRouter UM.Protocol UserThrottling
Set up your command in NSClient++ like this:
exchange_serverhealth=exchange/exchange-serverhealth.ps1 -HealthSet $ARG1$
And utilise by setting up a service like this (Replace COMPONENTNAME with any of the components above):
define service{ use generic-service host_name EX2013-TST-SVR1 service_description COMPONENTNAME HealthSet check_command check_nrpe!exchange_serverhealth!COMPONENTNAME }
I wanted to provoke an error by shutting down some services. The script still tells me everything is ok , for example on OWA. 19 checks OK. Any ideas?
I had to modify line 28 and add '-Identity SERVERNAME' to get it to work for me. There may be an easier way to do this, but this may be of use to someone: $HealthSetResult = (get-serverhealth -Identity SERVERNAME | Where-Object {$_.HealthSetName -eq $HealthSet})
I couldn't get this working in Nagios xi I get the error :NSClient++.cpp:1195: No handler for command: 'exchange-serverhealth' 2016-04-13 13:58:04: message:includeNSCHelper.cpp:238: No handler for command 'exchange-serverhealth'. 2016-04-13 13:58:58: message:NSClient++.cpp:1195: No handler for command: 'exchange-serverhealth' 2016-04-13 13:58:58: message:includeNSCHelper.cpp:238: No handler for command 'exchange-serverhealth
The plugin is good but has some problems which are easy to fix. I changed line 42 and 58 to $desc = "$desc" + $healthCheck.Name +"," Without this i only get the Powershell object in output text. Changed line 40 to foreach($healthCheck in DegradedHealthChecks) { and line 56 to foreach($healthCheck in $OKHealthChecks) { to get the correct counting of OK and Degraded Checks. Very Important with this and all other Checks is that you use the 64bit verion of NSClient. Without you get an error that it cant load the needed Powershell commands. Took me some time to figure this out ...
To utilise, add the following to your nsclient.ini file: [/settings/external scripts/wrapped scripts] exchange_serverhealth=exchange/exchange-serverhealth.ps1 -HealthSet $ARG1$
You must be logged in to submit a review.
To:
From: