Failed to load C:\Program Files\NSClient++/modules\CheckExternalScripts.dll: Could not load NSLoadModuleEx


#1

Hey i have installed nsclient 0.5.1.44 , but checks are showing UNKNOWN ( Unknown command(s): checkcpu ) On running nscp test i am getting this :

> C:\Program Files\NSClient++>nscp test
> D     core NSClient++ 0.5.1.44 2017-08-30 x64 Loading settings and logger...
> D       core Settings not ready so we cant lookup: base-path
> D       core Settings not ready so we cant lookup: exe-path
> D   settings Boot.ini found in: C:\Program Files\NSClient++/boot.ini
> D       core Settings not ready so we cant lookup: shared-path
> D   settings Activating: ini://${shared-path}/nsclient.ini
> D   settings Creating instance for: ini://${shared-path}/nsclient.ini
> D       core Settings not ready so we cant lookup: shared-path
> D   settings Loading: C:\Program Files\NSClient++/nsclient.ini
> D       core NSClient++ 0.5.1.44 2017-08-30 x64 booting...
> D       core Booted settings subsystem...
> D       core On crash: restart: NSCP
> D       core Archiving crash dumps in: C:\Program Files\NSClient++/crash-dumps
> D       core booting::loading plugins
> D       core Found: CheckExternalScripts
> D       core Found: NRPEServer
> D       core Found: NSClientServer
> D       core C:\Program Files\NSClient++/modules\CheckExternalScripts.dll.dll
> D       core adding C:\Program Files\NSClient++/modules\CheckExternalScripts.dll
> E       core Failed to load C:\Program Files\NSClient++/modules\CheckExternalScripts.dll: Could not load NSLoadModuleEx
>                     c:\source\master\service\NSClient++.cpp:388
> D       core C:\Program Files\NSClient++/modules\NRPEServer.dll.dll
> D       core adding C:\Program Files\NSClient++/modules\NRPEServer.dll
> D       core C:\Program Files\NSClient++/modules\NSClientServer.dll.dll
> D       core adding C:\Program Files\NSClient++/modules\NSClientServer.dll
> D       core Loading plugin: NRPEServer
> D       nrpe Allowed hosts definition: 172.17.40.35(255.255.255.255)
> D       nrpe Server config: address: :5666, ssl enabled: none, no certificate, dh: C:\Program Files\NSClient++/security/
> nrpe_dh_512.pem, ciphers: ADH, ca: C:\Program Files\NSClient++/security/ca.pem, options: no-sslv2,no-sslv3
> D       nrpe Binding to: [::]:5666(ipv6)
> D       nrpe Attempting to bind to: [::]:5666(ipv6)
> D       nrpe Binding to: 0.0.0.0:5666(ipv4), reopen: true, reuse: true
> D       nrpe Attempting to bind to: 0.0.0.0:5666(ipv4)
> D       core Loading plugin: NSClientServer
> D   check_nt Allowed hosts definition: 127.0.0.1(255.255.255.255)
> D   check_nt Binding to: [::]:12489(ipv6)
> D   check_nt Attempting to bind to: [::]:12489(ipv6)
> D   check_nt Binding to: 0.0.0.0:12489(ipv4), reopen: true, reuse: true
> D   check_nt Attempting to bind to: 0.0.0.0:12489(ipv4)
> D       core NSClient++ - 0.5.1.44 2017-08-30 Started!
> D       core C:\Program Files\NSClient++/modules\CommandClient.dll.dll
> D       core adding C:\Program Files\NSClient++/modules\CommandClient.dll
> D       core Loading plugin: CommandClient...
> D        cli Enter command to execute, help for help or exit to exit...

#2

Here is the nsclient.ini file

# If you want to fill this file with all available 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 <MODULE NAME> --add-defaults
# For details run: nscp settings --help


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

; FILENAME - The file to write log data to. Set this to none to disable log to file.
file name = nsclient.log


; NRPE SERVER SECTION - Section for NRPE (NRPEServer.dll) (check_nrpe) protocol options.
[/settings/NRPE/server]

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

