So How can we know the FTP server is saving all files as it should.
Well I found a way to go directly in the IIS-ftp log files and get the results from there.
They key tool here was logparser, Its very usefull to monitor, if the server is getting error responses or is being attacked by hackers the thresholds should go off.
The script is integrated with nagios and called using the Nagios Agent NC_NET it should also work with NRPE_NT
BEWARE:It takes the current hour as argument but my logs are in GMT so I had to set that, plus I am getting the last hour so I can get a complete. Example, if now its 17:10 the script will look for erros on the hour 16:00 to 16:59 this way the threashold should be somewhat simillar each hour.
It should also graph the results.
I am querying 2GB log files with great times around, 10-15 seconds.
I have tested with Windows 2008, IIS 7 running under the directory c:scripts be sure to create c:scriptslogs
The log is optional and it can be set from within the script.
Call from nagios or from command line using NC_NET:
C:PROGRA~1MontitechNC_Netscriptcheckftp.vbs //nologo -t 550 -w 5 -c 20
The script output should be something like:
WARNING – 39 errors type 550 on ftp |Erros=39,5,20
cscript checkftp.vbs -s SiteName -t Tipo de Erro -w warning -c critical
cscript checkftp.vbs -t 404 -w 50 -c 100
-h [–help] Help.
-t ErrorType IIS errortype:400,404,501,500 etc…
More details set the debug = 1 on the code.
to do the same for IIS check my post