Build precise queries to find exactly what you need
Press ESC to close
Your review has been submitted and is pending approval.
I had problem with script check_filesize.vbs so I writed easy script for size folder
Current Version
1.0
Last Release Date
2010-03-18
Owner
Marek Pastier
Website
http://www.kph-hoko.sk
Compatible With
Create Marek Pastier 18.03.2010 Easy script for check space folder. You need NRPE_NT daemon on win computer ########################################################## Install ########################################################## 1.copy file to c: for example... c:nrpe_ntbincheck_folder_size.vbs 2.set your nrpe.cfg for command for example command[check_foldersize]=c:windowssystem32cscript.exe //NoLogo //T:30 c:nrpe_ntbincheck_folder_size.vbs c:yourfolder 50 78 50 70 are parameters for warning and critical value in MB 3.restart your nrpe_nt daemon in command prompt example.. net stop nrpe_nt and net start nrpe_nt 4. try from linux example.: ./check_nrpe -H yourcomputer -c check_foldersize and result can be OK:22,8 MB it is all
Really good script! But I have one problem: A error appear : " NSClient++scriptscheck_folder_size.vbs(36, 3) Execution Error Microsoft VBScript: 'Cint' " Anyone have a solution for this?
Here is a little fix to this plugin. First fixed the Warinig and Critical alarms (thanks for the comment), and then added a basic perfdata (only the size in MB no critical and warning value) Dim strfolder Dim intwarning Dim intcritic Dim wsh Dim intvelkost Dim intjednotka Dim Perf_Data '##########################################################' Set objFSO = CreateObject("Scripting.FileSystemObject") Set wsh = CreateObject("WScript.Shell") '##########################################################' If Wscript.Arguments.Count = 3 Then strfolder = Wscript.Arguments(0) intwarning = Wscript.Arguments(1) intcritic = Wscript.Arguments(2) Set objFolder = objFSO.GetFolder(strfolder) intjednotka = 1048576 '1MB->bytes' intvelkost = objFolder.Size/intjednotka Perf_Data = "|'FolderSize'=" & round (objFolder.Size / 1048576,1) & "MB;" if (objFolder.Size/1024000) > Cint(intcritic) then Wscript.Echo "CRITICAL:" & round (objFolder.Size / 1048576,1) & " MB" & Perf_Data Wscript.Quit(2) elseif (objFolder.Size/1048576) > Cint(intwarning) then Wscript.Echo "WARNING:" & round (objFolder.Size / 1048576,1) & " MB" & Perf_Data Wscript.Quit(1) else Wscript.Echo "OK:" & round (objFolder.Size /1048576,1) & " MB" & Perf_Data Wscript.Quit(0) end if else Wscript.Echo "UNKNOWN:"& strfolder &"-" & intwarning & "-" & intcritic Wscript.Quit(3) End If
great script, but script never gives critical cause when a folder comes above warning level, it gives a warning and then wscript.quit if you reverse the warning en critical lines in the script it works as expected
great script. Just wondering how to get this to work with arguments?
For some odd reason, slashes on this website don't work well in reviews and submissions! - See the text file of this plugin for the correct path names.
hi, thanks. but it seems you are missing slashes in the path. please try with slash and it will work anyway this plugin is great it is used to monitor my servers share folder sizes :)
You must be logged in to submit a review.
To:
From: