Hello!
Just started using the FTP file checker plugin, and have it all up and running and configured correctly when I put a test file in the FTP folder.
My issue now is that the files written to the FTP folder are within another folder, and that folders name changes constantly. I was curious as to whether this plugin can check another layer, or monitor if a new folder is written into the FTP location.
Thanks in advance!
Tom
Answer by Joe H. ·
Tom,
The current version of the FTP File Checker Plugin is designed to test for files, not directories. But I think it would be relatively easy to modify it to also handle directories. But i'm not sure about the dynamic directory name. Maybe it could check for the existence of any directory? Might that work for you?
All plugins come with the source code, so you're welcome to fiddle with it yourself to adjust it to your needs. Of course it would be great to get your updates posted back to the community. I'm happy to work with you to get that accomplished. Let me know what you decide.
joe
Answer by Tom C. ·
Hi Joe,
The existence of a new directory would work with certain parameters (how long it had been there or how recently it was written etc)? Basically, files are written to our ftp folder, and if they are successfull they vanish after a minute or so, and if they fail they are written to a different location (with all of the older failed ones still in there). I will have a look at the source, but may be in over my head with it. I will have a nosy and see.
Thanks for your help on this!
Tom
Answer by Robert S. ·
Hi Tom -
I've provided an update to this plugin. There is now a check for the existence of the specified directory. If the directory does not exist, the DirectoryExists measure is set to 0, along with the FileExists measure (the file is presumed not to exist if its directory does not).
Hope this helps.
Robert Statsiner
Answer by Tom C. ·
Hi Robert,
Thanks for the update. I tried installing the plugin, but now I no longer have to option to create a monitor in the dashboard? I tried updating the plugin, which didn't work, and then completely removed and reintalled the plugin? Maybe I am doing something wrong
Thanks for the extra metric though, this is exactly what I need if I can get it to work! Can it check for the existence of any directory? Or only a specific directory? And could it check for a file within any subdirectory (without a given name, unfortunately the directory names are dynamic).
Tom
Answer by Robert S. ·
Hi Tom -
Sorry for the reply delay. I had no trouble deploying and configuring the new version. What version of Dynatrace are you using?
The plugin can be configured to check for the existence of any directory on the FTP server - you configure it just as you did the previous version (i.e. you pass it a directory name and a file name). It currently only looks for the file you specify in the directory you specify. It sounds like your use case is a little different. The plugin uses a pretty simple FTP client API (see http://www.sauronsoftware.it/projects/ftp4j/) - you should be able to make the plugin do anything that API can do. Hope this helps.
Robert Statsinger
JANUARY 15, 3:00 PM GMT / 10:00 AM ET