hi i have a problem
im using nagios 3
fedora core 9
nsclient++0.3.5.2
nagios return: check_nt: Could not parse arguments
a create service and command to use external scripts (writting in vbs) and modify nsc.ini:
-define service in windows.cfg
define service{
use generic-service
host_name database
service_description biztalk
check_command check_biztalk!
}
-
define comand in commands.cfg
define command{
command_name check_biztalk
command_line /usr/local/nagios/libexec/check_nt -H $HOSTADDRESS$ -p 12489 -v check_biztalk
} -
nsc.ini
[modules]
CheckExternalScripts.dll
FileLogger.dll
CheckSystem.dll
CheckDisk.dll
NSClientListener.dll
NRPEListener.dll
SysTray.dll
CheckEventLog.dll
CheckHelpers.dll
CheckWMI.dll
[External Scripts]
;check_es_long=scripts\long.bat
;check_es_ok=scripts\ok.bat
;check_es_nok=scripts\nok.bat
;check_vbs_sample=cscript.exe //T:30 //NoLogo scripts\check_vb.vbs
;check_powershell_warn=cmd /c echo scripts\powershell.ps1 | powershell.exe -command -
check_vbs_sample=cscript.exe //T:30 //NoLogo scripts\check_vb.vbs
check_biztalk=C:\windows\system32\cscript.exe //T:30 //NoLogo c:\Program Files\NSCLIENT\scripts\check_biztalk.vbs
[NSClient]
port=12489
[Settings]
allowed_hosts=xxx.xxx.xxx.xx
use_file=1
[NRPE]
port=5666
allow_arguments=1
allow_nasty_meta_chars=1
use_ssl=1
allowed_hosts=xxx.xxx.xxx.xx
[NSCA Agent]
encryption_method=14
Im trying monitorng database with external script:
Dim connString
Dim sql
Dim resultSet
Dim connect
connString = “Provider=SQLNCLI;Server=XXX;Database=XXX_test;uid=XXX;pwd=XXX”
Set connect = CreateObject(“ADODB.Connection”)
Set resultSet = CreateObject(“ADODB.Recordset”)
connect.Open connString
sql="SELECT count (*) FROM Nagios_Biztalk"
Set resultSet = connect.Execute(sql)
If resultSet(0).value =< 5 then
Wscript.Echo "OK"
ElseIf resultSet(0).value > 5 and resultSet(0).value =< 10 then
Wscript.Echo "WARNING"
ElseIf resultSet(0).value > 10 then
Wscript.Echo "CRITICAL"
End If
resultSet.Close
connect.Close
Set connect = Nothing
WScript.Quit(0)
And nagios return:
Status: UNKNOWN
Status Information: check_nt: Could not parse arguments
Any ideas? please help me I’m desperate
(sorry for my bad eng)