1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading...
:

How monitor with a simple module to check ftp connectivity from windows agent to ftp server.

1.- Create a bat file with this setup:

@echo off

REM Generate the script. Will overwrite any existing temp.txt
echo open servername> temp.txt
echo username>> temp.txt
echo password>> temp.txt
echo get %1>> temp.txt
echo quit>> temp.txt

REM Launch FTP and pass it the script
ftp -s:temp.txt

REM Clean up.
del temp.txt
2.- Check the output of this bat and do a grep / wc -l with content of the output

Module data

module_begin 
module_name FTP Check 
module_type generic_proc 
module_exec FTP.bat | grep " content " | wc -l 
module_end
(Visited 89 times, 1 visits today)