Page 2 of 4

Re: nsclient not working on new exchange 2016 server

Posted: Fri May 18, 2018 9:56 am
by lmiltchev
Have you restarted the NSClient++ service on the Windows server after enabling these modules? The service needs to be restarted, so that changes can take effect. Also, can you post the new (updated) nsclient.ini file?

Run the following commands from the command line on the Nagios XI server and show the output:

Code: Select all

nmap <Windows server IP address> -p 12489,5666
/usr/local/nagios/libexec/check_nt -H <Windows server IP address> -s <password> -p 12489 -v CLIENTVERSION
/usr/local/nagios/libexec/check_nrpe -H <Windows server IP address>

Re: nsclient not working on new exchange 2016 server

Posted: Fri May 18, 2018 10:25 am
by benningtonr
I did reboot the service after changes were made, here are the outputs:

[ronb@nagios ~]$ nmap 192.168.99.28 -p 12489,5666

Starting Nmap 6.47 ( http://nmap.org ) at 2018-05-18 11:21 EDT
Nmap scan report for EXCH2016.whro.local (192.168.99.28)
Host is up (0.00038s latency).
PORT STATE SERVICE
5666/tcp open nrpe
12489/tcp open unknown

Nmap done: 1 IP address (1 host up) scanned in 0.05 seconds
[ronb@nagios ~]$

[ronb@nagios ~]$ /usr/local/nagios/libexec/check_nt -H 192.168.99.28 -s xxxxxxxxx -p 12489 -v CLIENTVERSION
NSClient++ 0.5.2.35 2018-01-28
[ronb@nagios ~]$


[ronb@nagios ~]$ /usr/local/nagios/libexec/check_nrpe -H 192.168.99.28
I (0.5.2.35 2018-01-28) seem to be doing fine...
[ronb@nagios ~]$

Re: nsclient not working on new exchange 2016 server

Posted: Fri May 18, 2018 11:02 am
by lmiltchev
OK, so both commands (check_nt and check_nrpe) worked fine with NSClient++. Can you give us an example of a check that failing for you, so that we can troubleshoot it?

Note: If you checks in XI use aliases, for example:

Code: Select all

/usr/local/nagios/libexec/check_nrpe -H <ip address> -c alias_cpu
/usr/local/nagios/libexec/check_nrpe -H <ip address> -c alias_mem
/usr/local/nagios/libexec/check_nrpe -H <ip address> -c alias_disk
they will fail as your aliases are all set to "UNKNOWN"...

Re: nsclient not working on new exchange 2016 server

Posted: Fri May 18, 2018 12:04 pm
by benningtonr
Well there is this one:

[[email protected] ~]$ /usr/local/nagios/libexec/check_nt -H 192.168.99.28 -s "3Xpl0r3r" -p 12489 -v SERVICESTATE -l MSExchangeADTopology,MSExchangeAntispamUpdate,MSComplianceAudit,MSExchangeCompliance,MSExchangeDagMgmt,MSExchangeDiagnostics,MSExchangeEdgeSync,MSExchangeFastSearch,MSExchangeFrontEndTransport,MSExchangeHM,MSExchangeIS,MSExchangeMailboxAssistants,MSExchangeMailboxReplication,MSExchangeDelivery,MSExchangeRepl,MSExchangeRPC,MSExchangeServiceHost,MSExchangeThrottling,MSExchangeTransport,MSExchangeTransportLogSearch,MSExchangeUM,MSExchangeUMCR -d SHOWALL
Unknown command(s): check_service

Re: nsclient not working on new exchange 2016 server

Posted: Fri May 18, 2018 12:06 pm
by benningtonr
And this one:

[[email protected] ~]$ /usr/local/nagios/libexec/check_nt -H 192.168.99.28 -s "3Xpl0r3r" -p 12489 -v COUNTER -l "\\SMTP Server(_Total)\\Remote Queue Length" -w 25 -c 50
NSClient - ERROR: No performance data from command: check_pdh

Re: nsclient not working on new exchange 2016 server

Posted: Fri May 18, 2018 12:07 pm
by benningtonr
Then there is this one also:

[[email protected] ~]$ /usr/local/nagios/libexec/check_nt -H 192.168.99.28 -s "3Xpl0r3r" -p 12489 -v SERVICESTATE -l W3SVC -d SHOWALL
Unknown command(s): check_service

Re: nsclient not working on new exchange 2016 server

Posted: Fri May 18, 2018 12:09 pm
by benningtonr
This isn't the last one, but it is the last example i will post, i am sure they are all related in some way:

[[email protected] ~]$ /usr/local/nagios/libexec/check_nt -H 192.168.99.28 -s "3Xpl0r3r" -p 12489 -v COUNTER -l "\\SMTP Server(_Total)\\Messages Pending Routing" -w 25 -c 100
NSClient - ERROR: No performance data from command: check_pdh

Re: nsclient not working on new exchange 2016 server

Posted: Fri May 18, 2018 12:24 pm
by npolovenko
@benningtonr, I do have a modified nsclient.ini file that I like to give to customers. Please make a backup of your current nsclient.ini file, and then go ahead and replace the whole ini file with the one I'm attaching to this post. Don't forget to restart the nsclient service after you replace it.
Let us know if that fixes your problem.

Re: nsclient not working on new exchange 2016 server

Posted: Fri May 18, 2018 12:39 pm
by benningtonr
Okay, worked, but didn't work. I have a couple straglers that are being problem childeren.

Messages Pending Routing Unknown 4h 25m 58s 5/5 2018-05-18 13:37:06 NSClient - ERROR: No performance data from command: check_pdh

Remote Queue Length Unknown 4h 23m 48s 5/5 2018-05-18 13:38:22 NSClient - ERROR: No performance data from command: check_pdh

Blacklist Status Unknown 7d 4h 56m 12s 5/5 2018-05-18 13:36:53 ERROR: No response from BL server (alarm)

The core services and web services are reporting normally now. Just a few that are not .

Re: nsclient not working on new exchange 2016 server

Posted: Fri May 18, 2018 2:21 pm
by npolovenko
@benningtonr, It could be that your version of Windows Server doesn't support some system counters used by the nsclient.

You can try rebuilding the system counters on your server to see if it fixes the problem:
https://support.microsoft.com/en-us/hel ... ver-2008-6

Can you post definitions of the services that are giving you errors?