; COMMAND ALLOW NASTY META CHARS - This option determines whether or not the we will allow clients to specify nasty (as in |`&><'"\[]{}) characters in arguments.
allow nasty characters = true

; COMMAND ARGUMENT PROCESSING - This option determines whether or not the we will allow clients to specify arguments to commands that are executed.
allow arguments = true
allowed hosts = 172.17.40.35
insecure = true
verify mode = none
port = 5666 
ssl options = no-sslv2,no-sslv3 

[/paths]

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

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

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

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

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

; External script settings - General settings for the external scripts module (CheckExternalScripts).
[/settings/external scripts]

; Allow certain potentially dangerous characters in arguments - This option determines whether or not the we will allow clients to specify nasty (as in |`&><'"\[]{}) characters in arguments.
allow nasty characters = true

; Allow arguments when executing external scripts - This option determines whether or not the we will allow clients to specify arguments to commands that are executed.
allow arguments = true


; Script wrappings - A list of templates for defining script commands. Enter any command line here and they will be expanded by scripts placed under the wrapped scripts section. %SCRIPT% will be replaced by the actual script an %ARGS% will be replaced by any given arguments.
[/settings/external scripts/wrappings]

; WRAPPING - An external script wrapping
ps1 = cmd /c echo scripts\%SCRIPT% %ARGS%; exit($lastexitcode) | powershell.exe -command -

; WRAPPING - An external script wrapping
bat = scripts\%SCRIPT% %ARGS%

; WRAPPING - An external script wrapping
vbs = cscript.exe //T:30 //NoLogo scripts\lib\wrapper.vbs %SCRIPT% %ARGS%


; 
[/settings/default]


; External scripts - A list of scripts available to run from the CheckExternalScripts module. Syntax is: `command=script arguments`
[/settings/external scripts/scripts]

volumerecovery = cmd /c echo scripts\VolumeRecoveryCheck.ps1; exit($lastexitcode)| powershell.exe -command -
mysqlbackupstatus = cmd /c echo python scripts\mysqlbackupstatus.py ; exit($lastexitcode)| powershell.exe -command -
count_user_disabled = sqlcmd -d fix -S localhost -E -Q "SET NOCOUNT ON;SELECT count(*) FROM fix.dbo.process_list where datetime < GETDATE() and datetime > DATEADD(minute, -5, GETDATE()) and Tag = 'user_disabled'" -h -1 -W
count_reconfig_ftp_domain = sqlcmd -d fix -S localhost -E -Q "SET NOCOUNT ON;SELECT count(*) FROM fix.dbo.process_list where datetime < GETDATE() and datetime > DATEADD(minute, -5, GETDATE()) and Tag = 'reconfig_ftp_domain'" -h -1 -W
dpmalert = cmd /c echo scripts\AlertCheck.ps1; exit($lastexitcode)| powershell.exe -command -
count_mssql_databases = sqlcmd -S localhost -E -Q "SET NOCOUNT ON;select count(*) from sys.databases" -h -1 -W
count_enable_mail_domain = sqlcmd -d fix -S localhost -E -Q "SET NOCOUNT ON;SELECT count(*) FROM fix.dbo.process_list where datetime < GETDATE() and datetime > DATEADD(minute, -5, GETDATE()) and Tag = 'enable_mail_domain'" -h -1 -W
count_disable_mail_domain = sqlcmd -d fix -S localhost -E -Q "SET NOCOUNT ON;SELECT count(*) FROM fix.dbo.process_list where datetime < GETDATE() and datetime > DATEADD(minute, -5, GETDATE()) and Tag = 'disable_mail_domain'" -h -1 -W
count_Auth_popup = sqlcmd -d fix -S localhost -E -Q "SET NOCOUNT ON;SELECT count(*) FROM fix.dbo.process_list where datetime < GETDATE() and datetime > DATEADD(minute, -5, GETDATE()) and Tag = 'Auth_popup'" -h -1 -W
check_vm = cmd /c echo scripts\check_vm.ps1; exit($lastexitcode)| powershell.exe -command -
check_testsuit = cmd /c echo scripts\check_testsuit.ps1; exit($lastexitcode)| powershell.exe -command -
systemrecovery = cmd /c echo scripts\SystemRecoveryCheck.ps1; exit($lastexitcode)| powershell.exe -command -
check_tcp_connections_count = cmd /c echo scripts\tcp_connection.ps1 ; exit($lastexitcode)| powershell.exe -command -
check_smtpsink = cmd /c echo scripts\smtpsink_nagios.ps1; exit($lastexitcode)| powershell.exe -command -
check_sdnlist = cmd /c echo python scripts\check_sdnlist.py ; exit($lastexitcode)| powershell.exe -command -
check_pxe = cmd /c echo scripts\pxe.ps1; exit($lastexitcode)| powershell.exe -command -
count_spamstats = sqlcmd -d fix -S localhost -E -Q "SET NOCOUNT ON;SELECT SUM(MailCount) FROM fix.dbo.abuse_smtp where SQLDate < GETDATE() and SQLDate > DATEADD(minute, -5, GETDATE())" -h -1 -W
check_perf_counter = scripts\performance_counter.bat $ARG1$
check_mysqlremote = cmd /c echo python scripts\check_mysqlremote.py ; exit($lastexitcode)| powershell.exe -command -
check_firewall = cmd /c echo scripts\check_firewall.ps1; exit($lastexitcode)| powershell.exe -command -
check_checkpoint_count = cmd /c echo scripts\check_checkpoint_count.ps1; exit($lastexitcode)| powershell.exe -command -
count_Remove_mail_domain = sqlcmd -d fix -S localhost -E -Q "SET NOCOUNT ON;SELECT count(*) FROM fix.dbo.process_list where datetime < GETDATE() and datetime > DATEADD(minute, -5, GETDATE()) and Tag = 'Remove_mail_domain'" -h -1 -W
check_vhdx_count = cmd /c echo scripts\check_vhdx_count.ps1; exit($lastexitcode)| powershell.exe -command -
check_mssqlremote = cmd /c echo python scripts\check_mssqlremote.py ; exit($lastexitcode)| powershell.exe -command -
check_smtp = cmd /c echo python scripts\check_smtp.py ; exit($lastexitcode)| powershell.exe -command -
check_dns = cmd /c echo python scripts\check_dns.py ; exit($lastexitcode)| powershell.exe -command -
check_openmanage = modules\check_openmanage.exe -b pdisk_cert=all
check_hwcheck = scripts\hwcheck.bat
count_Reconfig_mail_domain = sqlcmd -d fix -S localhost -E -Q "SET NOCOUNT ON;SELECT count(*) FROM fix.dbo.process_list where datetime < GETDATE() and datetime > DATEADD(minute, -5, GETDATE()) and Tag = 'Reconfig_mail_domain'" -h -1 -W
check_ip = cmd /c echo scripts\ipcheck.ps1; exit($lastexitcode)| powershell.exe -command -
diskusage = cmd /c echo scripts\diskusage.ps1; exit($lastexitcode)| powershell.exe -command -
count_iis_sites = cmd /c sqlcmd -d psa -S localhost -E -Q "SET NOCOUNT ON;select count(*) from domains" -h -1 -W
check_smtp_queue = cmd /c echo scripts\smtp_queuelength.ps1 $ARG1$ $ARG2$; exit($lastexitcode)| powershell.exe -command -


; Command aliases - A list of aliases for already defined commands (with arguments). An alias is an internal command that has been predefined to provide a single command without arguments. Be careful so you don't create loops (ie check_loop=check_a, check_a=check_loop)
[/settings/external scripts/alias]

; ALIAS - Query alias
check_ok = CheckOK Everything is fine!
alias_service = checkServiceState CheckAll
alias_process = checkProcState $ARG1$=started
alias_mem = checkMem MaxWarn=80% MaxCrit=90% ShowAll type=physical
alias_event_log_old = CheckEventLog file=application file=system filter=new filter=out MaxWarn=1 MaxCrit=1 filter-generated=>2d filter-severity==success filter-severity==informational truncate=800 unique descriptions  "syntax=%severity%: %source%: %message% (%count%)"
alias_up = checkUpTime MinWarn=1d MinWarn=1h
alias_event_log_new = CheckEventLog file=application file=system MaxWarn=1 MaxCrit=1 "filter=generated gt -2d AND severity NOT IN ('success', 'informational')" truncate=800 unique descriptions "syntax=%severity%: %source%: %message% (%count%)"
alias_file_size_in_dir = checkFile2 filter=out pattern=*.txt "file=$ARG1$" filter-size=>$ARG2$ MaxWarn=1 MaxCrit=1 "syntax=%filename% %size%"
alias_event_log = alias_event_log_new
alias_cpu_ex = checkCPU warn=$ARG1$ crit=$ARG2$ time=5m time=1m time=30s
alias_file_age = checkFile2 filter=out "file=$ARG1$" filter-written=>1d MaxWarn=1 MaxCrit=1 "syntax=%filename% %write%"
alias_cpu = checkCPU warn=80 crit=90 time=5m time=1m time=30s
alias_file_size = checkFile2 filter=out "file=$ARG1$" filter-size=>$ARG2$ MaxWarn=1 MaxCrit=1 "syntax=%filename% %size%"
alias_disk = CheckDriveSize MinWarn=10% MinCrit=5% CheckAll FilterType=FIXED


; MODULES - A list of modules.
[/modules]
NRPEServer = enabled
CheckExternalScripts = enabled
CheckHelpers = disabled
CheckEventLog = disabled
CheckDisk = disabled
CheckSystem = disabled
NSClientServer = enabled

; LOG SECTION - 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 = -1

; LOG SECTION - Configure log properties.
[/settings/log]

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

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

; 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

#3

@MickeM Please help me with this, not able to figure out why getting this error:

2018-01-17 13:10:49: error:c:\source\master\service\NSClient++.cpp:388: Failed to load C:\Program Files\NSClient++/modules\CheckExternalScripts.dll: Could not load NSLoadModuleEx
2018-01-17 13:10:49: debug:c:\source\master\service\NSClient++.cpp:687: C:\Program Files\NSClient++/modules\NRPEServer.dll.dll
2018-01-17 13:10:49: debug:c:\source\master\service\NSClient++.cpp:689: adding C:\Program Files\NSClient++/modules\NRPEServer.dll
2018-01-17 13:10:49: debug:c:\source\master\service\NSClient++.cpp:687: C:\Program Files\NSClient++/modules\NSClientServer.dll.dll
2018-01-17 13:10:49: debug:c:\source\master\service\NSClient++.cpp:689: adding C:\Program Files\NSClient++/modules\NSClientServer.dll
2018-01-17 13:10:49: debug:c:\source\master\service\NSClient++.cpp:648: Loading plugin: NRPEServer
2018-01-17 13:10:49: debug:c:\source\master\modules\NRPEServer\NRPEServer.cpp:126: Allowed hosts definition: 172.17.40.35(255.255.255.255)
2018-01-17 13:10:49: debug:c:\source\master\modules\NRPEServer\NRPEServer.cpp:127: Server config: address: :5666, ssl enabled: none, no certificate, dh: C:\Program Files\NSClient++/security/nrpe_dh_512.pem, ciphers: ADH, ca: C:\Program Files\NSClient++/security/ca.pem, options: no-sslv2,no-sslv3
2018-01-17 13:10:49: debug:c:\source\master\include\socket/server.hpp:111: Binding to: [::]:5666(ipv6)
2018-01-17 13:10:49: debug:c:\source\master\include\socket/server.hpp:214: Attempting to bind to: [::]:5666(ipv6)
2018-01-17 13:10:49: debug:c:\source\master\include\socket/server.hpp:107: Binding to: 0.0.0.0:5666(ipv4), reopen: true, reuse: true
2018-01-17 13:10:49: debug:c:\source\master\include\socket/server.hpp:214: Attempting to bind to: 0.0.0.0:5666(ipv4)
2018-01-17 13:10:49: debug:c:\source\master\service\NSClient++.cpp:648: Loading plugin: NSClientServer
2018-01-17 13:10:49: debug:c:\source\master\modules\NSClientServer\NSClientServer.cpp:87: Allowed hosts definition: 127.0.0.1(255.255.255.255)
2018-01-17 13:10:49: debug:c:\source\master\include\socket/server.hpp:111: Binding to: [::]:12489(ipv6)
2018-01-17 13:10:49: debug:c:\source\master\include\socket/server.hpp:214: Attempting to bind to: [::]:12489(ipv6)
2018-01-17 13:10:49: debug:c:\source\master\include\socket/server.hpp:107: Binding to: 0.0.0.0:12489(ipv4), reopen: true, reuse: true
2018-01-17 13:10:49: debug:c:\source\master\include\socket/server.hpp:214: Attempting to bind to: 0.0.0.0:12489(ipv4)
2018-01-17 13:10:49: debug:c:\source\master\service\NSClient++.cpp:472: NSClient++ - 0.5.1.44 2017-08-30 Started!
2018-01-17 13:10:49: debug:c:\source\master\service\NSClient++.cpp:687: C:\Program Files\NSClient++/modules\CommandClient.dll.dll
2018-01-17 13:10:49: debug:c:\source\master\service\NSClient++.cpp:689: adding C:\Program Files\NSClient++/modules\CommandClient.dll
2018-01-17 13:10:49: debug:c:\source\master\service\NSClient++.cpp:883: Loading plugin: CommandClient...
2018-01-17 13:10:49: debug:c:\source\master\modules\CommandClient\CommandClient.cpp:133: Enter command to execute, help for help or exit to exit...
2018-01-17 13:13:04: error:c:\source\master\service\NSClient++.cpp:814: Unknown command(s): checkcpu available commands: commands {}, plugins {}
2018-01-17 13:13:04: error:c:\source\master\service\NSClient++.cpp:814: Unknown command(s): checkdrivesize available commands: commands {}, plugins {}
2018-01-17 13:13:04: error:c:\source\master\service\NSClient++.cpp:814: Unknown command(s): check_mssqlremote available commands: commands {}, plugins {}
2018-01-17 13:13:04: error:c:\source\master\service\NSClient++.cpp:814: Unknown command(s): check_mysqlremote available commands: commands {}, plugins {}
2018-01-17 13:13:04: error:c:\source\master\service\NSClient++.cpp:814: Unknown command(s): checkmem available commands: commands {}, plugins {}
2018-01-17 13:13:04: error:c:\source\master\service\NSClient++.cpp:814: Unknown command(s): checkmem available commands: commands {}, plugins {}
2018-01-17 13:13:04: error:c:\source\master\service\NSClient++.cpp:814: Unknown command(s): check_sdnlist available commands: commands {}, plugins {}

I believe as the there is error in loading module, the commands are not getting executed. please guide


#4

The module should never fail to load. So this is an issue with either a broken installer or some strange happening to the binaries, could you try reinstalling NSClient++?


#5

Thanks for your suggestion, have tried to re install nsclient and it started working, but now the only concern is in one of the check (checkCPU) its showing multiple values. please refer the image below.

Attaching the nsclient.ini file with this mail. Below is the nscp test output (nscp test shows correct values i.e not repeated one ):

C:\Program Files\NSClient++>nscp test
D       core NSClient++ 0.5.1.44 2017-08-30 x64 Loading settings and logger...
D       core Settings not ready so we cant lookup: base-path
D       core Settings not ready so we cant lookup: exe-path
D   settings Boot.ini found in: C:\Program Files\NSClient++/boot.ini
D       core Settings not ready so we cant lookup: shared-path
D   settings Activating: ini://${shared-path}/nsclient.ini
D   settings Creating instance for: ini://${shared-path}/nsclient.ini
D       core Settings not ready so we cant lookup: shared-path
D   settings Loading: C:\Program Files\NSClient++/nsclient.ini
D       core NSClient++ 0.5.1.44 2017-08-30 x64 booting...
D       core Booted settings subsystem...
D       core On crash: restart: NSCP
D       core Archiving crash dumps in: C:\Program Files\NSClient++/crash-dumps
D       core booting::loading plugins
D       core Found: CheckDisk
D       core Found: CheckExternalScripts
D       core Found: CheckSystem
D       core Found: NRPEServer
D       core Found: NSClientServer
D       core C:\Program Files\NSClient++/modules\CheckDisk.dll.dll
D       core adding C:\Program Files\NSClient++/modules\CheckDisk.dll
D       core C:\Program Files\NSClient++/modules\CheckExternalScripts.dll.dll
D       core adding C:\Program Files\NSClient++/modules\CheckExternalScripts.dll
D       core C:\Program Files\NSClient++/modules\CheckSystem.dll.dll
D       core adding C:\Program Files\NSClient++/modules\CheckSystem.dll
D       core C:\Program Files\NSClient++/modules\NRPEServer.dll.dll
D       core adding C:\Program Files\NSClient++/modules\NRPEServer.dll
D       core C:\Program Files\NSClient++/modules\NSClientServer.dll.dll
D       core adding C:\Program Files\NSClient++/modules\NSClientServer.dll
D       core Loading plugin: CheckDisk
D       core Loading plugin: CheckExternalScripts
D       core Loading plugin: CheckSystem
D       core Loading plugin: NRPEServer
D       nrpe Allowed hosts definition:
D       nrpe Server config: address: :5666, ssl enabled: none, no certificate, dh: C:\Program Files\NSClient++/security/nrpe_dh_512.pem, ciphers: ADH, ca: C:\Program Files\NSClient++/security/ca.pem,
options: no-sslv2,no-sslv3
D       nrpe Binding to: [::]:5666(ipv6)
D       nrpe Attempting to bind to: [::]:5666(ipv6)
D       nrpe Binding to: 0.0.0.0:5666(ipv4), reopen: true, reuse: true
D       nrpe Attempting to bind to: 0.0.0.0:5666(ipv4)
D       core Loading plugin: NSClientServer
D   check_nt Allowed hosts definition: 127.0.0.1(255.255.255.255)
D   check_nt Binding to: [::]:12489(ipv6)
D   check_nt Attempting to bind to: [::]:12489(ipv6)
D   check_nt Binding to: 0.0.0.0:12489(ipv4), reopen: true, reuse: true
D   check_nt Attempting to bind to: 0.0.0.0:12489(ipv4)
D       core NSClient++ - 0.5.1.44 2017-08-30 Started!
D       core C:\Program Files\NSClient++/modules\CommandClient.dll.dll
D       core adding C:\Program Files\NSClient++/modules\CommandClient.dll
D       core Loading plugin: CommandClient...
D        cli Enter command to execute, help for help or exit to exit...
D  w32system Loading counter: disk_queue_length_0 C: = \\GUEST-PLESKTEST\PhysicalDisk(0 C:)\% Disk Time
D  w32system Loading counter: disk_queue_length_1 D: = \\GUEST-PLESKTEST\PhysicalDisk(1 D:)\% Disk Time
D  w32system Loading counter: disk_queue_length__Total = \\GUEST-PLESKTEST\PhysicalDisk(_Total)\% Disk Time
checKCPU
D  w32system Created command: "detail-syntax=${time}: average load ${load}%"
L        cli OK: OK: CPU load is ok.
L        cli  Performance data: 'total 5m'=0%;80;90 'total 1m'=1%;80;90 'total 5s'=1%;80;90

Not sure why its repeating. kindly help with this.


#6

Nsclient.ini

# If you want to fill this file with all available 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 <MODULE NAME> --add-defaults
# For details run: nscp settings --help


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

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


; NRPE SERVER SECTION - Section for NRPE (NRPEServer.dll) (check_nrpe) protocol options.
[/settings/NRPE/server]

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

; COMMAND ALLOW NASTY META CHARS - This option determines whether or not the we will allow clients to specify nasty (as in |`&><'"\[]{}) characters in arguments.
allow nasty characters = true

; COMMAND ARGUMENT PROCESSING - This option determines whether or not the we will allow clients to specify arguments to commands that are executed.
allow arguments = true
allowed hosts = 
insecure = true
verify mode = none
port = 5666
ssl options = no-sslv2,no-sslv3


[/paths]

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

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

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

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

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


; External script settings - General settings for the external scripts module (CheckExternalScripts).
[/settings/external scripts]

; Allow certain potentially dangerous characters in arguments - This option determines whether or not the we will allow clients to specify nasty (as in |`&><'"\[]{}) characters in arguments.
allow nasty characters = true

; Allow arguments when executing external scripts - This option determines whether or not the we will allow clients to specify arguments to commands that are executed.
allow arguments = true


; Script wrappings - A list of templates for defining script commands. Enter any command line here and they will be expanded by scripts placed under the wrapped scripts section. %SCRIPT% will be replaced by the actual script an %ARGS% will be replaced by any given arguments.
[/settings/external scripts/wrappings]

; WRAPPING - An external script wrapping
ps1 = cmd /c echo scripts\%SCRIPT% %ARGS%; exit($lastexitcode) | powershell.exe -command -

; WRAPPING - An external script wrapping
bat = scripts\%SCRIPT% %ARGS%

; WRAPPING - An external script wrapping
vbs = cscript.exe //T:30 //NoLogo scripts\lib\wrapper.vbs %SCRIPT% %ARGS%


; 
[/settings/default]


; External scripts - A list of scripts available to run from the CheckExternalScripts module. Syntax is: `command=script arguments`
[/settings/external scripts/scripts]
volumerecovery = cmd /c echo scripts\VolumeRecoveryCheck.ps1; exit($lastexitcode)| powershell.exe -command -
mysqlbackupstatus = cmd /c echo python scripts\mysqlbackupstatus.py ; exit($lastexitcode)| powershell.exe -command -
count_user_disabled = sqlcmd -d fix -S localhost -E -Q "SET NOCOUNT ON;SELECT count(*) FROM fix.dbo.process_list where datetime < GETDATE() and datetime > DATEADD(minute, -5, GETDATE()) and Tag = 'user_disabled'" -h -1 -W
count_reconfig_ftp_domain = sqlcmd -d fix -S localhost -E -Q "SET NOCOUNT ON;SELECT count(*) FROM fix.dbo.process_list where datetime < GETDATE() and datetime > DATEADD(minute, -5, GETDATE()) and Tag = 'reconfig_ftp_domain'" -h -1 -W
dpmalert = cmd /c echo scripts\AlertCheck.ps1; exit($lastexitcode)| powershell.exe -command -
count_mssql_databases = sqlcmd -S localhost -E -Q "SET NOCOUNT ON;select count(*) from sys.databases" -h -1 -W
count_enable_mail_domain = sqlcmd -d fix -S localhost -E -Q "SET NOCOUNT ON;SELECT count(*) FROM fix.dbo.process_list where datetime < GETDATE() and datetime > DATEADD(minute, -5, GETDATE()) and Tag = 'enable_mail_domain'" -h -1 -W
count_disable_mail_domain = sqlcmd -d fix -S localhost -E -Q "SET NOCOUNT ON;SELECT count(*) FROM fix.dbo.process_list where datetime < GETDATE() and datetime > DATEADD(minute, -5, GETDATE()) and Tag = 'disable_mail_domain'" -h -1 -W
count_Auth_popup = sqlcmd -d fix -S localhost -E -Q "SET NOCOUNT ON;SELECT count(*) FROM fix.dbo.process_list where datetime < GETDATE() and datetime > DATEADD(minute, -5, GETDATE()) and Tag = 'Auth_popup'" -h -1 -W
check_vm = cmd /c echo scripts\check_vm.ps1; exit($lastexitcode)| powershell.exe -command -
check_testsuit = cmd /c echo scripts\check_testsuit.ps1; exit($lastexitcode)| powershell.exe -command -
systemrecovery = cmd /c echo scripts\SystemRecoveryCheck.ps1; exit($lastexitcode)| powershell.exe -command -
check_tcp_connections_count = cmd /c echo scripts\tcp_connection.ps1 ; exit($lastexitcode)| powershell.exe -command -
check_smtpsink = cmd /c echo scripts\smtpsink_nagios.ps1; exit($lastexitcode)| powershell.exe -command -
check_sdnlist = cmd /c echo python scripts\check_sdnlist.py ; exit($lastexitcode)| powershell.exe -command -
check_pxe = cmd /c echo scripts\pxe.ps1; exit($lastexitcode)| powershell.exe -command -
count_spamstats = sqlcmd -d fix -S localhost -E -Q "SET NOCOUNT ON;SELECT SUM(MailCount) FROM fix.dbo.abuse_smtp where SQLDate < GETDATE() and SQLDate > DATEADD(minute, -5, GETDATE())" -h -1 -W
check_perf_counter = scripts\performance_counter.bat $ARG1$
check_mysqlremote = cmd /c echo python scripts\check_mysqlremote.py ; exit($lastexitcode)| powershell.exe -command -
check_firewall = cmd /c echo scripts\check_firewall.ps1; exit($lastexitcode)| powershell.exe -command -
check_checkpoint_count = cmd /c echo scripts\check_checkpoint_count.ps1; exit($lastexitcode)| powershell.exe -command -
count_Remove_mail_domain = sqlcmd -d fix -S localhost -E -Q "SET NOCOUNT ON;SELECT count(*) FROM fix.dbo.process_list where datetime < GETDATE() and datetime > DATEADD(minute, -5, GETDATE()) and Tag = 'Remove_mail_domain'" -h -1 -W
check_vhdx_count = cmd /c echo scripts\check_vhdx_count.ps1; exit($lastexitcode)| powershell.exe -command -
check_mssqlremote = cmd /c echo python scripts\check_mssqlremote.py ; exit($lastexitcode)| powershell.exe -command -
check_smtp = cmd /c echo python scripts\check_smtp.py ; exit($lastexitcode)| powershell.exe -command -
check_dns = cmd /c echo python scripts\check_dns.py ; exit($lastexitcode)| powershell.exe -command -
check_openmanage = modules\check_openmanage.exe -b pdisk_cert=all
check_hwcheck = scripts\hwcheck.bat
count_Reconfig_mail_domain = sqlcmd -d fix -S localhost -E -Q "SET NOCOUNT ON;SELECT count(*) FROM fix.dbo.process_list where datetime < GETDATE() and datetime > DATEADD(minute, -5, GETDATE()) and Tag = 'Reconfig_mail_domain'" -h -1 -W
check_ip = cmd /c echo scripts\ipcheck.ps1; exit($lastexitcode)| powershell.exe -command -
diskusage = cmd /c echo scripts\diskusage.ps1; exit($lastexitcode)| powershell.exe -command -
count_iis_sites = cmd /c sqlcmd -d psa -S localhost -E -Q "SET NOCOUNT ON;select count(*) from domains" -h -1 -W
check_smtp_queue = cmd /c echo scripts\smtp_queuelength.ps1 $ARG1$ $ARG2$; exit($lastexitcode)| powershell.exe -command -


; Command aliases - A list of aliases for already defined commands (with arguments). An alias is an internal command that has been predefined to provide a single command without arguments. Be careful so you don't create loops (ie check_loop=check_a, check_a=check_loop)
[/settings/external scripts/alias]

; ALIAS - Query alias
check_ok = CheckOK Everything is fine!
alias_service = checkServiceState CheckAll
alias_process = checkProcState $ARG1$=started
alias_mem = checkMem MaxWarn=80% MaxCrit=90% ShowAll type=physical
alias_event_log_old = CheckEventLog file=application file=system filter=new filter=out MaxWarn=1 MaxCrit=1 filter-generated=>2d filter-severity==success filter-severity==informational truncate=800 unique descriptions  "syntax=%severity%: %source%: %message% (%count%)"
alias_up = checkUpTime MinWarn=1d MinWarn=1h
alias_event_log_new = CheckEventLog file=application file=system MaxWarn=1 MaxCrit=1 "filter=generated gt -2d AND severity NOT IN ('success', 'informational')" truncate=800 unique descriptions "syntax=%severity%: %source%: %message% (%count%)"
alias_file_size_in_dir = checkFile2 filter=out pattern=*.txt "file=$ARG1$" filter-size=>$ARG2$ MaxWarn=1 MaxCrit=1 "syntax=%filename% %size%"
alias_event_log = alias_event_log_new
alias_cpu_ex = checkCPU warn=$ARG1$ crit=$ARG2$ time=5m time=1m time=30s
alias_file_age = checkFile2 filter=out "file=$ARG1$" filter-written=>1d MaxWarn=1 MaxCrit=1 "syntax=%filename% %write%"
alias_cpu = checkCPU warn=80 crit=90 time=5m time=1m time=30s
alias_file_size = checkFile2 filter=out "file=$ARG1$" filter-size=>$ARG2$ MaxWarn=1 MaxCrit=1 "syntax=%filename% %size%"
alias_disk = CheckDriveSize MinWarn=10% MinCrit=5% CheckAll FilterType=FIXED


; MODULES - A list of modules.
[/modules]
NRPEServer = enabled
CheckExternalScripts = enabled
CheckHelpers = disabled
CheckEventLog = disabled
CheckDisk = enabled
CheckSystem = enabled
NSClientServer = enabled


; LOG SECTION - Configure log file properties.
[/settings/log/file]

#7

Looks like it is showing cores or some such, maybe a shw-all or filter=none in the command somwhere?


#8

This is given in the command

/usr/lib64/nagios/plugins/check_nrpe -t 60 -H 172.16.220.215 -c checkCPU -a warn=80% crit=90% time=5m time=10m time=15m ShowAll=long

So you are telling showAll=long needs to be removed, am i right?

/usr/lib64/nagios/plugins/check_nrpe -t 60 -H 172.16.220.215 -c checkCPU -a warn=80% crit=90% time=5m time=10m time=15m