NSClient++ Help (#1) - Errors for unknown counters (#980) - Message List
I try to chech CPUload for XP, but there are some lines from test mode. Is this a bug in NSClient?
Output from test mode:
d rvice\NSClient++.cpp:298 Found: CheckExternalScripts
d rvice\NSClient++.cpp:298 Found: CheckSystem
d rvice\NSClient++.cpp:298 Found: NSCAClient
d rvice\NSClient++.cpp:298 Found: Scheduler
d rvice\NSClient++.cpp:830 addPlugin(C:/Program Files/NSClient++//modules/CheckExternalScripts.dll as )
d rvice\NSClient++.cpp:830 addPlugin(C:/Program Files/NSClient++//modules/CheckSystem.dll as )
d rvice\NSClient++.cpp:830 addPlugin(C:/Program Files/NSClient++//modules/NSCAClient.dll as )
d rvice\NSClient++.cpp:830 addPlugin(C:/Program Files/NSClient++//modules/Scheduler.dll as )
d rvice\NSClient++.cpp:807 Loading plugin: Check External Scripts
d rvice\NSClient++.cpp:807 Loading plugin: CheckSystem
d rvice\NSClient++.cpp:807 Loading plugin: NSCAClient
d tem\PDHCollector.cpp:91 Loading counters...
d tem\PDHCollector.cpp:94 Loading counter: memory commit limit = \4\30
d tem\PDHCollector.cpp:103 Counter status: -1073738816: Unable to parse the counter path. Check the format and syntax of the specified path.
d tem\PDHCollector.cpp:94 Loading counter: cpu = \238(_total)\6
d rvice\NSClient++.cpp:807 Loading plugin: Scheduler
d eduler\Scheduler.cpp:64 Adding scheduled item: test-cpu[0] = {alias: test-cpu, command: CheckCPU, channel: NSCA, target_id: , duration: 5}
d eduler\Scheduler.cpp:79 Thread count: 5
d rvice\NSClient++.cpp:604 NSClient++ - 0,4,0,172 2012-05-08 Started!
l ce\simple_client.hpp:32 Enter command to inject or exit to terminate...
d tem\PDHCollector.cpp:103 Counter status: -1073738824: The specified object is not found on the system.
d tem\PDHCollector.cpp:94 Loading counter: memory commit bytes = \4\26
d tem\PDHCollector.cpp:103 Counter status: -1073738816: Unable to parse the counter path. Check the format and syntax of the specified path.
d tem\PDHCollector.cpp:94 Loading counter: uptime = \2\674
d tem\PDHCollector.cpp:103 Counter status: -1073738816: Unable to parse the counter path. Check the format and syntax of the specified path.
e tem\PDHCollector.cpp:115 Failed to open performance counters: \4\30: PdhAddCounter failed: -1073738823: The specified counter could not be found.
e tem\PDHCollector.cpp:152 No performance counters were found we will not wait for the end instead...
d rvice\NSClient++.cpp:923 Injecting: checkcpu...
Ini file
; Undocumented section
[/modules]
; Undocumented key
CheckDisk = 0
; Undocumented key
CheckEventLog = 0
; Undocumented key
CheckExternalScripts = 1
; Undocumented key
CheckHelpers = 0
; Undocumented key
CheckNSCP = 0
; Undocumented key
CheckSystem = 1
; CheckWMI - CheckWMI can check various file and disk related things. The current version has commands to check Size of hard drives and directories.
;CheckWMI = 1
; NSCAClient - Passive check support (needs NSCA on nagios server). Avalible crypto are: {0=No Encryption (not safe), 1=XOR, 2=DES, 3=DES-EDE3, 4=CAST-128, 6=XTEA, 8=Blowfish, 9=Twofish, 11=RC2, 14=AES, 15=AES, 16=AES, 20=Serpent, 23=GOST}
NSCAClient = 1
Scheduler = 1
; Section for NSCA passive check module.
[/settings/NSCA/client]
hostname = test_passive
; Target definition for: default
[/settings/NSCA/client/targets/default]
encryption = 2
password = 123
host = 80.68.65.139
port = 5697
; Section for configuring the crash handler.
[/settings/crash]
[/settings/check/system/windows]
CPUBufferSize = 30m
[/settings/external scripts]
command timeout = 8
allow arguments = 1
allow nasty characters = 0
[/settings/external scripts/wrappings]
bat=scripts/%SCRIPT% %ARGS%
; Section for configuring the log handling.
[/settings/log]
file name = c:\log\nsclient.log
; Configure log file properties.
[/settings/log/file]
[/settings/scheduler/schedules]
test-cpu=CheckCPU ShowAll=long warn=80 crit=90 time=20s time=10s time=4
[/settings/scheduler/schedules/default]
interval = 5
; Section for configuring the shared session.
[/settings/shared session]
; A list of avalible remote target systems
[/settings/targets]
-
Message #2599
Here is my ini:
[/modules] CheckDisk = 1 CheckEventLog = 1 CheckExternalScripts = 1 CheckHelpers = 1 CheckNSCP = 1 CheckSystem = 1 CheckWMI = 1 NRPEServer = 1 NSCAClient = 1 NSClientServer = 1 Scheduler = 1 [/settings/NSCA/client] hostname = martinpc [/settings/NSCA/client/targets/default] encryption = 1 host = 192.168.0.110 password = xxxxxx port = 5667 [/settings/scheduler/schedules/default] channel = NSCA interval = 10s report = all [/settings/external scripts] command timeout = 60 allow arguments = true allow nasty characters = true [/settings/external scripts/alias] a-check-win-cpu = checkCPU warn=$ARG1$ crit=$ARG2$ time=20m time=5m time=5s [/settings/log] date mask = %Y-%m-%d %H:%M:%S [/settings/scheduler/default] interval = 10s [/settings/scheduler/schedules] cpu_check = a-check-win-cpu "80" "90"
i doesnt see any reason why yours shouldnt work, but try this method! its bit different cause im using Makros... hope that can help you!
tjtj805/18/12 09:51:41 (12 months ago) -
Message #2601
Are the counters working at all? There are some fixes when indexes are broken.
Might wanan try:
nscp client --module checksystem --exec debugpdh
You can also override the counters manually (ie. to not use indexes) with the following in your config (assuming you are using new-ini syntax)
; Section for system checks and system settings [/settings/check/system/windows] ; DEFAULT COUNTERS - Load the default counters: cpu, memory commit bytes, memory commit limit and uptime If not you need to specify these manually. default = false [/settings/check/system/windows/pdh/counters] memory commit limit = \4\30 cpu = \238(_total)\6 memory commit bytes = \4\26 uptime = \2\674
Replace the various values with what you have on your system (you can find them easily from performance monitor)
Michael Medin
mickem05/19/12 08:35:07 (12 months ago)-
Message #2685
I'm having the same issue, and tried the suggestions here w/o luck
I'm a newbie to NSClient++, and I'm in very deep weeds.
Let's start with two questions:
1) Should running nscp client --module checksystem --exec debugpdh be fixing something on it's own, or should I be picking through the output for some kind of message telling me what's wrong?
2) I'm happy to do the configuration manually, but I'm not finding the codes (e.g. \4\30, \4\26) in perfmon. Can someone get me started?
Installation Details:
I've installed the 0.4.0 version on my Win7 64-bit machine. I asked it for a typical installation, installing everything EXCEPT the item that says "don't install this if you don't need it".
chriscurvey07/12/12 16:44:41 (11 months ago)-
Message #2689
First the command will simply try to open all counters. it is just a sanity check. (wont help really, and requires you to see if there are any errors).
And you can replace \4\30 with "your real localized name" counter such as \\Memory\\committed bytes...
Michael Medin
mickem07/12/12 22:06:33 (11 months ago)
-
-








