Newest file matching mask?

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
BryonSutherland
Posts: 6
Joined: Fri Nov 18, 2011 3:22 pm

Newest file matching mask?

Post by BryonSutherland »

Scenario: 12 files (one every two hours) get generated with a datetime stamp in their name in a single folder. I need to make sure that each one is generated.

I have a File Monitor configured which looks for "File doesn't exist OR older than 90 minutes" configured. This works fine for the first file created that day but when the next check run it reports a failure.

I believe this is because HM is picking the first (oldest) file which matches the mask *CFMRCNOT%yyyy%%mm%%dd%*.txt and determining that it's older than 90 minutes. Is there a way to specify that HM look at the Newest File while using a mask?
KS-Soft Europe
Posts: 2832
Joined: Tue May 16, 2006 4:41 am
Contact:

Post by KS-Soft Europe »

You may use %NewestFile% macro variable, e.g.:
D:\logs\%NewestFile%
Note: "Translate macros" options should be marked.

Please check for details at:
http://www.ks-soft.net/hostmon.eng/mfra ... htm#macros
BryonSutherland
Posts: 6
Joined: Fri Nov 18, 2011 3:22 pm

Post by BryonSutherland »

Thank you for the response. Let me clarify....

There are other files being generated in the folder on a continual basis. I need the monitor to check for the newest file matching the file mask, not just the newest file.
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

Then use Count Files test method, enable the following options:
- Count files newer than 90 min
- Alert when folder contains more than 0 files
- Reverse alert

Regards
Alex
BryonSutherland
Posts: 6
Joined: Fri Nov 18, 2011 3:22 pm

Post by BryonSutherland »

Count Files lets me use a mask. Unintuitive but brilliant!

Thanks!
Post Reply