check_folder_size.vbs
Posted: Tue Oct 25, 2016 3:58 am
Hello,
I followed topic 37614 to check te folder size of a windows machine but having a problem when passing the arguments from the Nagios console.
nsclient.ini on the windows client:
This is working fine:
[/settings/external scripts/scripts]
check_folder_size=cscript.exe //T:30 //NoLogo scripts\check_folder_size.vbs c:\install 300 400
Now I want to pass the arguments so I change the ini file on the client:
[/settings/external scripts/scripts]
check_folder_size=cscript.exe //T:30 //NoLogo scripts\check_folder_size.vbs $ARG1$ $ARG2$ $ARG3$ ( I also tried to quote " the arguments )
This is the command from Nagios to test if the command works:
./check_nrpe -t 120 -H 10.30.1.14 -n -c check_folder_size c:\install 300 400
I get the error on Nagios console:
C:\Program Files\NSClient++\scripts\check_folder_size.vbs(30, 1) Runtimefout Microsoft VBScript: Kan het pad niet vinden ( this is dutch Runtime error MS VBS: Can't find path )
What I'm doing wrong, can somebody help me to pass the arguments. Is there something wrong with the path?
I followed topic 37614 to check te folder size of a windows machine but having a problem when passing the arguments from the Nagios console.
nsclient.ini on the windows client:
This is working fine:
[/settings/external scripts/scripts]
check_folder_size=cscript.exe //T:30 //NoLogo scripts\check_folder_size.vbs c:\install 300 400
Now I want to pass the arguments so I change the ini file on the client:
[/settings/external scripts/scripts]
check_folder_size=cscript.exe //T:30 //NoLogo scripts\check_folder_size.vbs $ARG1$ $ARG2$ $ARG3$ ( I also tried to quote " the arguments )
This is the command from Nagios to test if the command works:
./check_nrpe -t 120 -H 10.30.1.14 -n -c check_folder_size c:\install 300 400
I get the error on Nagios console:
C:\Program Files\NSClient++\scripts\check_folder_size.vbs(30, 1) Runtimefout Microsoft VBScript: Kan het pad niet vinden ( this is dutch Runtime error MS VBS: Can't find path )
What I'm doing wrong, can somebody help me to pass the arguments. Is there something wrong with the path?