Failed to execute command: check_process & Unknown command: check_process


#1

Hey there,

trying to set up NSClient++ for the first time to use with NagiosXI

i followed the PDF steps nagios reccoment

it’s windows server 2012.r2

2016-12-01 15:44:29: error:D:\source\nscp\service\NSClient++.cpp:893: Unknown command(s): check_pdh available commands: commands {, check_drivesize, check_eventlog, check_files, checkdrivesize, checkeventlog, checkfiles, nsca_submit}, plugins {, 0, 1, 2} 2016-12-01 15:44:29: error:D:\source\nscp\include\nscapi\nscapi_core_wrapper.cpp:159: Failed to execute command 2016-12-01 15:44:29: error:D:\source\nscp\include\nscapi\nscapi_core_helper.cpp:95: Failed to execute command: check_pdh 2016-12-01 15:44:29: error:D:\source\nscp\modules\NSClientServer\NSClientServer.cpp:166: Unknown command: check_pdh 2016-12-01 15:44:30: error:D:\source\nscp\service\NSClient++.cpp:893: Unknown command(s): check_cpu available commands: commands {, check_drivesize, check_eventlog, check_files, checkdrivesize, checkeventlog, checkfiles, nsca_submit}, plugins {, 0, 1, 2} 2016-12-01 15:44:30: error:D:\source\nscp\include\nscapi\nscapi_core_wrapper.cpp:159: Failed to execute command 2016-12-01 15:44:30: error:D:\source\nscp\include\nscapi\nscapi_core_helper.cpp:95: Failed to execute command: check_cpu 2016-12-01 15:44:30: error:D:\source\nscp\modules\NSClientServer\NSClientServer.cpp:164: check_cpu failed to execute have you loaded CheckSystem? ([/modules] CheckSystem=enabled) 2016-12-01 15:44:32: error:D:\source\nscp\service\NSClient++.cpp:893: Unknown command(s): check_pdh available commands: commands {, check_drivesize, check_eventlog, check_files, checkdrivesize, checkeventlog, checkfiles, nsca_submit}, plugins {, 0, 1, 2} 2016-12-01 15:44:32: error:D:\source\nscp\include\nscapi\nscapi_core_wrapper.cpp:159: Failed to execute command 2016-12-01 15:44:32: error:D:\source\nscp\include\nscapi\nscapi_core_helper.cpp:95: Failed to execute command: check_pdh 2016-12-01 15:44:32: error:D:\source\nscp\modules\NSClientServer\NSClientServer.cpp:166: Unknown command: check_pdh 2016-12-01 15:44:53: error:D:\source\nscp\service\NSClient++.cpp:893: Unknown command(s): check_memory available commands: commands {, check_drivesize, check_eventlog, check_files, checkdrivesize, checkeventlog, checkfiles, nsca_submit}, plugins {, 0, 1, 2} 2016-12-01 15:44:53: error:D:\source\nscp\include\nscapi\nscapi_core_wrapper.cpp:159: Failed to execute command 2016-12-01 15:44:53: error:D:\source\nscp\include\nscapi\nscapi_core_helper.cpp:95: Failed to execute command: check_memory 2016-12-01 15:44:53: error:D:\source\nscp\modules\NSClientServer\NSClientServer.cpp:164: check_memory failed to execute have you loaded CheckSystem? ([/modules] CheckSystem=enabled) 2016-12-01 15:44:54: error:D:\source\nscp\service\NSClient++.cpp:893: Unknown command(s): check_pdh available commands: commands {, check_drivesize, check_eventlog, check_files, checkdrivesize, checkeventlog, checkfiles, nsca_submit}, plugins {, 0, 1, 2} 2016-12-01 15:44:54: error:D:\source\nscp\include\nscapi\nscapi_core_wrapper.cpp:159: Failed to execute command 2016-12-01 15:44:54: error:D:\source\nscp\include\nscapi\nscapi_core_helper.cpp:95: Failed to execute command: check_pdh 2016-12-01 15:44:54: error:D:\source\nscp\modules\NSClientServer\NSClientServer.cpp:166: Unknown command: check_pdh 2016-12-01 15:45:06: error:D:\source\nscp\service\NSClient++.cpp:893: Unknown command(s): check_process available commands: commands {, check_drivesize, check_eventlog, check_files, checkdrivesize, checkeventlog, checkfiles, nsca_submit}, plugins {, 0, 1, 2} 2016-12-01 15:45:06: error:D:\source\nscp\include\nscapi\nscapi_core_wrapper.cpp:159: Failed to execute command 2016-12-01 15:45:06: error:D:\source\nscp\include\nscapi\nscapi_core_helper.cpp:95: Failed to execute command: check_process 2016-12-01 15:45:06: error:D:\source\nscp\modules\NSClientServer\NSClientServer.cpp:166: Unknown command: check_process

