Page 1 of 2
Monitoring Exchange 2016
Posted: Tue Dec 18, 2018 1:07 pm
by Kxfrancois
I keep getting CRITICAL - Socket timeout for all my exchange tests. do I need something installed on the exchange server for these checks to work?
Re: Monitoring Exchange 2016
Posted: Tue Dec 18, 2018 2:52 pm
by Kxfrancois
The NSClient is installed but when I go to Display the NSClient++ online with ui(SSL)
https://localhost:8443/ - I get the page can't be displayed.
Re: Monitoring Exchange 2016
Posted: Tue Dec 18, 2018 4:13 pm
by npolovenko
Hello,
@Kxfrancois. Please show me the command you're running from the Nagios server.
And from the windows server please upload the nsclient.ini and nsclient.log files.
Re: Monitoring Exchange 2016
Posted: Wed Dec 19, 2018 7:49 am
by Kxfrancois
From Nagios Server:
$USER1$/check_nt -H $HOSTADDRESS$ -s "$ARG1$" -p 12489 -v $ARG2$ $ARG3$ $ARG4$
"$ARG1$" = password
$ARG2$ = COUNTER
$ARG3$ = -l "\\SMTP Server(_Total)\\Messages Pending Routing" -w 15 -c 50
Re: Monitoring Exchange 2016
Posted: Wed Dec 19, 2018 3:20 pm
by npolovenko
@Kxfrancois, What version of the NSClient is this? Please replace you nsclient.ini file with the ini file I attached, and then restart the nsclient from the windows services menu.
Also, counters used in the Exchange 2016 server may not be compatible with the NSClient.
Failed to query performance counters
Consider using these checks instead:
https://support.nagios.com/kb/category.php?id=186
Re: Monitoring Exchange 2016
Posted: Wed Dec 26, 2018 10:10 am
by Kxfrancois
i get this error message when running the check: -l "\\SMTP Server(_Total)\\Messages Pending Routing" -w 15 -c 50
NSClient - ERROR: No performance data from command: check_pdh
Version 0.5.0062
Re: Monitoring Exchange 2016
Posted: Wed Dec 26, 2018 12:45 pm
by npolovenko
@Kxfrancois, This indicates that your Exchange server doesn't support performance counters used by the NSClient. Checks that are not using system counters are working fine, right?
You might be able to find alternative plugins on the Nagios Exchange that you can use with the NSClient instead of using the performance counters.
https://exchange.nagios.org/
https://exchange.nagios.org/index.php?o ... nge%202016
Re: Monitoring Exchange 2016
Posted: Fri Dec 28, 2018 7:46 am
by Kxfrancois
Yes, all checks that are not using counters is working. How do I add the plugin to the nsclient for checking. I downloaded NagiosMonitoring_Exchange2016QueueHealth_V2.2.ps1
Re: Monitoring Exchange 2016
Posted: Fri Dec 28, 2018 11:23 am
by npolovenko
@Kxfrancois, You'd put the script in the NSClient scripts folder:
C:\Program Files\NSClient++\scripts\
Then open the nsclient.ini filem find the external scripts section and add the following:
[/settings/external scripts/scripts]
check_mailqueue=cmd /c echo scripts\NagiosMonitoring_Exchange2016QueueHealth_V2.2.ps1; exit $LastExitCode | powershell.exe -command -
Then restart the nsclient service on the windows computer and from the Nagios server run the following command:
/usr/local/nagios/libexec/check_nrpe -H 192.168.3.145 -c check_mailqueue
*where 192.168.3.145 is the IP address of the Exchange server
Also, I highly recommend running the script within a Windows PowerShell console first to make sure it's working without errors and showing the right output.
Re: Monitoring Exchange 2016
Posted: Mon Dec 31, 2018 7:45 am
by Kxfrancois
That worked for checking the mailqueue. There was a check I had to do this: -l "\\SMTP Server(_Total)\\Remote Queue Length" -w 15 -c 30
How do I find the right command to check this using nrpe? When can I find a list of commands that could be used for nrpe?
Thanks,
Kerwin