File/Folder-availability for several files

All questions related to installations, configurations and maintenance of Advanced Host Monitor (including additional tools such as RMA for Windows, RMA Manager, Web Servie, RCC).
Post Reply
thomas.mueller@envers.de
Posts: 34
Joined: Mon Oct 26, 2009 2:55 pm
Location: Duisburg, GERMANY

File/Folder-availability for several files

Post by thomas.mueller@envers.de »

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
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

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
thomas.mueller@envers.de
Posts: 34
Joined: Mon Oct 26, 2009 2:55 pm
Location: Duisburg, GERMANY

Post by thomas.mueller@envers.de »

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
KS-Soft Europe
Posts: 2832
Joined: Tue May 16, 2006 4:41 am
Contact:

Post by KS-Soft Europe »

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.
You are using wrong expression. Expression should look like %YYYYMMDD[-1d]%.zip
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).
You may use "Use Warning status if" option, located on "Test properties" dialog with expression like '%SuggestedReply%' < 7
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
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

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)
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.

Regards
Alex
thomas.mueller@envers.de
Posts: 34
Joined: Mon Oct 26, 2009 2:55 pm
Location: Duisburg, GERMANY

Post by thomas.mueller@envers.de »

Hi Alex,

Use "Warning" status if '%SuggestedReply%'<>'65' works perfect!

Thank you for your help,
Thomas
Post Reply