[Nagios-users] nsclient++ - external scripts - no handler error

Terry td3201 at gmail.com
Mon Oct 4 16:09:31 UTC 2010


Hello,

Trying to get external scripts to work with NSClient++ via NRPE.  I
got it working using [NRPE Handlers] but that's deprecated per the
documentation.  Here's my config:

[modules]
FileLogger.dll
CheckSystem.dll
CheckDisk.dll
NSClientListener.dll
NRPEListener.dll
SysTray.dll
CheckEventLog.dll
CheckHelpers.dll
CheckWMI.dll
[Settings]
use_file=1
[log]
debug=0
file=NSC.log
date_mask=%Y-%m-%d %H:%M:%S
[Check System]
[NRPE]
port=5666
allow_arguments=1
allow_nasty_meta_chars=1
use_ssl=1
allowed_hosts=10.0.0.0/8,192.168.0.0/16,172.16.0.0/12
[External Script]
allow_nasty_meta_chars=1
allow_arguments=1
[External Scripts]
get_counter_bulk_count=cscript.exe //nologo //T:60 "C:\Program
Files\NSClient++\scripts\check_counter_bulk_count.vbs" -h "$ARG1$"
-class "$ARG2$" -inst "$ARG3$" -prop "$ARG4$" -w "$ARG5$" -c "$ARG6$"


I got it working by removing the External Script sections and adding:

[NRPE Handlers]
get_counter_bulk_count=cscript.exe //nologo //T:60 "C:\Program
Files\NSClient++\scripts\check_counter_bulk_count.vbs" -h "$ARG1$"
-class "$ARG2$" -inst "$ARG3$" -prop "$ARG4$" -w "$ARG5$" -c "$ARG6$"

Here's my command on the nagios side:
check_nrpe -t 60 -H 10.0.55.14 -c get_counter_bulk_count -a 10.0.55.14
"Win32_PerfRawData_MSSQLSERVER_SQLServerDatabases" "Name=_Total"
"TransactionsPersec" 100 200

Thanks!




More information about the Nagios-users mailing list