here’s my config file

If you want to fill this file with all avalible options run the following command:

nscp settings --generate --add-defaults --load-all

If you want to activate a module and bring in all its options use:

nscp settings --activate-module --add-defaults

For details run: nscp settings --help

; Undocumented section [/settings/default]

; CACHE ALLOWED HOSTS - If host names (DNS entries) should be cached, improves speed and security somewhat but won’t allow you to have dynamic IPs for your Nagios server. cache allowed hosts = true

; ALLOWED HOSTS - A comaseparated list of allowed hosts. You can use netmasks (/ syntax) or * to create ranges. allowed hosts = 10.253.0.57,10.105.0.65

; TIMEOUT - Timeout when reading packets on incoming sockets. If the data has not arrived within this time we will bail out. timeout = 30

; PASSWORD - Password used to authenticate against server password = cottage

; BIND TO ADDRESS - Allows you to bind server to a specific local address. This has to be a dotted ip address not a host name. Leaving this blank will bind to all available IP addresses. bind to =

; Undocumented section [/modules]

; Undocumented key CheckExternalScripts = 0

; Undocumented key CheckHelpers = 0

; Undocumented key CheckNSCP = 0

; Undocumented key CheckSystem = 0

; Undocumented key NRPEServer = 0

; Scheduler - Use this to schedule check commands and jobs in conjunction with for instance passive monitoring through NSCA Scheduler = 1

; NSCAClient - NSCA client can be used both from command line and from queries to submit passive checks via NSCA NSCAClient = enabled

; NSClientServer - A server that listens for incoming check_nt connection and processes incoming requests. NSClientServer = 1

; CheckEventLog - Check for errors and warnings in the event log. CheckEventLog = 1

; CheckDisk - CheckDisk can check various file and disk related things. CheckDisk = 1

; Configure log file properties. [/settings/log/file]

; MAXIMUM FILE SIZE - When file size reaches this it will be truncated to 50% if set to 0 (default) truncation will be disabled max size = 0

; Section for configuring the log handling. [/settings/log]

; LOG LEVEL - Log level to use. Available levels are error,warning,info,debug,trace level = info

; DATEMASK - The size of the buffer to use when getting messages this affects the speed and maximum size of messages you can recieve. date format = %Y-%m-%d %H:%M:%S

; FILENAME - The file to write log data to. Set this to none to disable log to file. file name = ${exe-path}/nsclient.log

; Section for configuring the shared session. [/settings/shared session]

; ENABLE THE SAHRED SESSION - This is currently not added in 0.4.x enabled = false

; Section for configuring the crash handler. [/settings/crash]

; SUBMISSION URL - The url to submit crash reports to submit url = https://crash.nsclient.org/post

; RESTART SERVICE NAME - The url to submit crash reports to restart target = NSCP

; RESTART - Submit crash reports to nsclient.org (or your configured submission server) restart = true

; ARCHIVE CRASHREPORTS - Archive crash reports in the archive folder archive = true

