Nscp command line checkcpu returns “Counter not found: cpu”


#1

This is a fresh install of NSClient++ on Windows Server 2003 R2 (Enterprise x64 Edition), using the latest stable release NSCP-0.4.1.105-x64.msi.

D:\Program Files\NSClient++> nscp --version  
000000014033F2A0, Version: 000000014033F248, Platform: 000000014033F218  

I am trying to figure out how to use the checkcpu command. As a start, I’m trying alias_cpu, which comes pre-defined in nsclient.ini as:

alias_cpu = checkCPU warn=80 crit=90 time=5m time=1m time=30s  

Here’s the command I’m running from the console:

D:\Program Files\NSClient++> nscp client --query alias_cpu  
e tem\PDHCollector.cpp:185  Counter not found: cpu  
ERROR: Could not get data for 5m please check log for details|  

nsclient.log shows:

2014-07-15 13:53:11: e:..\..\..\..\nscp\modules\CheckSystem\PDHCollector.cpp:185: Counter not found: cpu  

Switching out the alias for the actual command gives the same results and log entry:

D:\Program Files\NSClient++> nscp client --query checkCPU warn=80 crit=90 time=5m time=1m time=30s  
e tem\PDHCollector.cpp:185  Counter not found: cpu  
ERROR: Could not get data for 5m please check log for details|  

And other forms of the command name checkcpu and check_cpu also give the same results:

nscp client --query checkcpu warn=80 crit=90 time=5m time=1m time=30s  
nscp client --query check_cpu warn=80 crit=90 time=5m time=1m time=30s  

Things seem to be configured correctly:

D:\Program Files\NSClient++> nscp sys --validate  
Listing configured counters  
---------------------------  
cpu = \238(_total)\6: ok-rate(0)  
memory commit bytes = \4\26: ok(1.14462e+009)  
memory commit limit = \4\30: ok(4.16999e+010)  
uptime = \2\674: ok(680227)  
---------------------------  
Listed 4 of 4 counters.  

And I can query other counters:

D:\Program Files\NSClient++> nscp client --query checkcounter "\TCPv4\Connections  
 Established"  
OK all counters within bounds.|'\TCPv4\Connections Established'=22  

Any idea as to what’s going wrong with checkcpu?


#2

Hello adeconsulting

By any chance did you have any luck with a resolution to this issue? I am also being tormented by it, I don’t want to roll back, cos that would be counter productive, but I notice that posts about the Check_CPU are a number of years old, so hopefully someone has found a solution?