File Count - File name mask question

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
SplanK
Posts: 38
Joined: Wed Nov 21, 2007 1:33 pm

File Count - File name mask question

Post by SplanK »

Hello,
We have a SQL backup process and I keep an eye on it using HM.

A process takes the .bak files on the SQL server, compresses them and shifts the compressed version offsite. It renames the original, uncompressed backup from

DBNAME_backup_201509121330.bak
to
DBNAME_backup_201509121330.COMPRESSED.bak

One of the ways I monitor the SQL backups is to count the number of .bak files without the COMPRESSED marker, and I presently use the file mask "*0.bak" to look for them

However I have just realised one of our SQL servers don't follow this rule and the 0 could be between 0 and 9.

Is there a way to use a regular expression, or some other function to search for a single value between 0-9? I cant see anything in the help menu

Thanks
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

I see 2 options

1) use 2 test items
-Master test to check for *.bak files,
-Dependant test to check for *COMPRESSED.bak file
then use Optional status processing (2nd dependant test) to calculate difference
E.g.
- set Warning status if ("%::master_test_name::Reply%" - "%SuggestedReply%")>100
- TuneUp Reply value: ["%::master_test_name::Reply%" - "%SuggestedReply%"]
http://www.ks-soft.net/hostmon.eng/mfra ... processing

2) use custom script and Shell Script or External test method
http://www.ks-soft.net/hostmon.eng/mfra ... m#chkShell

Regards
Alex
SplanK
Posts: 38
Joined: Wed Nov 21, 2007 1:33 pm

Post by SplanK »

Thanks,
I will knock together a quick VBS script to do the job! :)
Post Reply