KS-Soft. Network Management Solutions
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister    ProfileProfile    Log inLog in 

File Count - File name mask question

 
Post new topic   Reply to topic    KS-Soft Forum Index -> Configuration, Maintenance, Troubleshooting
View previous topic :: View next topic  
Author Message
SplanK



Joined: 21 Nov 2007
Posts: 38

PostPosted: Mon Sep 14, 2015 2:20 am    Post subject: File Count - File name mask question Reply with quote

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
Back to top
View user's profile Send private message
KS-Soft



Joined: 03 Apr 2002
Posts: 12792
Location: USA

PostPosted: Mon Sep 14, 2015 5:48 am    Post subject: Reply with quote

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/mframe.htm#tests.htm#usrstatusprocessing

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

Regards
Alex
Back to top
View user's profile Send private message Visit poster's website
SplanK



Joined: 21 Nov 2007
Posts: 38

PostPosted: Mon Sep 14, 2015 6:35 am    Post subject: Reply with quote

Thanks,
I will knock together a quick VBS script to do the job!
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    KS-Soft Forum Index -> Configuration, Maintenance, Troubleshooting All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group

KS-Soft Forum Index