Hello,
we have one FTP-Server, where we place the file-based backups of some of our servers. Each server creates a different number of files for each backup, depending on its configuration. To see if those backup-files are up-to-date I would like to check if the defined number of files (i.e. 65 files each day for Server1, 15 files each day for Server2) is not older than 24 hours. I didnt get that to work with File/Folder-availability. Does anyone have a hint for me, ho to solve that problem?
Thanks,
Thomas
File/Folder-availability for several files
-
- Posts: 34
- Joined: Mon Oct 26, 2009 2:55 pm
- Location: Duisburg, GERMANY
If destination folder contains only backup files (should not contain any other old files) then you may use Count Files test method. It allows you to check for old files
http://www.ks-soft.net/hostmon.eng/mfra ... countfiles
Regards
Alex
http://www.ks-soft.net/hostmon.eng/mfra ... countfiles
Regards
Alex
-
- Posts: 34
- Joined: Mon Oct 26, 2009 2:55 pm
- Location: Duisburg, GERMANY
Hi Alex,
thank you for your quick answer. Unfortunately there ARE more files. As we keep around two weeks of backup-files. I already tried countfiles method. But there are two problems wit this method I couldnt resolve.
First thing is, that I couldnt get countfiles to translate date variables (like YYYYMMDD[-1]. Our backup-files each have the date of creation in their file-name. But I need to check for files with date of yesterday, for the files are created around 11pm.
Next thing is, that countfiles only alerts if there are more than the expexted number of files. But to verify the backups I would also need to check if there are less files than expected (to see if backups didnt get transferred via FTP, for example).
I think what needs to be done here is some kind of scripting - as long as HostMonitor does not support a testmethod called "Check Buckup-Files".
. Maybe someone already did that scripting in the past? I bet there are lots of people who need such a script, just like I do. If you have any idea, let me know.
Thank you,
Thomas
thank you for your quick answer. Unfortunately there ARE more files. As we keep around two weeks of backup-files. I already tried countfiles method. But there are two problems wit this method I couldnt resolve.
First thing is, that I couldnt get countfiles to translate date variables (like YYYYMMDD[-1]. Our backup-files each have the date of creation in their file-name. But I need to check for files with date of yesterday, for the files are created around 11pm.
Next thing is, that countfiles only alerts if there are more than the expexted number of files. But to verify the backups I would also need to check if there are less files than expected (to see if backups didnt get transferred via FTP, for example).
I think what needs to be done here is some kind of scripting - as long as HostMonitor does not support a testmethod called "Check Buckup-Files".

Thank you,
Thomas
-
- Posts: 2832
- Joined: Tue May 16, 2006 4:41 am
- Contact:
You are using wrong expression. Expression should look like %YYYYMMDD[-1d]%.zipFirst thing is, that I couldnt get countfiles to translate date variables (like YYYYMMDD[-1]. Our backup-files each have the date of creation in their file-name. But I need to check for files with date of yesterday, for the files are created around 11pm.
You may use "Use Warning status if" option, located on "Test properties" dialog with expression like '%SuggestedReply%' < 7Next thing is, that countfiles only alerts if there are more than the expexted number of files. But to verify the backups I would also need to check if there are less files than expected (to see if backups didnt get transferred via FTP, for example).
Please note, "Treat Warning status as Bad" option should be enabled to start Action profile assigned to test.
Please check the manual or visit our web site for more information at:
Use Warning status if option: http://www.ks-soft.net/hostmon.eng/mfra ... ningstatus
Macro variables http://www.ks-soft.net/hostmon.eng/mfra ... htm#macros
So you want to check for new files? Then setup test using "Count files newer than 1440 min" and use "Reverse alert" or "Use Warning status" option to set Bad/Warning status when number of files is less than expected.Next thing is, that countfiles only alerts if there are more than the expexted number of files. But to verify the backups I would also need to check if there are less files than expected (to see if backups didnt get transferred via FTP, for example)
Regards
Alex
-
- Posts: 34
- Joined: Mon Oct 26, 2009 2:55 pm
- Location: Duisburg, GERMANY