Folder Monitoring
Hi All,
Wanted to monitor a folder.
Conditions-
1)If folder is not updated for 30 mins, alert should be generated .
2)After alert is generated if the folder is updated in say next 10 mins the alert should auto resolve.
Please suggest easiest way to perform the above task.
November 23rd, 2010 11:13am
Hi. This is something for which you'll need a script. Use the FileSystemObject and the DateLastModified property to tell if the contents of the folder have changed. You can use it as a monitor so that the alert can auto resolve.
If you search around for vbscripts and folder datelastmodified you should be able to find something.Layne
Free Windows Admin Tool Kit Click here and download it now
November 23rd, 2010 12:00pm
Hi
You might want to check out the FileSystem Management Pack from SystemCenterCentral in your dev environment to see if it will do this (I can't remember off-hand):
http://systemcentercentral.com/PackCatalog/PackCatalogDetails/tabid/145/indexid/13064/Default.aspx
Otherwise, as Layne says, it is relatively straight forward to take a VBScript based upon the File System Object and incorporate it into a monitor:
http://technet.microsoft.com/en-us/library/ff629453.aspx
http://msdn.microsoft.com/en-us/library/ch28h2s7(v=VS.85).aspx
Cheers
GrahamView OpsMgr tips and tricks at
http://systemcentersolutions.wordpress.com/
November 23rd, 2010 1:36pm
Hi,
I also think you can do this with a script.
Regarding the FileSystemObject and DateLastModified Property, please refer to:
FileSystemObject
http://msdn.microsoft.com/en-us/library/6kxy1a51(v=VS.85).aspx
DateLastModified Property
http://msdn.microsoft.com/en-us/library/c8xh895w(v=VS.85).aspx
Meanwhile, I would like to share the following examples with you for your reference:
Monitor file and directory size
http://contoso.se/blog/?p=127
SCOM 2007 Script to Monitor File Count inside a Directory
http://www.scom2k7.com/scom-2007-script-to-monitor-file-count-inside-a-directory/
Please Note: Since the websites are not hosted by Microsoft, the links may change without notice. Microsoft does not guarantee the accuracy of this information.
Hope this helps.
Thanks.
Nicholas Li - MSFT
Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.
Free Windows Admin Tool Kit Click here and download it now
November 25th, 2010 4:12am