{"id":256,"date":"2008-02-04T22:58:19","date_gmt":"2008-02-04T20:58:19","guid":{"rendered":"http:\/\/contoso.se\/blog\/?p=256"},"modified":"2010-09-01T12:31:06","modified_gmt":"2010-09-01T10:31:06","slug":"ideas-about-ftp-monitoring","status":"publish","type":"post","link":"http:\/\/contoso.se\/blog\/?p=256","title":{"rendered":"Ideas about FTP monitoring"},"content":{"rendered":"<p>You can monitor a IIS FTP site with the Internet Information Services (IIS) Management Pack. But that\u00c2\u00a0management pack only\u00c2\u00a0monitor the FTP from the server side. I received a couple of questions how to monitor a FTP from the client side.\u00c2\u00a0You can do that with a vbscript, but if you are not that into scripting you can solve it like this:<\/p>\n<p>You can setup a port check. TCP Port check easy to add with the monitoring wizard under management pack templates.<\/p>\n<p>You can also create a FTP.EXE script that logon to your FTP server and perform a number of commands.\u00c2\u00a0ftp.exe is a built-in FTP tool in Windows. If you run it with the -s: parameter you can specify a script. You can also use the -d parameter to turn on debug and then the dump the result to a logfile with &gt;&gt;ftpcheck.log. That logfile you can check with a rule or monitor\u00c2\u00a0from Ops Mgr.\u00c2\u00a0Example<\/p>\n<p><code>ftp.exe -d\u00c2\u00a0-s:ftpscript.ftp &gt;&gt;ftp_log.log<\/code><\/p>\n<p>You can run the complete command from a Timed Commands\/Execute a command rule. You can then create a Alert Generating Rules\/Event Based\/Generic Text Log (Alert) rule\u00c2\u00a0to monitor that ftp_log.log file. In <a href=\"http:\/\/contoso.se\/blog\/?p=174\">this<\/a> post you can read how to setup a rule to check a\u00c2\u00a0logfile. Your ftpscript.ftp file can look like this<\/p>\n<p><code>open 10.1.1.1<br \/>\nloginname<br \/>\nPassword<br \/>\nbinary<br \/>\nsend contoso-test-file.txt<br \/>\nget\u00c2\u00a0contoso-test-file.txt<br \/>\nbye<\/code><\/p>\n<p>As you can see, it is normal FTP commands inside that file. If you want to only test download a file from a FTP\u00c2\u00a0and dont\u00c2\u00a0want to check the ftp_log.txt file, you can check when the downloaded file was last updated, according to <a href=\"http:\/\/contoso.se\/blog\/?p=41\">this<\/a> post. You can also use <a href=\"http:\/\/contoso.se\/blog\/?p=192\">this<\/a> script to search your logfile for words, and generate events.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>You can monitor a IIS FTP site with the Internet Information Services (IIS) Management Pack. But that\u00c2\u00a0management pack only\u00c2\u00a0monitor the FTP from the server side. I received a couple of questions how to monitor a FTP from the client side.\u00c2\u00a0You can do that with a vbscript, but if you are not that into scripting you &hellip; <a href=\"http:\/\/contoso.se\/blog\/?p=256\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[13,19],"tags":[],"class_list":["post-256","post","type-post","status-publish","format-standard","hentry","category-scripts","category-operations-manager-2007"],"_links":{"self":[{"href":"http:\/\/contoso.se\/blog\/index.php?rest_route=\/wp\/v2\/posts\/256","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/contoso.se\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/contoso.se\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/contoso.se\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/contoso.se\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=256"}],"version-history":[{"count":1,"href":"http:\/\/contoso.se\/blog\/index.php?rest_route=\/wp\/v2\/posts\/256\/revisions"}],"predecessor-version":[{"id":1780,"href":"http:\/\/contoso.se\/blog\/index.php?rest_route=\/wp\/v2\/posts\/256\/revisions\/1780"}],"wp:attachment":[{"href":"http:\/\/contoso.se\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=256"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/contoso.se\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=256"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/contoso.se\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=256"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}