Checking if an FTP server is up
Posted: Tue Apr 05, 2011 3:51 pm
I'm using RoboTask to set up a whole series of monitoring tasks on our network. One of these is checking to see that 5 different FTP servers are running properly and accepting uploads. I used a task shared here as an idea source for mine.My version of the script:Sets a variable to falseLogs on to the FTP serverUploads a fileUses FTP Loop to determine if the file is there If the file is there, it says the variable to trueIf the variable is false it sends an emailDeletes the fileLogs off the FTP serverIt seems to work fine if the script can log on to the server. If the script fails earlier (DNS, FTP server down etc), the script aborts and no email is sent. I'm guessing that I need some way to monitor the exit status of the earlier commands.How can I get my script to send an email for ANY kind of failure that prevents me from uploading a file?