{"id":1524,"date":"2017-12-15T11:56:54","date_gmt":"2017-12-15T11:56:54","guid":{"rendered":"https:\/\/pandorafms.com\/library\/?p=1524"},"modified":"2017-12-15T11:59:23","modified_gmt":"2017-12-15T11:59:23","slug":"ftp-connection-from-windows-agent","status":"publish","type":"post","link":"https:\/\/pandorafms.com\/library\/ftp-connection-from-windows-agent\/","title":{"rendered":"FTP Connection from windows agent"},"content":{"rendered":"<p class=\"description_pui\">How monitor with a simple module to check ftp connectivity from windows agent to ftp server.<\/p>\n<pre>\r\n1.- Create a bat file with this setup:\r\n\r\n@echo off\r\n\r\nREM Generate the script. Will overwrite any existing temp.txt\r\necho open servername&gt; temp.txt\r\necho username&gt;&gt; temp.txt\r\necho password&gt;&gt; temp.txt\r\necho get %1&gt;&gt; temp.txt\r\necho quit&gt;&gt; temp.txt\r\n\r\nREM Launch FTP and pass it the script\r\nftp -s:temp.txt\r\n\r\nREM Clean up.\r\ndel temp.txt<\/pre>\n<pre>\r\n2.- Check the output of this bat and do a grep \/ wc -l with content of the output<\/pre>\n<h2>Module data<\/h2>\n<pre>module_begin\u00a0\r\nmodule_name FTP Check\u00a0\r\nmodule_type generic_proc\u00a0\r\nmodule_exec FTP.bat | grep \" content \" | wc -l\u00a0\r\nmodule_end<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>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&gt; temp.txt echo username&gt;&gt; temp.txt echo password&gt;&gt; temp.txt echo get %1&gt;&gt; temp.txt echo quit&gt;&gt; temp.txt REM Launch FTP [&hellip;]<\/p>\n","protected":false},"author":4,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_et_pb_use_builder":"","_et_pb_old_content":"","_et_gb_content_width":"","footnotes":""},"categories":[6,26],"tags":[539,540,541,538,121],"_links":{"self":[{"href":"https:\/\/pandorafms.com\/library\/wp-json\/wp\/v2\/posts\/1524"}],"collection":[{"href":"https:\/\/pandorafms.com\/library\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/pandorafms.com\/library\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/pandorafms.com\/library\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/pandorafms.com\/library\/wp-json\/wp\/v2\/comments?post=1524"}],"version-history":[{"count":0,"href":"https:\/\/pandorafms.com\/library\/wp-json\/wp\/v2\/posts\/1524\/revisions"}],"wp:attachment":[{"href":"https:\/\/pandorafms.com\/library\/wp-json\/wp\/v2\/media?parent=1524"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/pandorafms.com\/library\/wp-json\/wp\/v2\/categories?post=1524"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/pandorafms.com\/library\/wp-json\/wp\/v2\/tags?post=1524"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}