This plugin checks the existence of a given file on an FTP Server and returns the result as a measure value of 0 or 1.
Dec 16, 2013. v1.0.1 - Initial Release
Dec 18, 2013, v1.0.2 - Better error handling, compiled for v5.5
May 2015 - v1.0.3 - Adds check for directory existence
1 if the specified directory is found on the FTP server
0 otherwise. In this case the FileExists measure is also set to 0
1; if the specified file is found on the FTP Server in the specified directory
0; if the specified file is not found
The following properties need to be defined when setting up this monitor
FTP Server Hostname
This plugin can be useful for detecting when a given file does or does not exist on a file system that is accessible by FTP. This can be useful when a file existence or absence is used as a trigger for the beginning or completion of a batch job. The resulting measure can be plotted, displayed as a Traffic Light, and alerted upon via an action. Below is an example of showing the status of the file and showing an alert condition via a Traffic light when the file is not found.
Import the Plugin into the dynaTrace Server via the dynaTrace Server Settings menu -> Plugins -> Install Plugin. For details how to do this please refer to the dynaTrace documentation: Plugin Management
Feel free to contribute any changes on Github
is it possible we can change protocol from ftp to sftp.
The plugin uses Sauronsoft's ftp4j - see http://www.sauronsoftware.it/projects/ftp4j/index.php. ftp4j supports FTPS but not SFTP - you could easily hack the plugin source code (it's available here: https://github.com/Dynatrace/Dynatrace-FTP-File-Checker-Plugin) to add something like:
client.setSecurity(FTPClient.SECURITY_FTPS); // enables FTPS
There are details in the ftp4j docs.
Sorry, I have a question regarding this plugin, I see that this supports FTPS but not SFTP. I need to check to see if a file exists on an SFTP server. So is there no way to get this plugin to work with SFTP? If not, does anyone have any ideas on what else I can use to accomplish this?
Thank you very much for any help,
Hi Tom -
The plugin uses Sauronsoft's ftp4j - see http://www.sauronsoftware.it/projects/ftp4j/index.php, which unfortunately does not support SFTP. SFTP is based on SSH, so what you'd need to do is write a plugin that uses a pure Java implementation of SSH or SFTP. Hope this helps.