Page 1 of 1
Exchange 2013 Invalid return from command: check_pdh
Posted: Wed Nov 07, 2018 9:21 am
by hillhealthcenter
I've configured checks for Exchange 2013 with the Exchange wizard to check the state of Remote Queue Length and Messages Pending Routing. However, both checks are returning:
Uknown - NSClient - ERROR: Invalid return from command: check_pdh
Re: Exchange 2013 Invalid return from command: check_pdh
Posted: Wed Nov 07, 2018 3:06 pm
by cdienger
The checks look for the following counters:
\\SMTP Server(_Total)\\Messages Pending Routing
\\SMTP Server(_Total)\\Remote Queue Length
Running "TypePerf.exe -q > counters.txt" on a remote system will provide a list of available counters.
If the counters do not exist then they may need to be enabled or otherwise made available. The checks can also be updated to pull new counters. \MSExchangeTransport Queues(_total)\Active Remote Delivery Queue Length for example.
Re: Exchange 2013 Invalid return from command: check_pdh
Posted: Wed Nov 07, 2018 3:10 pm
by ssax
I found this here, please check to see if you have those performance counters available:
https://blog.kmsigma.com/2016/11/08/whe ... -counters/
You should be able to run a powershell console as administrator and run the command below to view the available counters:
One thing to remember is that you may not have SMTP installed on your exchange server (you may just have IMAP, etc), the exchange wizard doesn't reach out to detect what you have available and not all options will be available in your version of Exchange, you can view a list of the most important counters here and adjust your services accordingly:
https://docs.microsoft.com/en-us/exchan ... -2013-help
Let us know if you have any questions.
Re: Exchange 2013 Invalid return from command: check_pdh
Posted: Wed Nov 07, 2018 4:08 pm
by hillhealthcenter
With your help, I figured it out.

Re: Exchange 2013 Invalid return from command: check_pdh
Posted: Wed Nov 07, 2018 4:19 pm
by ssax
That's great to hear, can you give us specifics of what the fix was so that we can have it noted for other users?
Thank you
Re: Exchange 2013 Invalid return from command: check_pdh
Posted: Wed Nov 07, 2018 4:44 pm
by hillhealthcenter
I opted to use this command:
Code: Select all
check_xi_service_nsclient!!COUNTER!-l "\MSExchangeTransport Queues(_total)\Active Mailbox Delivery Queue Length" -w 25 -c 100
Re: Exchange 2013 Invalid return from command: check_pdh
Posted: Wed Nov 07, 2018 5:00 pm
by ssax
Great thanks for the update, I'll be marking this as resolved and locking the topic.