; SUBMIT CRASHREPORTS - Submit crash reports to nsclient.org (or your configured submission server) submit = false

; CRASH ARCHIVE LOCATION - The folder to archive crash dumps in archive folder = ${shared-path}/crash-dumps

; Files to be included in the configuration [/includes]

[/paths]

; Path for certificate-path - certificate-path = ${shared-path}/security

; Path for module-path - module-path = ${shared-path}/modules

; Path for shared-path - shared-path = C:\Program Files\NSClient++

; Path for exe-path - exe-path = C:\Program Files\NSClient++

; Section for the Scheduler module. [/settings/scheduler]

; THREAD COUNT - Number of threads to use. threads = 5

; A set of options to configure the real time checks [/settings/eventlog/real-time]

; DEBUG - Log missed records (useful to detect issues with filters) not useful in production as it is a bit of a resource hog. debug = false

; REAL TIME CHECKING - Spawns a background thread which detects issues and reports them back instantly. enabled = false

; LOGS TO CHECK - Comma separated list of logs to check log = application,system

; STARTUP AGE - The initial age to scan when starting NSClient++ startup age = 30m

; Section for the Scheduler module. [/settings/scheduler/schedules]

; Section for NSClient (NSClientServer.dll) (check_nt) protocol options. [/settings/NSClient/server]

; PERFORMANCE DATA - Send performance data back to Nagios (set this to 0 to remove all performance data). performance data = true

; PORT NUMBER - Port to use for check_nt. port = 12489

; ENABLE SSL ENCRYPTION - This option controls if SSL should be enabled. use ssl = false

; Section for the EventLog Checker (CheckEventLog.dll). [/settings/eventlog]

; SYNTAX - Set this to use a specific syntax string for all commands (that don’t specify one). syntax =

; DEBUG - Log more information when filtering (useful to detect issues with filters) not useful in production as it is a bit of a resource hog. debug = false

; BUFFER_SIZE - The size of the buffer to use when getting messages this affects the speed and maximum size of messages you can recieve. buffer size = 131072

; LOOKUP NAMES - Lookup the names of eventlog files lookup names = true

; A set of filters to use in real-time mode [/settings/eventlog/real-time/filters]

; FILTER DEFENITION - For more configuration options add a dedicated section default =

; Target definition for: default [/settings/NSCA/client/targets/default]

; VERIFY MODE - verify mode = none

; ENCRYPTION - Name of encryption algorithm to use. Has to be the same as your server i using or it wont work at all.This is also independent of SSL and generally used instead of SSL. Available encryption algorithms are: none = No Encryption (not safe) xor = XOR des = DES 3des = DES-EDE3 cast128 = CAST-128 xtea = XTEA blowfish = Blowfish twofish = Twofish rc2 = RC2 aes128 = AES aes192 = AES aes = AES serpent = Serpent gost = GOST encryption = aes

; ALLOWED CIPHERS - A better value is: ALL:!ADH:!LOW:!EXP:!MD5:@STRENGTH allowed ciphers = ADH

; TARGET ADDRESS - Target host address address =

; ENABLE SSL ENCRYPTION - This option controls if SSL should be enabled. use ssl = 0

; PASSWORD - The password to use. Again has to be the same as the server or it wont work at all. password = cottage

; SSL CERTIFICATE - certificate =

; TIMEOUT - Timeout when reading/writing packets to/from sockets. timeout = 30

; Section for NSCA passive check module. [/settings/NSCA/client]

; HOSTNAME - The host name of the monitored computer. Set this to auto (default) to use the windows name of the computer. auto Hostname ${host} Hostname ${host_lc} Hostname in lowercase ${host_uc} Hostname in uppercase ${domain} Domainname ${domain_lc} Domainname in lowercase ${domain_uc} Domainname in uppercase hostname = auto

; CHANNEL - The channel to listen to. channel = NSCA